================
@@ -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);
   }
----------------
NeKon69 wrote:

Yeah, I thought it would make sense to make the returned value a bit more 
ambiguous rather than having to deal with a union on every call site. If you 
have a strong feeling about this, let me know.

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

Reply via email to