commit | 29a46e63490176608efe13f13b293a6ce9862059 | [log] [tgz] |
---|---|---|
author | Serge Pavlov <sepavloff@gmail.com> | Sat Aug 10 12:00:21 2013 +0000 |
committer | Serge Pavlov <sepavloff@gmail.com> | Sat Aug 10 12:00:21 2013 +0000 |
tree | 1b53814a74be3087c89c9b704dca2ad31ba34606 | |
parent | c1cef0892e049fcd31084f02d1efdd9985d4dfa4 [diff] [blame] |
Fix to PR16225 (Assert-on-invalid: isa<LabelDecl>(D) && "declaration not instantiated in this scope") Differential Revision: http://llvm-reviews.chandlerc.com/D920 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188137 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index ce7684c..315a405 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -4063,6 +4063,9 @@ isa<TemplateTemplateParmDecl>(D)) return D; + if (D->isInvalidDecl()) + return 0; + // If we didn't find the decl, then we must have a label decl that hasn't // been found yet. Lazily instantiate it and return it now. assert(isa<LabelDecl>(D));