================
@@ -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;
----------------
ketjandr wrote:
Ahh I get what you're saying now... so if we have instead
```
[[musttail]]
return outer_fn(({
inner_fn();
}));
```
`MustTailCall` still remains preserved (pointing to `outer_fn`) as we recurse
inside the stmt-expr, as opposed to
```
[[musttail]]
return outer_fn(({
[[always_inline]]
inner_fn();
}));
```
which will clobber `MustTailCall` since `always_inline` saves it as `nullptr`.
So the intended behavior should be as if `always_inline` isn't there. Am I
understanding this correctly?
And a follow-up would be - do you think this should apply to all the other
statement attributes then?
https://github.com/llvm/llvm-project/pull/215173
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits