summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExceptionSpec.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-06-25 01:55:41 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-06-25 01:55:41 +0000
commitf9b4fea4bf6cebe614e49ab4b582dcf4bf0a6806 (patch)
tree4a51631223f5384a4bc524099208c489a911d5f5 /lib/Sema/SemaExceptionSpec.cpp
parentfdf137b9073aa52423183fe886d072bc3b7d3889 (diff)
Fix regression from r184810.
Specifically, CallExpr::getCalleeDecl() can return null, so make sure to handle that correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExceptionSpec.cpp')
-rw-r--r--lib/Sema/SemaExceptionSpec.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp
index 836385d031..0385c7783e 100644
--- a/lib/Sema/SemaExceptionSpec.cpp
+++ b/lib/Sema/SemaExceptionSpec.cpp
@@ -895,8 +895,10 @@ CanThrowResult Sema::canThrow(const Expr *E) {
CT = CT_Dependent;
else if (isa<CXXPseudoDestructorExpr>(CE->getCallee()->IgnoreParens()))
CT = CT_Cannot;
- else
+ else if (CE->getCalleeDecl())
CT = canCalleeThrow(*this, E, CE->getCalleeDecl());
+ else
+ CT = CT_Can;
if (CT == CT_Can)
return CT;
return mergeCanThrow(CT, canSubExprsThrow(*this, E));