[clang] [clang][dataflow] Add `Environment::get<>()`. (PR #76027)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 20 08:52:12 PST 2023
================
@@ -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);
----------------
Xazax-hun wrote:
+1, alternatively we could introduce a bool template argument that would determine whether `null` is allowed with a default value.
https://github.com/llvm/llvm-project/pull/76027
More information about the cfe-commits
mailing list