================
@@ -2332,6 +2332,20 @@ ExprResult Sema::BuildLambdaExpr(SourceLocation StartLoc,
     maybeAddDeclWithEffects(LSI->CallOperator);
   }
 
+  // This is for GCC compatibility. If any lambda captures are actually used 
in the
+  // function body. GCC silently removes the naked attribute when captures are
----------------
efriedma-quic wrote:

Regardless of what gcc does here, silently ignoring the naked attribute is not 
acceptable: the result will almost certainly be broken.

Probably simplest to just reject any usage of naked with captures; if gcc's 
behavior is broken, probably nobody is using it.

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

Reply via email to