commit | a4317709127e3b63c44a34f9fa1c3f8abe6a77a3 | [log] [tgz] |
---|---|---|
author | Ted Kremenek <kremenek@apple.com> | Thu Nov 29 01:03:10 2012 +0000 |
committer | Ted Kremenek <kremenek@apple.com> | Thu Nov 29 01:03:10 2012 +0000 |
tree | 170734a99222de724074204d5c9c921fd8beb352 | |
parent | 9c0466603f2051fec9270686dfcd270630e62530 [diff] |
Change SValBuilder::getConditionType() to return BoolTy in C++. Fixes <rdar://problem/12772656>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168846 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h index 5d72e73..17c6b83 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
@@ -124,7 +124,7 @@ ProgramStateManager &getStateManager() { return StateMgr; } QualType getConditionType() const { - return getContext().IntTy; + return Context.getLangOpts().CPlusPlus ? Context.BoolTy : Context.IntTy; } QualType getArrayIndexType() const {