diff options
author | Owen Pan <owenpiano@gmail.com> | 2025-02-16 19:30:33 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-16 19:30:33 -0800 |
commit | 885382f4379b3b8060213606a8f7bd8a1750f33a (patch) | |
tree | 46a663a32f681a5fdebf2d47c6988d1812f46b02 /clang/lib/Format/UnwrappedLineParser.cpp | |
parent | 69f3e003bfef75d28af09e2822cb5750fa45c38d (diff) | |
download | llvm-885382f4379b3b8060213606a8f7bd8a1750f33a.zip llvm-885382f4379b3b8060213606a8f7bd8a1750f33a.tar.gz llvm-885382f4379b3b8060213606a8f7bd8a1750f33a.tar.bz2 |
[clang-format] Fix a bug in annotating braces (#127306)
Fixes #107616.
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 4e04018..3a24d72 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -510,7 +510,7 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { break; do { NextTok = Tokens->getNextToken(); - } while (NextTok->NewlinesBefore == 0 && NextTok->isNot(tok::eof)); + } while (!NextTok->HasUnescapedNewline && NextTok->isNot(tok::eof)); while (NextTok->is(tok::comment)) NextTok = Tokens->getNextToken(); |