diff options
author | Faisal Vali <faisalv@yahoo.com> | 2018-04-25 02:42:26 +0000 |
---|---|---|
committer | Faisal Vali <faisalv@yahoo.com> | 2018-04-25 02:42:26 +0000 |
commit | 45d663da5615045d3c2da1b97ef06319055deb42 (patch) | |
tree | 985c65f7cadf4c48303264e03a14e0bbb2ec286e /lib/Parse/ParseObjc.cpp | |
parent | e4c4fc5523dfcbad4efc78103cbb51ba34613f53 (diff) | |
download | clang-45d663da5615045d3c2da1b97ef06319055deb42.tar.gz |
[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
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 0ac418ad70..203d5e6d0d 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -1490,7 +1490,7 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc, cStyleParamWarned = true; } DeclSpec DS(AttrFactory); - ParseDeclarationSpecifiers(DS); + ParseDeclarationSpecifiersOrConceptDefinition(DS); // Parse the declarator. Declarator ParmDecl(DS, DeclaratorContext::PrototypeContext); ParseDeclarator(ParmDecl); @@ -2541,7 +2541,7 @@ StmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) { Scope::AtCatchScope); if (Tok.isNot(tok::ellipsis)) { DeclSpec DS(AttrFactory); - ParseDeclarationSpecifiers(DS); + ParseDeclarationSpecifiersOrConceptDefinition(DS); Declarator ParmDecl(DS, DeclaratorContext::ObjCCatchContext); ParseDeclarator(ParmDecl); |