summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit27ae8a28000d61337daad79ab3b7f6ae3013363c (patch)
treebd99ec941ddaae6cc0506775b6c348c6f88edf58 /clang/lib
parentb9116e69666de1d6da41af6554beb9ceb2835db8 (diff)
downloadbcm5719-llvm-27ae8a28000d61337daad79ab3b7f6ae3013363c.tar.gz
bcm5719-llvm-27ae8a28000d61337daad79ab3b7f6ae3013363c.zip
[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 llvm-svn: 179563
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index c79cf96c4a8..1969d947a44 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud