summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-05-12 00:24:19 +0000
committerBill Wendling <isanbard@gmail.com>2012-05-12 00:24:19 +0000
commitc5606e3ec92c3aa525d46638bc92b0a7c2b442e5 (patch)
treea283e64afefb651f21c8d218bbb30ed1de65288a
parent917e5e1b010c466027ade2031c3905fabb4ebe22 (diff)
downloadllvm-c5606e3ec92c3aa525d46638bc92b0a7c2b442e5.tar.gz
Merging r155788:
------------------------------------------------------------------------ r155788 | rsmith | 2012-04-29 00:31:09 -0700 (Sun, 29 Apr 2012) | 4 lines PR12688: ParseCXXClassMemberDeclaration's sometimes-null ThisDecl takes another victim. Don't crash if we have a delay-parsed exception specification for a class member which is invalid in a way which precludes building a FunctionDecl. ------------------------------------------------------------------------ llvm-svn: 156676
-rw-r--r--clang/lib/Parse/ParseDeclCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp
index b9b51d751822..de777ca14ea3 100644
--- a/clang/lib/Parse/ParseDeclCXX.cpp
+++ b/clang/lib/Parse/ParseDeclCXX.cpp
@@ -2065,7 +2065,7 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
DeclsInGroup.push_back(ThisDecl);
}
- if (DeclaratorInfo.isFunctionDeclarator() &&
+ if (ThisDecl && DeclaratorInfo.isFunctionDeclarator() &&
DeclaratorInfo.getDeclSpec().getStorageClassSpec()
!= DeclSpec::SCS_typedef) {
HandleMemberFunctionDeclDelays(DeclaratorInfo, ThisDecl);