aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2025-02-16 19:30:33 -0800
committerGitHub <noreply@github.com>2025-02-16 19:30:33 -0800
commit885382f4379b3b8060213606a8f7bd8a1750f33a (patch)
tree46a663a32f681a5fdebf2d47c6988d1812f46b02 /clang/lib/Format/UnwrappedLineParser.cpp
parent69f3e003bfef75d28af09e2822cb5750fa45c38d (diff)
downloadllvm-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.cpp2
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();