================
@@ -489,8 +489,7 @@ Environment Environment::pushCall(const CallExpr *Call) 
const {
   if (const auto *MethodCall = dyn_cast<CXXMemberCallExpr>(Call)) {
     if (const Expr *Arg = MethodCall->getImplicitObjectArgument()) {
       if (!isa<CXXThisExpr>(Arg))
-          Env.ThisPointeeLoc =
-              cast<RecordStorageLocation>(getStorageLocation(*Arg));
+        Env.ThisPointeeLoc = get<RecordStorageLocation>(*Arg);
----------------
martinboehme wrote:

PS Just an additional note: I think the default behavior (i.e. `get` with 
default argument / without a suffix such as `MustExist`) should be to allow 
null because it's almost always the right choice in production code (i.e. 
production code should be prepared to handle situations where we don't have a 
`Value` or `StorageLocation`).

https://github.com/llvm/llvm-project/pull/76027
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to