Fixes crash referenced in PR25181 where dyn_cast is called on a null instance of LM.Method.
Details
Details
- Reviewers
rnk doug.gregor - Commits
- rGbde5ede52610: [Sema] PR25181 Fix crash when method declaration with throw spec fails to parse…
rC261292: [Sema] PR25181 Fix crash when method declaration with throw spec fails to parse…
rL261292: [Sema] PR25181 Fix crash when method declaration with throw spec fails to…
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I don't have commit access, so if this patch is accepted, could someone please commit it for me?
Comment Actions
- Only call HandleMemberFunctionDeclDelays() for valid NamedDecl pointers.
HandleMemberFunctionDeclDelays() adds LateParsedMethodDeclaration elements to LateParsedDeclarations if the method has default args or exception-specifications. If null Methods are added, they will assert when cast in ParseLexedMethodDeclaration().
Comment Actions
Looks good, thanks. I like the new approach of avoiding the creation of a LateParsedMethodDeclaration if we couldn't get a NamedDecl back. I'll land it soon.