[Concepts] Parsing of requires-clause in template-declaration
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Thu, 25 Jun 2015 00:23:39 +0000 (00:23 +0000)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Thu, 25 Jun 2015 00:23:39 +0000 (00:23 +0000)
commitec3cb573f522cf6748eae8afa5b33f9b65c33d6e
tree2198fc7989005e81e19307e2c1214fff7284ae37
parent6a75acb1c2fde67614d86084d09f9debc0425d67
[Concepts] Parsing of requires-clause in template-declaration

Summary:
This change implements parse-only acceptance of the optional
requires-clause in a template-declaration. Diagnostic testing is added
for cases where the grammar is ambiguous with the expectation that the
longest token sequence which matches the syntax of a
constraint-expression is consumed without backtracking.

Reviewers: faisalv, fraggamuffin, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D10462

llvm-svn: 240611
clang/include/clang/Parse/Parser.h
clang/lib/Parse/ParseExpr.cpp
clang/lib/Parse/ParseTemplate.cpp
clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp [new file with mode: 0644]
clang/test/Parser/cxx-concepts-requires-clause.cpp [new file with mode: 0644]