]> granicus.if.org Git - clang/commitdiff
Change SValBuilder::getConditionType() to return BoolTy in C++. Fixes <rdar://proble...
authorTed Kremenek <kremenek@apple.com>
Thu, 29 Nov 2012 01:03:10 +0000 (01:03 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 29 Nov 2012 01:03:10 +0000 (01:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168846 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 5d72e73a3d94680aa19f764062da50afa6309973..17c6b8337b3679804644aef44ca824395e790bdb 100644 (file)
@@ -124,7 +124,7 @@ public:
   ProgramStateManager &getStateManager() { return StateMgr; }
   
   QualType getConditionType() const {
-    return  getContext().IntTy;
+    return Context.getLangOpts().CPlusPlus ? Context.BoolTy : Context.IntTy;
   }
   
   QualType getArrayIndexType() const {