================
@@ -222,12 +222,7 @@ class StdVariantChecker : public Checker<eval::Call, 
check::RegionChanges> {
   bool handleStdGetCall(const CallEvent &Call, CheckerContext &C) const {
     ProgramStateRef State = C.getState();
 
-    SVal ArgSVal = Call.getArgSVal(0);
-    if (ArgSVal.isUnknown())
-      return false;
-
-    const auto &ArgType =
-        ArgSVal.getType(C.getASTContext())->getPointeeType().getTypePtr();
+    const auto *ArgType = Call.getArgExpr(0)->getType().getTypePtr();
----------------
steakhal wrote:

This line changes the semantics of how we check the type.
Previously, `ArgType` referred to the type of the pointee.
After this change, it refers to the argument type directly - not to the 
derferenced (pointee) type.
Or is it because the ArgSVal was a MemRegion, thus it had an implicit pointee 
in its type? - I suspect this is the only explanation why the code change 
didn't break any of the tests.

If this would be the case, then this construct is strictly better than what it 
was - I like it.

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

Reply via email to