dblaikie accepted this revision.
dblaikie added a comment.
Seems unfortunate that attributes on types are only available through TypeLocs
rather than through sugar (like if we used a typedef it'd be visible in the
type sugar, but not if it's written on the type usage itself) - but that's
above my domain knowledge here & I'll take it there are some good reasons for
that to be the way it is.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1426
+ TypeLoc RetTL;
+ if (!TL.isNull()) {
+ if (auto FTL = TL.getAs<FunctionTypeLoc>())
----------------
I'm /guessing/ this can be rewritten as:
```
if (TL)
```
? (similarly elsewhere in this patch)
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1440-1441
+ bool DoneWithTL = false;
+ if (!TL.isNull()) {
+ if (auto FTL = TL.getAs<FunctionTypeLoc>()) {
+ DoneWithTL = true;
----------------
Is this null check necessary, or does "getAs" return null if the underlying
value is null already anyway? (oh, and this would apply above as well)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111199/new/
https://reviews.llvm.org/D111199
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits