summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseCXXInlineMethods.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-02-19 01:15:08 +0000
committerReid Kleckner <rnk@google.com>2016-02-19 01:15:08 +0000
commitbde5ede5261062a838d57651ace09c35d3ebcdc8 (patch)
tree4070db14f921b90df9ee1ff8ac2b0cef55ee9ac6 /clang/lib/Parse/ParseCXXInlineMethods.cpp
parenteafc693c900917fc4933f7f2360ca8bb5a31dd39 (diff)
downloadbcm5719-llvm-bde5ede5261062a838d57651ace09c35d3ebcdc8.tar.gz
bcm5719-llvm-bde5ede5261062a838d57651ace09c35d3ebcdc8.zip
[Sema] PR25181 Fix crash when method declaration with throw spec fails to parse correctly
Fixes crash referenced in PR25181 where dyn_cast is called on a null instance of LM.Method. Reviewers: majnemer, rnk Patch by Don Hinton Differential Revision: http://reviews.llvm.org/D17072 llvm-svn: 261292
Diffstat (limited to 'clang/lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r--clang/lib/Parse/ParseCXXInlineMethods.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp
index 89ef35c88bb..07e32b7e42c 100644
--- a/clang/lib/Parse/ParseCXXInlineMethods.cpp
+++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp
@@ -52,7 +52,8 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS,
}
}
- HandleMemberFunctionDeclDelays(D, FnD);
+ if (FnD)
+ HandleMemberFunctionDeclDelays(D, FnD);
D.complete(FnD);
OpenPOWER on IntegriCloud