Skip to content

Commit 6c264c2

Browse files
committed
format
1 parent 6808222 commit 6c264c2

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

clang/lib/Sema/SemaBoundsSafety.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,24 +244,30 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes,
244244

245245
// FIXME: for some reason diagnostics highlight the end character, while
246246
// getSourceText() does not include the end character.
247-
static SourceRange getAttrNameRangeImpl(const ASTContext &Ctx, SourceLocation Begin,
247+
static SourceRange getAttrNameRangeImpl(const ASTContext &Ctx,
248+
SourceLocation Begin,
248249
bool IsForDiagnostics) {
249250
const SourceManager &SM = Ctx.getSourceManager();
250251
SourceLocation TokenStart = Begin;
251252
while (TokenStart.isMacroID())
252253
TokenStart = SM.getImmediateExpansionRange(TokenStart).getBegin();
253254
unsigned Offset = IsForDiagnostics ? 1 : 0;
254-
SourceLocation End = Lexer::getLocForEndOfToken(TokenStart, Offset, SM, Ctx.getLangOpts());
255+
SourceLocation End =
256+
Lexer::getLocForEndOfToken(TokenStart, Offset, SM, Ctx.getLangOpts());
255257
return {TokenStart, End};
256258
}
257259

258-
StringRef BoundsAttributedTypeLoc::getAttrNameAsWritten(const ASTContext &Ctx) const {
259-
SourceRange Range = getAttrNameRangeImpl(Ctx, getAttrRange().getBegin(), false);
260+
StringRef
261+
BoundsAttributedTypeLoc::getAttrNameAsWritten(const ASTContext &Ctx) const {
262+
SourceRange Range =
263+
getAttrNameRangeImpl(Ctx, getAttrRange().getBegin(), false);
260264
CharSourceRange NameRange = CharSourceRange::getCharRange(Range);
261-
return Lexer::getSourceText(NameRange, Ctx.getSourceManager(), Ctx.getLangOpts());
265+
return Lexer::getSourceText(NameRange, Ctx.getSourceManager(),
266+
Ctx.getLangOpts());
262267
}
263268

264-
SourceRange BoundsAttributedTypeLoc::getAttrNameRange(const ASTContext &Ctx) const {
269+
SourceRange
270+
BoundsAttributedTypeLoc::getAttrNameRange(const ASTContext &Ctx) const {
265271
return getAttrNameRangeImpl(Ctx, getAttrRange().getBegin(), true);
266272
}
267273

0 commit comments

Comments
 (0)