Coverage Report

Created: 2022-05-14 11:35

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/Format/QualifierAlignmentFixer.cpp
Line
Count
Source (jump to first uncovered line)
1
//===--- LeftRightQualifierAlignmentFixer.cpp -------------------*- C++--*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
///
9
/// \file
10
/// This file implements LeftRightQualifierAlignmentFixer, a TokenAnalyzer that
11
/// enforces either left or right const depending on the style.
12
///
13
//===----------------------------------------------------------------------===//
14
15
#include "QualifierAlignmentFixer.h"
16
#include "FormatToken.h"
17
#include "llvm/Support/Debug.h"
18
#include "llvm/Support/Regex.h"
19
20
#include <algorithm>
21
22
#define DEBUG_TYPE "format-qualifier-alignment-fixer"
23
24
namespace clang {
25
namespace format {
26
27
QualifierAlignmentFixer::QualifierAlignmentFixer(
28
    const Environment &Env, const FormatStyle &Style, StringRef &Code,
29
    ArrayRef<tooling::Range> Ranges, unsigned FirstStartColumn,
30
    unsigned NextStartColumn, unsigned LastStartColumn, StringRef FileName)
31
    : TokenAnalyzer(Env, Style), Code(Code), Ranges(Ranges),
32
      FirstStartColumn(FirstStartColumn), NextStartColumn(NextStartColumn),
33
804
      LastStartColumn(LastStartColumn), FileName(FileName) {
34
804
  std::vector<std::string> LeftOrder;
35
804
  std::vector<std::string> RightOrder;
36
804
  std::vector<tok::TokenKind> ConfiguredQualifierTokens;
37
804
  PrepareLeftRightOrdering(Style.QualifierOrder, LeftOrder, RightOrder,
38
804
                           ConfiguredQualifierTokens);
39
40
  // Handle the left and right alignment separately.
41
1.50k
  for (const auto &Qualifier : LeftOrder) {
42
1.50k
    Passes.emplace_back(
43
1.53k
        [&, Qualifier, ConfiguredQualifierTokens](const Environment &Env) {
44
1.53k
          return LeftRightQualifierAlignmentFixer(Env, Style, Qualifier,
45
1.53k
                                                  ConfiguredQualifierTokens,
46
1.53k
                                                  /*RightAlign=*/false)
47
1.53k
              .process();
48
1.53k
        });
49
1.50k
  }
50
804
  for (const auto &Qualifier : RightOrder) {
51
717
    Passes.emplace_back(
52
747
        [&, Qualifier, ConfiguredQualifierTokens](const Environment &Env) {
53
747
          return LeftRightQualifierAlignmentFixer(Env, Style, Qualifier,
54
747
                                                  ConfiguredQualifierTokens,
55
747
                                                  /*RightAlign=*/true)
56
747
              .process();
57
747
        });
58
717
  }
59
804
}
60
61
std::pair<tooling::Replacements, unsigned> QualifierAlignmentFixer::analyze(
62
    TokenAnnotator & /*Annotator*/,
63
    SmallVectorImpl<AnnotatedLine *> & /*AnnotatedLines*/,
64
828
    FormatTokenLexer & /*Tokens*/) {
65
828
  auto Env = Environment::make(Code, FileName, Ranges, FirstStartColumn,
66
828
                               NextStartColumn, LastStartColumn);
67
828
  if (!Env)
68
0
    return {};
69
828
  llvm::Optional<std::string> CurrentCode = None;
70
828
  tooling::Replacements Fixes;
71
3.11k
  for (size_t I = 0, E = Passes.size(); I < E; 
++I2.28k
) {
72
2.28k
    std::pair<tooling::Replacements, unsigned> PassFixes = Passes[I](*Env);
73
2.28k
    auto NewCode = applyAllReplacements(
74
2.28k
        CurrentCode ? 
StringRef(*CurrentCode)1.45k
:
Code828
, PassFixes.first);
75
2.28k
    if (NewCode) {
76
2.28k
      Fixes = Fixes.merge(PassFixes.first);
77
2.28k
      if (I + 1 < E) {
78
1.45k
        CurrentCode = std::move(*NewCode);
79
1.45k
        Env = Environment::make(
80
1.45k
            *CurrentCode, FileName,
81
1.45k
            tooling::calculateRangesAfterReplacements(Fixes, Ranges),
82
1.45k
            FirstStartColumn, NextStartColumn, LastStartColumn);
83
1.45k
        if (!Env)
84
0
          return {};
85
1.45k
      }
86
2.28k
    }
87
2.28k
  }
88
89
  // Don't make replacements that replace nothing.
90
828
  tooling::Replacements NonNoOpFixes;
91
92
828
  for (const tooling::Replacement &Fix : Fixes) {
93
519
    StringRef OriginalCode = Code.substr(Fix.getOffset(), Fix.getLength());
94
95
519
    if (!OriginalCode.equals(Fix.getReplacementText())) {
96
418
      auto Err = NonNoOpFixes.add(Fix);
97
418
      if (Err)
98
0
        llvm::errs() << "Error adding replacements : "
99
0
                     << llvm::toString(std::move(Err)) << "\n";
100
418
    }
101
519
  }
102
828
  return {NonNoOpFixes, 0};
103
828
}
104
105
static void replaceToken(const SourceManager &SourceMgr,
106
                         tooling::Replacements &Fixes,
107
825
                         const CharSourceRange &Range, std::string NewText) {
108
825
  auto Replacement = tooling::Replacement(SourceMgr, Range, NewText);
109
825
  auto Err = Fixes.add(Replacement);
110
111
825
  if (Err)
112
0
    llvm::errs() << "Error while rearranging Qualifier : "
113
0
                 << llvm::toString(std::move(Err)) << "\n";
114
825
}
115
116
static void removeToken(const SourceManager &SourceMgr,
117
                        tooling::Replacements &Fixes,
118
106
                        const FormatToken *First) {
119
106
  auto Range = CharSourceRange::getCharRange(First->getStartOfNonWhitespace(),
120
106
                                             First->Tok.getEndLoc());
121
106
  replaceToken(SourceMgr, Fixes, Range, "");
122
106
}
123
124
static void insertQualifierAfter(const SourceManager &SourceMgr,
125
                                 tooling::Replacements &Fixes,
126
                                 const FormatToken *First,
127
72
                                 const std::string &Qualifier) {
128
72
  FormatToken *Next = First->Next;
129
72
  if (!Next)
130
0
    return;
131
72
  auto Range = CharSourceRange::getCharRange(Next->getStartOfNonWhitespace(),
132
72
                                             Next->Tok.getEndLoc());
133
134
72
  std::string NewText = " " + Qualifier + " ";
135
72
  NewText += Next->TokenText;
136
72
  replaceToken(SourceMgr, Fixes, Range, NewText);
137
72
}
138
139
static void insertQualifierBefore(const SourceManager &SourceMgr,
140
                                  tooling::Replacements &Fixes,
141
                                  const FormatToken *First,
142
34
                                  const std::string &Qualifier) {
143
34
  auto Range = CharSourceRange::getCharRange(First->getStartOfNonWhitespace(),
144
34
                                             First->Tok.getEndLoc());
145
146
34
  std::string NewText = " " + Qualifier + " ";
147
34
  NewText += First->TokenText;
148
149
34
  replaceToken(SourceMgr, Fixes, Range, NewText);
150
34
}
151
152
683
static bool endsWithSpace(const std::string &s) {
153
683
  if (s.empty())
154
0
    return false;
155
683
  return isspace(s.back());
156
683
}
157
158
222
static bool startsWithSpace(const std::string &s) {
159
222
  if (s.empty())
160
0
    return false;
161
222
  return isspace(s.front());
162
222
}
163
164
static void rotateTokens(const SourceManager &SourceMgr,
165
                         tooling::Replacements &Fixes, const FormatToken *First,
166
613
                         const FormatToken *Last, bool Left) {
167
613
  auto *End = Last;
168
613
  auto *Begin = First;
169
613
  if (!Left) {
170
222
    End = Last->Next;
171
222
    Begin = First->Next;
172
222
  }
173
174
613
  std::string NewText;
175
  // If we are rotating to the left we move the Last token to the front.
176
613
  if (Left) {
177
391
    NewText += Last->TokenText;
178
391
    NewText += " ";
179
391
  }
180
181
  // Then move through the other tokens.
182
613
  auto *Tok = Begin;
183
1.51k
  while (Tok != End) {
184
905
    if (!NewText.empty() && 
!endsWithSpace(NewText)683
)
185
292
      NewText += " ";
186
187
905
    NewText += Tok->TokenText;
188
905
    Tok = Tok->Next;
189
905
  }
190
191
  // If we are rotating to the right we move the first token to the back.
192
613
  if (!Left) {
193
222
    if (!NewText.empty() && !startsWithSpace(NewText))
194
222
      NewText += " ";
195
222
    NewText += First->TokenText;
196
222
  }
197
198
613
  auto Range = CharSourceRange::getCharRange(First->getStartOfNonWhitespace(),
199
613
                                             Last->Tok.getEndLoc());
200
201
613
  replaceToken(SourceMgr, Fixes, Range, NewText);
202
613
}
203
204
const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight(
205
    const SourceManager &SourceMgr, const AdditionalKeywords &Keywords,
206
    tooling::Replacements &Fixes, const FormatToken *Tok,
207
5.66k
    const std::string &Qualifier, tok::TokenKind QualifierType) {
208
  // We only need to think about streams that begin with a qualifier.
209
5.66k
  if (!Tok->is(QualifierType))
210
5.14k
    return Tok;
211
  // Don't concern yourself if nothing follows the qualifier.
212
522
  if (!Tok->Next)
213
0
    return Tok;
214
522
  if (LeftRightQualifierAlignmentFixer::isPossibleMacro(Tok->Next))
215
6
    return Tok;
216
217
516
  FormatToken *Qual = Tok->Next;
218
516
  FormatToken *LastQual = Qual;
219
792
  while (Qual && isQualifierOrType(Qual, ConfiguredQualifierTokens)) {
220
276
    LastQual = Qual;
221
276
    Qual = Qual->Next;
222
276
  }
223
516
  if (LastQual && Qual != LastQual) {
224
216
    rotateTokens(SourceMgr, Fixes, Tok, LastQual, /*Left=*/false);
225
216
    Tok = LastQual;
226
300
  } else if (Tok->startsSequence(QualifierType, tok::identifier,
227
300
                                 TT_TemplateCloser)) {
228
6
    FormatToken *Closer = Tok->Next->Next;
229
6
    rotateTokens(SourceMgr, Fixes, Tok, Tok->Next, /*Left=*/false);
230
6
    Tok = Closer;
231
6
    return Tok;
232
294
  } else if (Tok->startsSequence(QualifierType, tok::identifier,
233
294
                                 TT_TemplateOpener)) {
234
    // Read from the TemplateOpener to
235
    // TemplateCloser as in const ArrayRef<int> a; const ArrayRef<int> &a;
236
53
    FormatToken *EndTemplate = Tok->Next->Next->MatchingParen;
237
53
    if (EndTemplate) {
238
      // Move to the end of any template class members e.g.
239
      // `Foo<int>::iterator`.
240
53
      if (EndTemplate->startsSequence(TT_TemplateCloser, tok::coloncolon,
241
53
                                      tok::identifier))
242
9
        EndTemplate = EndTemplate->Next->Next;
243
53
    }
244
53
    if (EndTemplate && EndTemplate->Next &&
245
53
        !EndTemplate->Next->isOneOf(tok::equal, tok::l_paren)) {
246
46
      insertQualifierAfter(SourceMgr, Fixes, EndTemplate, Qualifier);
247
      // Remove the qualifier.
248
46
      removeToken(SourceMgr, Fixes, Tok);
249
46
      return Tok;
250
46
    }
251
241
  } else if (Tok->startsSequence(QualifierType, tok::identifier)) {
252
96
    FormatToken *Next = Tok->Next;
253
    // The case  `const Foo` -> `Foo const`
254
    // The case  `const Foo *` -> `Foo const *`
255
    // The case  `const Foo &` -> `Foo const &`
256
    // The case  `const Foo &&` -> `Foo const &&`
257
    // The case  `const std::Foo &&` -> `std::Foo const &&`
258
    // The case  `const std::Foo<T> &&` -> `std::Foo<T> const &&`
259
245
    while (Next && 
Next->isOneOf(tok::identifier, tok::coloncolon)242
)
260
149
      Next = Next->Next;
261
96
    if (Next && 
Next->is(TT_TemplateOpener)93
) {
262
8
      Next = Next->MatchingParen;
263
      // Move to the end of any template class members e.g.
264
      // `Foo<int>::iterator`.
265
8
      if (Next && Next->startsSequence(TT_TemplateCloser, tok::coloncolon,
266
8
                                       tok::identifier))
267
0
        return Tok;
268
8
      assert(Next && "Missing template opener");
269
0
      Next = Next->Next;
270
8
    }
271
96
    if (Next && 
Next->isOneOf(tok::star, tok::amp, tok::ampamp)93
&&
272
96
        
!Tok->Next->isOneOf(Keywords.kw_override, Keywords.kw_final)26
) {
273
26
      if (Next->Previous && !Next->Previous->is(QualifierType)) {
274
26
        insertQualifierAfter(SourceMgr, Fixes, Next->Previous, Qualifier);
275
26
        removeToken(SourceMgr, Fixes, Tok);
276
26
      }
277
26
      return Next;
278
26
    }
279
96
  }
280
281
438
  return Tok;
282
516
}
283
284
const FormatToken *LeftRightQualifierAlignmentFixer::analyzeLeft(
285
    const SourceManager &SourceMgr, const AdditionalKeywords &Keywords,
286
    tooling::Replacements &Fixes, const FormatToken *Tok,
287
9.38k
    const std::string &Qualifier, tok::TokenKind QualifierType) {
288
  // if Tok is an identifier and possibly a macro then don't convert.
289
9.38k
  if (LeftRightQualifierAlignmentFixer::isPossibleMacro(Tok))
290
83
    return Tok;
291
292
9.30k
  const FormatToken *Qual = Tok;
293
9.30k
  const FormatToken *LastQual = Qual;
294
13.4k
  while (Qual && isQualifierOrType(Qual, ConfiguredQualifierTokens)) {
295
4.50k
    LastQual = Qual;
296
4.50k
    Qual = Qual->Next;
297
4.50k
    if (Qual && Qual->is(QualifierType))
298
367
      break;
299
4.50k
  }
300
301
9.30k
  if (!Qual)
302
0
    return Tok;
303
304
9.30k
  if (LastQual && Qual != LastQual && 
Qual->is(QualifierType)2.92k
) {
305
367
    rotateTokens(SourceMgr, Fixes, Tok, Qual, /*Left=*/true);
306
367
    if (!Qual->Next)
307
6
      return Tok;
308
361
    Tok = Qual->Next;
309
8.93k
  } else if (Tok->startsSequence(tok::identifier, QualifierType)) {
310
25
    if (Tok->Next->Next && Tok->Next->Next->isOneOf(tok::identifier, tok::star,
311
25
                                                    tok::amp, tok::ampamp)) {
312
      // Don't swap `::iterator const` to `::const iterator`.
313
2
      if (!Tok->Previous ||
314
2
          (Tok->Previous && !Tok->Previous->is(tok::coloncolon))) {
315
2
        rotateTokens(SourceMgr, Fixes, Tok, Tok->Next, /*Left=*/true);
316
2
        Tok = Tok->Next;
317
2
      }
318
23
    } else if (Tok->startsSequence(tok::identifier, QualifierType,
319
23
                                   TT_TemplateCloser)) {
320
8
      FormatToken *Closer = Tok->Next->Next;
321
8
      rotateTokens(SourceMgr, Fixes, Tok, Tok->Next, /*Left=*/true);
322
8
      Tok = Closer;
323
8
    }
324
25
  }
325
9.29k
  if (Tok->is(TT_TemplateOpener) && 
Tok->Next680
&&
326
9.29k
      
(680
Tok->Next->is(tok::identifier)680
||
Tok->Next->isSimpleTypeSpecifier()366
) &&
327
9.29k
      
Tok->Next->Next494
&&
Tok->Next->Next->is(QualifierType)494
)
328
14
    rotateTokens(SourceMgr, Fixes, Tok->Next, Tok->Next->Next, /*Left=*/true);
329
9.29k
  if (Tok->startsSequence(tok::identifier) && 
Tok->Next2.93k
) {
330
2.93k
    if (Tok->Previous &&
331
2.93k
        
Tok->Previous->isOneOf(tok::star, tok::ampamp, tok::amp)2.76k
)
332
501
      return Tok;
333
2.42k
    const FormatToken *Next = Tok->Next;
334
    // The case  `std::Foo<T> const` -> `const std::Foo<T> &&`
335
2.90k
    while (Next && 
Next->isOneOf(tok::identifier, tok::coloncolon)2.89k
)
336
478
      Next = Next->Next;
337
2.42k
    if (Next && 
Next->Previous2.41k
&&
338
2.42k
        
Next->Previous->startsSequence(tok::identifier, TT_TemplateOpener)2.41k
) {
339
      // Read from to the end of the TemplateOpener to
340
      // TemplateCloser const ArrayRef<int> a; const ArrayRef<int> &a;
341
701
      if (Next->is(tok::comment) && 
Next->getNextNonComment()36
)
342
36
        Next = Next->getNextNonComment();
343
701
      assert(Next->MatchingParen && "Missing template closer");
344
0
      Next = Next->MatchingParen;
345
346
      // If the template closer is closing the requires clause,
347
      // then stop and go back to the TemplateOpener and do whatever is
348
      // inside the <>.
349
701
      if (Next->ClosesRequiresClause)
350
6
        return Next->MatchingParen;
351
695
      Next = Next->Next;
352
353
      // Move to the end of any template class members e.g.
354
      // `Foo<int>::iterator`.
355
695
      if (Next && 
Next->startsSequence(tok::coloncolon, tok::identifier)647
)
356
72
        Next = Next->Next->Next;
357
695
      if (Next && 
Next->is(QualifierType)647
) {
358
        // Move the qualifier.
359
30
        insertQualifierBefore(SourceMgr, Fixes, Tok, Qualifier);
360
30
        removeToken(SourceMgr, Fixes, Next);
361
30
        return Next;
362
30
      }
363
695
    }
364
2.39k
    if (Next && 
Next->Next2.33k
&&
365
2.39k
        
Next->Next->isOneOf(tok::amp, tok::ampamp, tok::star)1.46k
) {
366
153
      if (Next->is(QualifierType)) {
367
        // Move the qualifier.
368
4
        insertQualifierBefore(SourceMgr, Fixes, Tok, Qualifier);
369
4
        removeToken(SourceMgr, Fixes, Next);
370
4
        return Next;
371
4
      }
372
153
    }
373
2.39k
  }
374
8.75k
  return Tok;
375
9.29k
}
376
377
tok::TokenKind LeftRightQualifierAlignmentFixer::getTokenFromQualifier(
378
4.76k
    const std::string &Qualifier) {
379
  // Don't let 'type' be an identifier, but steal typeof token.
380
4.76k
  return llvm::StringSwitch<tok::TokenKind>(Qualifier)
381
4.76k
      .Case("type", tok::kw_typeof)
382
4.76k
      .Case("const", tok::kw_const)
383
4.76k
      .Case("volatile", tok::kw_volatile)
384
4.76k
      .Case("static", tok::kw_static)
385
4.76k
      .Case("inline", tok::kw_inline)
386
4.76k
      .Case("constexpr", tok::kw_constexpr)
387
4.76k
      .Case("restrict", tok::kw_restrict)
388
4.76k
      .Default(tok::identifier);
389
4.76k
}
390
391
LeftRightQualifierAlignmentFixer::LeftRightQualifierAlignmentFixer(
392
    const Environment &Env, const FormatStyle &Style,
393
    const std::string &Qualifier,
394
    const std::vector<tok::TokenKind> &QualifierTokens, bool RightAlign)
395
    : TokenAnalyzer(Env, Style), Qualifier(Qualifier), RightAlign(RightAlign),
396
2.28k
      ConfiguredQualifierTokens(QualifierTokens) {}
397
398
std::pair<tooling::Replacements, unsigned>
399
LeftRightQualifierAlignmentFixer::analyze(
400
    TokenAnnotator & /*Annotator*/,
401
    SmallVectorImpl<AnnotatedLine *> &AnnotatedLines,
402
2.41k
    FormatTokenLexer &Tokens) {
403
2.41k
  tooling::Replacements Fixes;
404
2.41k
  const AdditionalKeywords &Keywords = Tokens.getKeywords();
405
2.41k
  const SourceManager &SourceMgr = Env.getSourceManager();
406
2.41k
  AffectedRangeMgr.computeAffectedLines(AnnotatedLines);
407
408
2.41k
  tok::TokenKind QualifierToken = getTokenFromQualifier(Qualifier);
409
2.41k
  assert(QualifierToken != tok::identifier && "Unrecognised Qualifier");
410
411
5.67k
  for (AnnotatedLine *Line : AnnotatedLines) {
412
5.67k
    if (Line->InPPDirective)
413
804
      continue;
414
4.86k
    FormatToken *First = Line->First;
415
4.86k
    assert(First);
416
4.86k
    if (First->Finalized)
417
18
      continue;
418
419
4.85k
    const auto *Last = Line->Last;
420
421
20.0k
    for (const auto *Tok = First; Tok && 
Tok != Last20.0k
&&
Tok->Next15.1k
;
422
15.1k
         Tok = Tok->Next) {
423
15.1k
      if (Tok->is(tok::comment))
424
114
        continue;
425
15.0k
      if (RightAlign)
426
5.66k
        Tok = analyzeRight(SourceMgr, Keywords, Fixes, Tok, Qualifier,
427
5.66k
                           QualifierToken);
428
9.38k
      else
429
9.38k
        Tok = analyzeLeft(SourceMgr, Keywords, Fixes, Tok, Qualifier,
430
9.38k
                          QualifierToken);
431
15.0k
    }
432
4.85k
  }
433
2.41k
  return {Fixes, 0};
434
2.41k
}
435
436
void QualifierAlignmentFixer::PrepareLeftRightOrdering(
437
    const std::vector<std::string> &Order, std::vector<std::string> &LeftOrder,
438
    std::vector<std::string> &RightOrder,
439
805
    std::vector<tok::TokenKind> &Qualifiers) {
440
441
  // Depending on the position of type in the order you need
442
  // To iterate forward or backward through the order list as qualifier
443
  // can push through each other.
444
  // The Order list must define the position of "type" to signify
445
805
  assert(llvm::is_contained(Order, "type") &&
446
805
         "QualifierOrder must contain type");
447
  // Split the Order list by type and reverse the left side.
448
449
0
  bool left = true;
450
3.02k
  for (const auto &s : Order) {
451
3.02k
    if (s == "type") {
452
805
      left = false;
453
805
      continue;
454
805
    }
455
456
2.22k
    tok::TokenKind QualifierToken =
457
2.22k
        LeftRightQualifierAlignmentFixer::getTokenFromQualifier(s);
458
2.22k
    if (QualifierToken != tok::kw_typeof && QualifierToken != tok::identifier)
459
2.22k
      Qualifiers.push_back(QualifierToken);
460
461
2.22k
    if (left)
462
      // Reverse the order for left aligned items.
463
1.50k
      LeftOrder.insert(LeftOrder.begin(), s);
464
719
    else
465
719
      RightOrder.push_back(s);
466
2.22k
  }
467
805
}
468
469
bool LeftRightQualifierAlignmentFixer::isQualifierOrType(
470
14.2k
    const FormatToken *Tok, const std::vector<tok::TokenKind> &specifiedTypes) {
471
14.2k
  return Tok && (Tok->isSimpleTypeSpecifier() || 
Tok->is(tok::kw_auto)11.9k
||
472
14.2k
                 
llvm::is_contained(specifiedTypes, Tok->Tok.getKind())11.8k
);
473
14.2k
}
474
475
// If a token is an identifier and it's upper case, it could
476
// be a macro and hence we need to be able to ignore it.
477
9.91k
bool LeftRightQualifierAlignmentFixer::isPossibleMacro(const FormatToken *Tok) {
478
9.91k
  if (!Tok)
479
0
    return false;
480
9.91k
  if (!Tok->is(tok::identifier))
481
6.81k
    return false;
482
3.09k
  if (Tok->TokenText.upper() == Tok->TokenText.str())
483
    // T,K,U,V likely could be template arguments
484
583
    return (Tok->TokenText.size() != 1);
485
2.51k
  return false;
486
3.09k
}
487
488
} // namespace format
489
} // namespace clang