[clang] [clang][Sema] Fixed Compound Literal is not Constant Expression (PR #143852)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 13 12:04:39 PDT 2025


================
@@ -7219,6 +7219,17 @@ Sema::ActOnCompoundLiteral(SourceLocation LParenLoc, ParsedType Ty,
   return BuildCompoundLiteralExpr(LParenLoc, TInfo, RParenLoc, InitExpr);
 }
 
+static bool IsInsideFunction(Scope *S) {
----------------
AaronBallman wrote:

I can go either way. This is currently the first time we've needed this, so a static function makes sense. But if we need this a second time, then absolutely agreed it should be hoisted into `Scope`. WDYT?

https://github.com/llvm/llvm-project/pull/143852


More information about the cfe-commits mailing list