Skip to content

Commit 19f2403

Browse files
committed
[clang-tidy] Reduce indentation. NFC.
llvm-svn: 294974
1 parent 659f92e commit 19f2403

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -269,16 +269,16 @@ void ClangTidyDiagnosticConsumer::finalizeLastError() {
269269
static bool LineIsMarkedWithNOLINT(SourceManager &SM, SourceLocation Loc) {
270270
bool Invalid;
271271
const char *CharacterData = SM.getCharacterData(Loc, &Invalid);
272-
if (!Invalid) {
273-
const char *P = CharacterData;
274-
while (*P != '\0' && *P != '\r' && *P != '\n')
275-
++P;
276-
StringRef RestOfLine(CharacterData, P - CharacterData + 1);
277-
// FIXME: Handle /\bNOLINT\b(\([^)]*\))?/ as cpplint.py does.
278-
if (RestOfLine.find("NOLINT") != StringRef::npos) {
279-
return true;
280-
}
281-
}
272+
if (Invalid)
273+
return false;
274+
275+
const char *P = CharacterData;
276+
while (*P != '\0' && *P != '\r' && *P != '\n')
277+
++P;
278+
StringRef RestOfLine(CharacterData, P - CharacterData + 1);
279+
// FIXME: Handle /\bNOLINT\b(\([^)]*\))?/ as cpplint.py does.
280+
if (RestOfLine.find("NOLINT") != StringRef::npos)
281+
return true;
282282
return false;
283283
}
284284

0 commit comments

Comments
 (0)