================
@@ -528,7 +553,16 @@ void UnwrappedLineParser::calculateBraceTypes(bool 
ExpectClassBody) {
           Tok->setBlockKind(BK_Block);
         }
       } else {
-        Tok->setBlockKind(BK_Unknown);
+        // In macro bodies we try to keep compound literal expressions like
----------------
HazardyKnusperkeks wrote:

Yeah I know, but can we chime in, where the type is set to `TT_FunctionLBrace` 
in `TokenAnnotator` and perform the magic there? It would collapse to some 
`if`s, and two hops through `MatchingParen`, and two `getPreviousNonComment()` 
vs. this loop.

https://github.com/llvm/llvm-project/pull/173771
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to