]> granicus.if.org Git - clang/commit
[c++2a] [concepts] Add rudimentary parsing support for template concept declarations
authorFaisal Vali <faisalv@yahoo.com>
Wed, 25 Apr 2018 02:42:26 +0000 (02:42 +0000)
committerFaisal Vali <faisalv@yahoo.com>
Wed, 25 Apr 2018 02:42:26 +0000 (02:42 +0000)
commit45d663da5615045d3c2da1b97ef06319055deb42
tree985c65f7cadf4c48303264e03a14e0bbb2ec286e
parente4c4fc5523dfcbad4efc78103cbb51ba34613f53
[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!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330794 91177308-0d34-0410-b5e6-96231b3b80d8
33 files changed:
include/clang/AST/DeclTemplate.h
include/clang/AST/RecursiveASTVisitor.h
include/clang/Basic/DeclNodes.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/TemplateKinds.h
include/clang/Parse/Parser.h
include/clang/Sema/DeclSpec.h
include/clang/Sema/Sema.h
include/clang/Serialization/ASTBitCodes.h
lib/AST/ASTDumper.cpp
lib/AST/DeclBase.cpp
lib/AST/DeclTemplate.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CodeGenModule.cpp
lib/Parse/ParseDecl.cpp
lib/Parse/ParseDeclCXX.cpp
lib/Parse/ParseObjc.cpp
lib/Parse/ParseTemplate.cpp
lib/Parse/ParseTentative.cpp
lib/Parse/Parser.cpp
lib/Sema/DeclSpec.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
lib/Serialization/ASTCommon.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriter.cpp
lib/Serialization/ASTWriterDecl.cpp
test/Parser/cxx-concept-declaration.cpp [deleted file]
test/Parser/cxx2a-concept-declaration.cpp [new file with mode: 0644]
tools/libclang/CIndex.cpp