================
@@ -159,8 +165,10 @@ class AccessPath {
return dyn_cast<const PlaceholderBase *>(Base);
}
- const clang::CXXNewExpr *getAsNewAllocation() const {
- return dyn_cast<const clang::CXXNewExpr *>(Base);
+ /// Returns the allocation expression that created this loan: a
+ /// `CXXNewExpr` or an allocating call.
+ const clang::Expr *getAsAllocation() const {
+ return dyn_cast<const clang::Expr *>(Base);
}
----------------
steakhal wrote:
That's fine. I figured - I just wanted to let the door open if all the
callsites dyncast anyway, then it would be cleaner this way.
I feel more strongly about the comment change, hence that is the suggestion. I
feel like singling out `CXXNewExpr` over a plan "call" term felt inequal to me
:D
https://github.com/llvm/llvm-project/pull/213439
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits