diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2025-12-27 23:23:22 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2026-04-25 14:14:02 +0000 |
| commit | e64bea71c21eb42e97aa615188ba91f6cce0d36d (patch) | |
| tree | 62aa9d1dc27620bdcc0128f6f1ed30a5eac88b54 /contrib/llvm-project/clang/lib/Format/FormatToken.cpp | |
| parent | 770cf0a5f02dc8983a89c6568d741fbc25baa999 (diff) | |
| parent | 294ba569803972323a64670451a82af53c660541 (diff) | |
Diffstat (limited to 'contrib/llvm-project/clang/lib/Format/FormatToken.cpp')
| -rw-r--r-- | contrib/llvm-project/clang/lib/Format/FormatToken.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/llvm-project/clang/lib/Format/FormatToken.cpp b/contrib/llvm-project/clang/lib/Format/FormatToken.cpp index 0d8ae1c4a77e..a32175ecc02b 100644 --- a/contrib/llvm-project/clang/lib/Format/FormatToken.cpp +++ b/contrib/llvm-project/clang/lib/Format/FormatToken.cpp @@ -53,12 +53,13 @@ bool FormatToken::isTypeOrIdentifier(const LangOptions &LangOpts) const { bool FormatToken::isBlockIndentedInitRBrace(const FormatStyle &Style) const { assert(is(tok::r_brace)); + assert(MatchingParen); + assert(MatchingParen->is(tok::l_brace)); if (!Style.Cpp11BracedListStyle || Style.AlignAfterOpenBracket != FormatStyle::BAS_BlockIndent) { return false; } const auto *LBrace = MatchingParen; - assert(LBrace && LBrace->is(tok::l_brace)); if (LBrace->is(BK_BracedInit)) return true; if (LBrace->Previous && LBrace->Previous->is(tok::equal)) |
