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

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 12 14:49:37 PDT 2025


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

@AaronBallman it feels like it makes sense to sink this into `Scope` just like `isInObjCMethodScope()`

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


More information about the cfe-commits mailing list