aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ExprEngine.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-04-15 22:03:38 +0000
committerJordan Rose <jordan_rose@apple.com>2013-04-15 22:03:38 +0000
commit28117be48de465bc2862a8f4aaab09338be5090b (patch)
tree60d6f68f1455bd0de2f66af77da23e8a8f558963 /lib/StaticAnalyzer/Core/ExprEngine.cpp
parent62165c93f529ba3b714c446e61c561abaee81599 (diff)
[analyzer] Don't assert on a temporary of pointer-to-member type.
While we don't do anything intelligent with pointers-to-members today, it's perfectly legal to need a temporary of pointer-to-member type to, say, pass by const reference. Tweak an assertion to allow this. PR15742 and PR15747 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp
index c79cf96c4a..1969d947a4 100644
--- a/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -181,7 +181,8 @@ ExprEngine::createTemporaryRegionIfNeeded(ProgramStateRef State,
} else {
// We need to create a region no matter what. For sanity, make sure we don't
// try to stuff a Loc into a non-pointer temporary region.
- assert(!V.getAs<Loc>() || Loc::isLocType(Result->getType()));
+ assert(!V.getAs<Loc>() || Loc::isLocType(Result->getType()) ||
+ Result->getType()->isMemberPointerType());
}
ProgramStateManager &StateMgr = State->getStateManager();