hintonda created this revision. hintonda added reviewers: doug.gregor, rnk. hintonda added a subscriber: cfe-commits.
Fixes crash referenced in PR25181 where dyn_cast is called on a null instance of LM.Method. http://reviews.llvm.org/D17072 Files: lib/Parse/ParseCXXInlineMethods.cpp Index: lib/Parse/ParseCXXInlineMethods.cpp =================================================================== --- lib/Parse/ParseCXXInlineMethods.cpp +++ lib/Parse/ParseCXXInlineMethods.cpp @@ -293,6 +293,7 @@ } void Parser::ParseLexedMethodDeclaration(LateParsedMethodDeclaration &LM) { + if(!LM.Method) return; // If this is a member template, introduce the template parameter scope. ParseScope TemplateScope(this, Scope::TemplateParamScope, LM.TemplateScope); TemplateParameterDepthRAII CurTemplateDepthTracker(TemplateParameterDepth);
Index: lib/Parse/ParseCXXInlineMethods.cpp =================================================================== --- lib/Parse/ParseCXXInlineMethods.cpp +++ lib/Parse/ParseCXXInlineMethods.cpp @@ -293,6 +293,7 @@ } void Parser::ParseLexedMethodDeclaration(LateParsedMethodDeclaration &LM) { + if(!LM.Method) return; // If this is a member template, introduce the template parameter scope. ParseScope TemplateScope(this, Scope::TemplateParamScope, LM.TemplateScope); TemplateParameterDepthRAII CurTemplateDepthTracker(TemplateParameterDepth);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits