================
@@ -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;
   StringRef amdgpuAVMode;
----------------
erichkeane wrote:

>Am I understanding this correctly?

Yep, exactly the problem.

>And a follow-up would be - do you think this should apply to all the other 
>statement attributes then?

Yes, I do.  Even if we can't test them (we should still try to come up with 
test examples for htem, but I would understand if we don't have that ability 
with some of them do to how they are constructed: we should still make sure we 
don't overwrite them, even if it is a no-op), we need to make sure we don't 
change the value of ANY of the attributes because of it.



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

Reply via email to