diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-02-18 22:37:06 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-02-18 22:37:06 +0000 |
| commit | 7eff647615f93a9aaff1997e1880b195dc3aabe6 (patch) | |
| tree | ae348c384d518be05d73326fbfc22a1f66eb56d0 /clang/lib/Format/UnwrappedLineParser.cpp | |
| parent | 1e9a9d6d056506b23ad26952df45eaac949385c7 (diff) | |
Vendor import of llvm-project branch release/14.x llvmorg-14.0.0-rc1-74-g4dc3cb8e3255.vendor/llvm-project/llvmorg-14.0.0-rc1-74-g4dc3cb8e3255
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
| -rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 642679128409..2e2293c6d58b 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -3102,7 +3102,8 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { } if (FormatTok->is(tok::l_square)) { FormatToken *Previous = FormatTok->Previous; - if (!Previous || Previous->isNot(tok::r_paren)) { + if (!Previous || + !(Previous->is(tok::r_paren) || Previous->isTypeOrIdentifier())) { // Don't try parsing a lambda if we had a closing parenthesis before, // it was probably a pointer to an array: int (*)[]. if (!tryToParseLambda()) |
