[clang] [llvm] [inline] Clone return range attribute on the callsite into inlined call (PR #92666)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Tue May 28 07:29:14 PDT 2024
================
@@ -1444,6 +1445,8 @@ static AttrBuilder IdentifyValidPoisonGeneratingAttributes(CallBase &CB) {
Valid.addAttribute(Attribute::NonNull);
if (CB.hasRetAttr(Attribute::Alignment))
Valid.addAlignmentAttr(CB.getRetAlign());
+ if (CB.hasRetAttr(Attribute::Range))
+ Valid.addRangeAttr(*CB.getRange());
----------------
nikic wrote:
```suggestion
if (std::optional<ConstantRange> Range = CB.getRange())
Valid.addRangeAttr(Range);
```
https://github.com/llvm/llvm-project/pull/92666
More information about the cfe-commits
mailing list