diff options
author | Vitaly Buka <vitalybuka@google.com> | 2024-04-04 17:49:07 -0700 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2024-04-04 17:49:07 -0700 |
commit | a724510541fc3272c9d4415c89b4549d8d149675 (patch) | |
tree | 5090317c71cf2ae73fb91a32f8dd6f8e037e4603 /clang/lib/Format | |
parent | 2fe88fc8b7a3c27d473b6a172f0dc8aae7be3310 (diff) | |
parent | b76eb1ddfbacda273b8e6a9940f1da6812fdc2e0 (diff) | |
download | llvm-users/vitalybuka/spr/main.rename-remove-traps-to-lower-builtin-hot.zip llvm-users/vitalybuka/spr/main.rename-remove-traps-to-lower-builtin-hot.tar.gz llvm-users/vitalybuka/spr/main.rename-remove-traps-to-lower-builtin-hot.tar.bz2 |
[𝘀𝗽𝗿] changes introduced through rebaseusers/vitalybuka/spr/main.rename-remove-traps-to-lower-builtin-hot
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/Format.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index e41cf29..89e6c19 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -3581,7 +3581,7 @@ cleanupAroundReplacements(StringRef Code, const tooling::Replacements &Replaces, // We need to use lambda function here since there are two versions of // `cleanup`. auto Cleanup = [](const FormatStyle &Style, StringRef Code, - std::vector<tooling::Range> Ranges, + ArrayRef<tooling::Range> Ranges, StringRef FileName) -> tooling::Replacements { return cleanup(Style, Code, Ranges, FileName); }; diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index a405a34..3e9988d 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -3889,6 +3889,8 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const { } } else if (ClosingParen) { for (auto *Tok = ClosingParen->Next; Tok; Tok = Tok->Next) { + if (Tok->is(TT_CtorInitializerColon)) + break; if (Tok->is(tok::arrow)) { Tok->setType(TT_TrailingReturnArrow); break; |