[clang] [Clang] Diagnose conflict between always_inline/noinline attributes (PR #215173)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 05:59:12 PDT 2026


================
@@ -779,10 +779,10 @@ void CodeGenFunction::EmitLabelStmt(const LabelStmt &S) {
 }
 
 void CodeGenFunction::EmitAttributedStmt(const AttributedStmt &S) {
-  bool nomerge = false;
-  bool noinline = false;
-  bool alwaysinline = false;
-  bool noconvergent = false;
+  bool nomerge = InNoMergeAttributedStmt;
+  bool noinline = InNoInlineAttributedStmt;
+  bool alwaysinline = InAlwaysInlineAttributedStmt;
+  bool noconvergent = InNoConvergentAttributedStmt;
----------------
erichkeane wrote:

A similar one for noconvergent would be nice as well (plus the inverse, that nomerge/noconvergent doesn't clobber noinline).

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


More information about the cfe-commits mailing list