[PATCH] D17072: Return immediatedly if Method is null, otherwise you'll get a crash when dyn_cast is called with a nullptr
don hinton via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 10 08:00:58 PST 2016
hintonda updated this revision to Diff 47456.
hintonda added a comment.
- Reformatted change with clang-format
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,8 @@
}
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17072.47456.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160210/7421fd25/attachment.bin>
More information about the cfe-commits
mailing list