]> granicus.if.org Git - clang/commitdiff
Fix suspicous isIntegerType() check, found by PVS Studio (PR12357).
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 28 May 2012 21:01:59 +0000 (21:01 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 28 May 2012 21:01:59 +0000 (21:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157593 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h

index 2acb5c11c5637954195ea3ae853a8f53c02b9c58..8856c825d9f625b3ce4aaf6461ddaf5db16a891c 100644 (file)
@@ -78,7 +78,7 @@ public:
     // FIXME: Remove the second disjunct when we support symbolic
     // truncation/extension.
     return (Context.getCanonicalType(Ty1) == Context.getCanonicalType(Ty2) ||
-            (Ty2->isIntegerType() && Ty2->isIntegerType()));
+            (Ty1->isIntegerType() && Ty2->isIntegerType()));
   }
 
   SVal evalCast(SVal val, QualType castTy, QualType originalType);