summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
diff options
context:
space:
mode:
authorSaar Raz <saar@raz.email>2020-01-24 00:43:22 +0200
committerSaar Raz <saar@raz.email>2020-01-24 02:28:33 +0200
commit2ec65e229314d468006998eaef7074b86ef7482d (patch)
treeb40b8f4c158de29132f5c6ff17d804273a68e3c9 /clang/lib/Parse
parent29f14c1df25992db8c908e441c69e1fd4d4e4010 (diff)
downloadbcm5719-llvm-2ec65e229314d468006998eaef7074b86ef7482d.tar.gz
bcm5719-llvm-2ec65e229314d468006998eaef7074b86ef7482d.zip
[Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2a
Now with concepts support merged and mostly complete, we do not need -fconcepts-ts (which was also misleading as we were not implementing the TS) and can enable concepts features under C++2a. A warning will be generated if users still attempt to use -fconcepts-ts. (cherry picked from commit 67c608a9695496cfc9d3fdf9d0b12b554ac6b4df)
Diffstat (limited to 'clang/lib/Parse')
-rw-r--r--clang/lib/Parse/ParseTemplate.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp
index e96baec0780..3bc4e3596f1 100644
--- a/clang/lib/Parse/ParseTemplate.cpp
+++ b/clang/lib/Parse/ParseTemplate.cpp
@@ -678,7 +678,7 @@ bool Parser::isTypeConstraintAnnotation() {
///
/// \returns true if an error occurred, and false otherwise.
bool Parser::TryAnnotateTypeConstraint() {
- if (!getLangOpts().ConceptsTS)
+ if (!getLangOpts().CPlusPlus2a)
return false;
CXXScopeSpec SS;
bool WasScopeAnnotation = Tok.is(tok::annot_cxxscope);
@@ -711,9 +711,8 @@ bool Parser::TryAnnotateTypeConstraint() {
/*EnteringContext=*/false,
PossibleConcept,
MemberOfUnknownSpecialization);
- assert(!MemberOfUnknownSpecialization
- && "Member when we only allowed namespace scope qualifiers??");
- if (!PossibleConcept || TNK != TNK_Concept_template) {
+ if (MemberOfUnknownSpecialization || !PossibleConcept ||
+ TNK != TNK_Concept_template) {
if (SS.isNotEmpty())
AnnotateScopeToken(SS, !WasScopeAnnotation);
return false;
OpenPOWER on IntegriCloud