From 18479d491dead63c0b9f3b6cecfe32e665fcf2d0 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sat, 12 May 2012 00:24:19 +0000 Subject: 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. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156676 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/ParseDeclCXX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index b9b51d7518..de777ca14e 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/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); -- cgit v1.2.3