summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2018-04-25 02:42:26 +0000
committerFaisal Vali <faisalv@yahoo.com>2018-04-25 02:42:26 +0000
commit936de9d666009ddce7bedc5b073bc06c860d5f5b (patch)
tree440e812f02457e38b03ebed89c36ecfc22a052a3 /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
parente21278d93805689c5e5d6bb1d52a8d907fd7ba5c (diff)
downloadbcm5719-llvm-936de9d666009ddce7bedc5b073bc06c860d5f5b.tar.gz
bcm5719-llvm-936de9d666009ddce7bedc5b073bc06c860d5f5b.zip
[c++2a] [concepts] Add rudimentary parsing support for template concept declarations
This patch is a tweak of changyu's patch: https://reviews.llvm.org/D40381. It differs in that the recognition of the 'concept' token is moved into the machinery that recognizes declaration-specifiers - this allows us to leverage the attribute handling machinery more seamlessly. See the test file to get a sense of the basic parsing that this patch supports. There is much more work to be done before concepts are usable... Thanks Changyu! llvm-svn: 330794
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index a7883c67b80..0ebcb03ca32 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -3073,6 +3073,11 @@ Decl *TemplateDeclInstantiator::VisitFriendTemplateDecl(FriendTemplateDecl *D) {
return nullptr;
}
+Decl *TemplateDeclInstantiator::VisitConceptDecl(ConceptDecl *D) {
+ llvm_unreachable("Concept definitions cannot reside inside a template");
+ return nullptr;
+}
+
Decl *TemplateDeclInstantiator::VisitDecl(Decl *D) {
llvm_unreachable("Unexpected decl");
}
OpenPOWER on IntegriCloud