saar.raz created this revision.
saar.raz added a reviewer: rsmith.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Enable concepts support under normal -std=c++2a and not under -fconcepts-ts, 
which is now deprecated.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73150

Files:
  clang/include/clang/Basic/DiagnosticFrontendKinds.td
  clang/include/clang/Basic/LangOptions.def
  clang/include/clang/Basic/TokenKinds.def
  clang/include/clang/Driver/CC1Options.td
  clang/lib/Basic/IdentifierTable.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/Frontend/InitPreprocessor.cpp
  clang/lib/Parse/ParseTemplate.cpp
  clang/lib/Sema/SemaTemplate.cpp
  clang/lib/Sema/SemaType.cpp
  clang/test/CXX/class.derived/class.virtual/p6.cpp
  clang/test/CXX/dcl/dcl.decl/p3.cpp
  clang/test/CXX/dcl/dcl.fct/p17.cpp
  clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/equivalence.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/p3.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/requires-expr.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp
  clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp
  clang/test/CXX/over/over.match/over.match.viable/p3.cpp
  clang/test/CXX/over/over.over/p4-2a.cpp
  clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp
  clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp
  clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp
  clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp
  clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp
  clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp
  clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp
  
clang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp
  clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp
  
clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp
  clang/test/CXX/temp/temp.explicit/p8.cpp
  clang/test/CXX/temp/temp.param/p10-2a.cpp
  clang/test/CodeGenCXX/mangle-concept.cpp
  clang/test/Lexer/cxx-features.cpp
  clang/test/Lexer/keywords_test.cpp
  clang/test/PCH/cxx2a-requires-expr.cpp
  clang/test/Parser/cxx-concept-declaration.cpp
  clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp
  clang/test/Parser/cxx-concepts-requires-clause.cpp
  clang/test/Parser/cxx2a-concept-declaration.cpp
  clang/test/Parser/cxx2a-concepts-requires-expr.cpp
  clang/test/Parser/cxx2a-constrained-template-param-with-partial-id.cpp
  clang/test/Parser/cxx2a-constrained-template-param.cpp
  clang/test/Parser/cxx2a-placeholder-type-constraint.cpp
  clang/test/SemaTemplate/cxx2a-constraint-caching.cpp
  clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp
  clang/test/SemaTemplate/instantiate-requires-clause.cpp
  clang/test/SemaTemplate/instantiate-requires-expr.cpp
  clang/www/cxx_status.html

Index: clang/www/cxx_status.html
===================================================================
--- clang/www/cxx_status.html
+++ clang/www/cxx_status.html
@@ -881,7 +881,7 @@
     <tr id="p0734">
       <td rowspan="9">Concepts</td>
       <td><a href="https://wg21.link/p0734r0";>P0734R0</a></td>
-      <td rowspan="9" class="none" align="center">No</td>
+      <td rowspan="9" class="full" align="center">Clang 10</td>
     </tr>
       <tr> <!-- from Albuquerque -->
         <td><a href="https://wg21.link/p0857r0";>P0857R0</a></td>
Index: clang/test/SemaTemplate/instantiate-requires-expr.cpp
===================================================================
--- clang/test/SemaTemplate/instantiate-requires-expr.cpp
+++ clang/test/SemaTemplate/instantiate-requires-expr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify -Wno-unused-value
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify -Wno-unused-value
 
 template<typename T, typename U>
 constexpr bool is_same_v = false;
Index: clang/test/SemaTemplate/instantiate-requires-clause.cpp
===================================================================
--- clang/test/SemaTemplate/instantiate-requires-clause.cpp
+++ clang/test/SemaTemplate/instantiate-requires-clause.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 template <typename... Args> requires ((sizeof(Args) == 1), ...)
 // expected-note@-1 {{because '(sizeof(int) == 1) , (sizeof(char) == 1) , (sizeof(int) == 1)' evaluated to false}}
Index: clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp
===================================================================
--- clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp
+++ clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 
 template<typename T, typename U>
 constexpr bool is_same_v = false;
Index: clang/test/SemaTemplate/cxx2a-constraint-caching.cpp
===================================================================
--- clang/test/SemaTemplate/cxx2a-constraint-caching.cpp
+++ clang/test/SemaTemplate/cxx2a-constraint-caching.cpp
@@ -1,5 +1,5 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s -fno-concept-satisfaction-caching -DNO_CACHE
+// RUN:  %clang_cc1 -std=c++2a -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s -fno-concept-satisfaction-caching -DNO_CACHE
 // expected-no-diagnostics
 
 template<typename T>
Index: clang/test/Parser/cxx2a-placeholder-type-constraint.cpp
===================================================================
--- clang/test/Parser/cxx2a-placeholder-type-constraint.cpp
+++ clang/test/Parser/cxx2a-placeholder-type-constraint.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 template<typename T, typename U=void>
 concept C = true;
Index: clang/test/Parser/cxx2a-constrained-template-param.cpp
===================================================================
--- clang/test/Parser/cxx2a-constrained-template-param.cpp
+++ clang/test/Parser/cxx2a-constrained-template-param.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 namespace type
 {
Index: clang/test/Parser/cxx2a-constrained-template-param-with-partial-id.cpp
===================================================================
--- clang/test/Parser/cxx2a-constrained-template-param-with-partial-id.cpp
+++ clang/test/Parser/cxx2a-constrained-template-param-with-partial-id.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 template<typename T, int a>
 concept C1 = true;
Index: clang/test/Parser/cxx2a-concepts-requires-expr.cpp
===================================================================
--- clang/test/Parser/cxx2a-concepts-requires-expr.cpp
+++ clang/test/Parser/cxx2a-concepts-requires-expr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 bool r1 = requires () {};
 // expected-error@-1 {{a requires expression must contain at least one requirement}}
Index: clang/test/Parser/cxx2a-concept-declaration.cpp
===================================================================
--- clang/test/Parser/cxx2a-concept-declaration.cpp
+++ clang/test/Parser/cxx2a-concept-declaration.cpp
@@ -1,6 +1,6 @@
 // Support parsing of concepts
 
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 template<typename T> concept C1 = true; // expected-note 2{{previous}}
 
 template<typename T> concept C1 = true; // expected-error{{redefinition}}
Index: clang/test/Parser/cxx-concepts-requires-clause.cpp
===================================================================
--- clang/test/Parser/cxx-concepts-requires-clause.cpp
+++ clang/test/Parser/cxx-concepts-requires-clause.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 // Test parsing of the optional requires-clause in a template-declaration.
 
Index: clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp
===================================================================
--- clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp
+++ clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++14 -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++14 -x c++ %s -verify
 
 // Test parsing of constraint-expressions in cases where the grammar is
 // ambiguous with the expectation that the longest token sequence which matches
Index: clang/test/Parser/cxx-concept-declaration.cpp
===================================================================
--- clang/test/Parser/cxx-concept-declaration.cpp
+++ clang/test/Parser/cxx-concept-declaration.cpp
@@ -3,5 +3,5 @@
 // Disabled for now.
 // expected-no-diagnostics
 
-// RUN:  %clang_cc1 -std=c++14 -fconcepts-ts -x c++ -verify %s
+// RUN:  %clang_cc1 -std=c++14 -x c++ -verify %s
 // template<typename T> concept C1 = true;
Index: clang/test/PCH/cxx2a-requires-expr.cpp
===================================================================
--- clang/test/PCH/cxx2a-requires-expr.cpp
+++ clang/test/PCH/cxx2a-requires-expr.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-pch -std=c++2a -fconcepts-ts -o %t %s
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x ast -ast-print %t | FileCheck %s
+// RUN: %clang_cc1 -emit-pch -std=c++2a -o %t %s
+// RUN: %clang_cc1 -std=c++2a -x ast -ast-print %t | FileCheck %s
 
 template<typename T>
 concept C = true;
Index: clang/test/Lexer/keywords_test.cpp
===================================================================
--- clang/test/Lexer/keywords_test.cpp
+++ clang/test/Lexer/keywords_test.cpp
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -std=c++03 -fsyntax-only %s
 // RUN: %clang_cc1 -std=c++11 -DCXX11 -fsyntax-only %s
-// RUN: %clang_cc1 -std=c++14 -fconcepts-ts -DCXX11 -DCONCEPTS -fsyntax-only %s
+// RUN: %clang_cc1 -std=c++14 -DCXX11 -DCONCEPTS -fsyntax-only %s
 // RUN: %clang_cc1 -std=c++2a -DCXX11 -DCXX2A -fsyntax-only %s
 // RUN: %clang_cc1 -std=c++03 -fdeclspec -DDECLSPEC -fsyntax-only %s
 // RUN: %clang_cc1 -std=c++03 -fms-extensions -DDECLSPEC -fsyntax-only %s
@@ -59,7 +59,7 @@
 #endif
 CXX11_KEYWORD(thread_local);
 
-// Concepts TS keywords
+// Concepts keywords
 CONCEPTS_KEYWORD(concept);
 CONCEPTS_KEYWORD(requires);
 
Index: clang/test/Lexer/cxx-features.cpp
===================================================================
--- clang/test/Lexer/cxx-features.cpp
+++ clang/test/Lexer/cxx-features.cpp
@@ -5,7 +5,7 @@
 // RUN: %clang_cc1 -std=c++2a -fcxx-exceptions -fsized-deallocation -verify %s
 //
 // RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -frelaxed-template-template-args -DRELAXED_TEMPLATE_TEMPLATE_ARGS=1 -verify %s
-// RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s
+// RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -DCONCEPTS_TS=1 -verify %s
 // RUN: %clang_cc1 -std=c++14 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS -fsized-deallocation
 // RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify -fsized-deallocation %s
 // RUN: %clang_cc1 -std=c++14 -fchar8_t -DNO_EXCEPTIONS -DCHAR8_T -verify -fsized-deallocation %s
Index: clang/test/CodeGenCXX/mangle-concept.cpp
===================================================================
--- clang/test/CodeGenCXX/mangle-concept.cpp
+++ clang/test/CodeGenCXX/mangle-concept.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -Wno-return-type -Wno-main -std=c++2a -fconcepts-ts -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
+// RUN: %clang_cc1 -verify -Wno-return-type -Wno-main -std=c++2a -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
 // expected-no-diagnostics
 
 namespace test1 {
Index: clang/test/CXX/temp/temp.param/p10-2a.cpp
===================================================================
--- clang/test/CXX/temp/temp.param/p10-2a.cpp
+++ clang/test/CXX/temp/temp.param/p10-2a.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 template<typename T>
 concept C1 = sizeof(T) == 1;
Index: clang/test/CXX/temp/temp.explicit/p8.cpp
===================================================================
--- clang/test/CXX/temp/temp.explicit/p8.cpp
+++ clang/test/CXX/temp/temp.explicit/p8.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 template<typename T, typename S = char> requires (sizeof(T) + sizeof(S) < 10)
 // expected-note@-1{{because 'sizeof(char [100]) + sizeof(char) < 10' (101 < 10) evaluated to false}}
Index: clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp
===================================================================
--- clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp
+++ clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 template<typename T> requires (sizeof(T) >= 4)
 // expected-note@-1{{similar constraint expressions not considered equivalent}}
Index: clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp
===================================================================
--- clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp
+++ clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 template<typename T> requires (sizeof(T) >= 4)
 // expected-note@-1{{similar constraint expressions not considered equivalent}}
Index: clang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp
===================================================================
--- clang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp
+++ clang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 template<typename T> requires (sizeof(T) >= 4)
 // expected-note@-1{{similar constraint expressions not considered equivalen}}
Index: clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp
===================================================================
--- clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp
+++ clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 template<typename T> concept True = true;
 template<typename T> concept Foo = True<T*>;
Index: clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp
===================================================================
--- clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp
+++ clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 template<typename T>
 struct X {
Index: clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp
===================================================================
--- clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp
+++ clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 namespace nodiag {
 
Index: clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp
===================================================================
--- clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp
+++ clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 namespace class_templates
 {
Index: clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp
===================================================================
--- clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp
+++ clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 template<typename T> requires (sizeof(T) >= 2) // expected-note{{because 'sizeof(char) >= 2' (1 >= 2) evaluated to false}}
 struct A {
Index: clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp
===================================================================
--- clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp
+++ clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
+// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
 
 template<typename T>
 constexpr bool is_ptr_v = false;
Index: clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp
===================================================================
--- clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp
+++ clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -frelaxed-template-template-args -verify %s
+// RUN:  %clang_cc1 -std=c++2a -frelaxed-template-template-args -verify %s
 
 template<typename T> concept C = T::f();
 // expected-note@-1{{similar constraint}}
Index: clang/test/CXX/over/over.over/p4-2a.cpp
===================================================================
--- clang/test/CXX/over/over.over/p4-2a.cpp
+++ clang/test/CXX/over/over.over/p4-2a.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 
 template<typename T, typename U>
 constexpr static bool is_same_v = false;
Index: clang/test/CXX/over/over.match/over.match.viable/p3.cpp
===================================================================
--- clang/test/CXX/over/over.match/over.match.viable/p3.cpp
+++ clang/test/CXX/over/over.match/over.match.viable/p3.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 
 struct S2 {};
 // expected-note@-1 {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'S1' to 'const S2' for 1st argument}}
Index: clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp
===================================================================
--- clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp
+++ clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 
 template<typename T, typename U>
 constexpr static bool is_same_v = false;
Index: clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 using A = int;
 
Index: clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -I%S -std=c++2a -fconcepts-ts -verify
+// RUN: %clang_cc1 %s -I%S -std=c++2a -verify
 
 namespace std { struct type_info; }
 
Index: clang/test/CXX/expr/expr.prim/expr.prim.req/requires-expr.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.req/requires-expr.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.req/requires-expr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 using A = int;
 
Index: clang/test/CXX/expr/expr.prim/expr.prim.req/p3.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.req/p3.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.req/p3.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 // Examples from standard
 
Index: clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 static_assert(requires { requires true; });
 
Index: clang/test/CXX/expr/expr.prim/expr.prim.req/equivalence.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.req/equivalence.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.req/equivalence.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 template<typename T, typename U> constexpr bool is_same_v = false;
 template<typename T> constexpr bool is_same_v<T, T> = true;
Index: clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
+// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
 
 static_assert(requires { { 0 }; });
 static_assert(requires { { "aaaa" }; });
Index: clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 
 auto l1 = [] (auto x) requires (sizeof(decltype(x)) == 1) { return x; };
 // expected-note@-1{{candidate template ignored: constraints not satisfied [with x:auto = int]}}
Index: clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 
 namespace functions
 {
Index: clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 
 template<typename T> requires (sizeof(T) >= 4 && sizeof(T) <= 10)
 // expected-note@-1{{because 'sizeof(char [20]) <= 10' (20 <= 10) evaluated to false}}
Index: clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp
===================================================================
--- clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp
+++ clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 
 template<typename T, unsigned size>
 concept LargerThan = sizeof(T) > size;
Index: clang/test/CXX/dcl/dcl.fct/p17.cpp
===================================================================
--- clang/test/CXX/dcl/dcl.fct/p17.cpp
+++ clang/test/CXX/dcl/dcl.fct/p17.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 template<typename T, typename U> constexpr bool is_same_v = false;
 template<typename T> constexpr bool is_same_v<T, T> = true;
 
Index: clang/test/CXX/dcl/dcl.decl/p3.cpp
===================================================================
--- clang/test/CXX/dcl/dcl.decl/p3.cpp
+++ clang/test/CXX/dcl/dcl.decl/p3.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 
 template<typename T, typename U>
 constexpr bool is_same_v = false;
Index: clang/test/CXX/class.derived/class.virtual/p6.cpp
===================================================================
--- clang/test/CXX/class.derived/class.virtual/p6.cpp
+++ clang/test/CXX/class.derived/class.virtual/p6.cpp
@@ -1,4 +1,4 @@
-// RUN:  %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
+// RUN:  %clang_cc1 -std=c++2a -verify %s
 
 template<typename T>
 class A {
Index: clang/lib/Sema/SemaType.cpp
===================================================================
--- clang/lib/Sema/SemaType.cpp
+++ clang/lib/Sema/SemaType.cpp
@@ -3115,7 +3115,7 @@
       InventedTemplateParameterInfo *Info = nullptr;
       if (D.getContext() == DeclaratorContext::PrototypeContext) {
         // With concepts we allow 'auto' in function parameters.
-        if (!SemaRef.getLangOpts().ConceptsTS || !Auto ||
+        if (!SemaRef.getLangOpts().CPlusPlus2a || !Auto ||
             Auto->getKeyword() != AutoTypeKeyword::Auto) {
           Error = 0;
           break;
@@ -4730,7 +4730,7 @@
             // An error occurred parsing the trailing return type.
             T = Context.IntTy;
             D.setInvalidType(true);
-          } else if (S.getLangOpts().ConceptsTS)
+          } else if (S.getLangOpts().CPlusPlus2a)
             // Handle cases like: `auto f() -> auto` or `auto f() -> C auto`.
             if (AutoType *Auto = T->getContainedAutoType())
               if (S.getCurScope()->isFunctionDeclarationScope())
@@ -5356,7 +5356,7 @@
       // We represent function parameter packs as function parameters whose
       // type is a pack expansion.
       if (!T->containsUnexpandedParameterPack() &&
-          (!LangOpts.ConceptsTS || !T->getContainedAutoType())) {
+          (!LangOpts.CPlusPlus2a || !T->getContainedAutoType())) {
         S.Diag(D.getEllipsisLoc(),
              diag::err_function_parameter_pack_without_parameter_packs)
           << T <<  D.getSourceRange();
Index: clang/lib/Sema/SemaTemplate.cpp
===================================================================
--- clang/lib/Sema/SemaTemplate.cpp
+++ clang/lib/Sema/SemaTemplate.cpp
@@ -4101,7 +4101,7 @@
 
     if (isSameAsPrimaryTemplate(VarTemplate->getTemplateParameters(),
                                 Converted) &&
-        (!Context.getLangOpts().ConceptsTS ||
+        (!Context.getLangOpts().CPlusPlus2a ||
          !TemplateParams->hasAssociatedConstraints())) {
       // C++ [temp.class.spec]p9b3:
       //
@@ -8108,7 +8108,7 @@
 
     if (Context.hasSameType(CanonType,
                         ClassTemplate->getInjectedClassNameSpecialization()) &&
-        (!Context.getLangOpts().ConceptsTS ||
+        (!Context.getLangOpts().CPlusPlus2a ||
          !TemplateParams->hasAssociatedConstraints())) {
       // C++ [temp.class.spec]p9b3:
       //
Index: clang/lib/Parse/ParseTemplate.cpp
===================================================================
--- clang/lib/Parse/ParseTemplate.cpp
+++ clang/lib/Parse/ParseTemplate.cpp
@@ -678,7 +678,7 @@
 ///
 /// \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);
Index: clang/lib/Frontend/InitPreprocessor.cpp
===================================================================
--- clang/lib/Frontend/InitPreprocessor.cpp
+++ clang/lib/Frontend/InitPreprocessor.cpp
@@ -385,7 +385,7 @@
     else
       Builder.defineMacro("__cplusplus", "199711L");
 
-    if (LangOpts.ConceptsTS)
+    if (LangOpts.CPlusPlus2a)
       Builder.defineMacro("__cpp_concepts", "201707L");
 
     // C++1z [cpp.predefined]p1:
@@ -567,8 +567,6 @@
   Builder.defineMacro("__cpp_impl_destroying_delete", "201806L");
 
   // TS features.
-  if (LangOpts.ConceptsTS)
-    Builder.defineMacro("__cpp_experimental_concepts", "1L");
   if (LangOpts.Coroutines)
     Builder.defineMacro("__cpp_coroutines", "201703L");
 }
Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -2858,9 +2858,10 @@
                                                  << A->getValue();
     Opts.NewAlignOverride = 0;
   }
-  Opts.ConceptsTS = Args.hasArg(OPT_fconcepts_ts);
   Opts.ConceptSatisfactionCaching =
       !Args.hasArg(OPT_fno_concept_satisfaction_caching);
+  if (Args.hasArg(OPT_fconcepts_ts))
+    Diags.Report(diag::warn_fe_concepts_ts_flag);
   Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions);
   Opts.AccessControl = !Args.hasArg(OPT_fno_access_control);
   Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors);
Index: clang/lib/Basic/IdentifierTable.cpp
===================================================================
--- clang/lib/Basic/IdentifierTable.cpp
+++ clang/lib/Basic/IdentifierTable.cpp
@@ -142,7 +142,7 @@
   // We treat bridge casts as objective-C keywords so we can warn on them
   // in non-arc mode.
   if (LangOpts.ObjC && (Flags & KEYOBJC)) return KS_Enabled;
-  if (LangOpts.ConceptsTS && (Flags & KEYCONCEPTS)) return KS_Enabled;
+  if (LangOpts.CPlusPlus2a && (Flags & KEYCONCEPTS)) return KS_Enabled;
   if (LangOpts.Coroutines && (Flags & KEYCOROUTINES)) return KS_Enabled;
   if (LangOpts.ModulesTS && (Flags & KEYMODULES)) return KS_Enabled;
   if (LangOpts.CPlusPlus && (Flags & KEYALLCXX)) return KS_Future;
Index: clang/include/clang/Driver/CC1Options.td
===================================================================
--- clang/include/clang/Driver/CC1Options.td
+++ clang/include/clang/Driver/CC1Options.td
@@ -555,8 +555,6 @@
   Joined<["-"], "ftest-module-file-extension=">,
   HelpText<"introduce a module file extension for testing purposes. "
            "The argument is parsed as blockname:major:minor:hashed:user info">;
-def fconcepts_ts : Flag<["-"], "fconcepts-ts">,
-  HelpText<"Enable C++ Extensions for Concepts.">;
 def fno_concept_satisfaction_caching : Flag<["-"],
                                             "fno-concept-satisfaction-caching">,
   HelpText<"Disable satisfaction caching for C++2a Concepts.">;
Index: clang/include/clang/Basic/TokenKinds.def
===================================================================
--- clang/include/clang/Basic/TokenKinds.def
+++ clang/include/clang/Basic/TokenKinds.def
@@ -373,7 +373,7 @@
 CXX11_KEYWORD(static_assert         , KEYMSCOMPAT)
 CXX11_KEYWORD(thread_local          , 0)
 
-// C++2a / concepts TS keywords
+// C++2a keywords
 CONCEPTS_KEYWORD(concept)
 CONCEPTS_KEYWORD(requires)
 
Index: clang/include/clang/Basic/LangOptions.def
===================================================================
--- clang/include/clang/Basic/LangOptions.def
+++ clang/include/clang/Basic/LangOptions.def
@@ -237,7 +237,6 @@
 LANGOPT(AlignedAllocation , 1, 0, "aligned allocation")
 LANGOPT(AlignedAllocationUnavailable, 1, 0, "aligned allocation functions are unavailable")
 LANGOPT(NewAlignOverride  , 32, 0, "maximum alignment guaranteed by '::operator new(size_t)'")
-LANGOPT(ConceptsTS , 1, 0, "enable C++ Extensions for Concepts")
 LANGOPT(ConceptSatisfactionCaching , 1, 1, "enable satisfaction caching for C++2a Concepts")
 BENIGN_LANGOPT(ModulesCodegen , 1, 0, "Modules code generation")
 BENIGN_LANGOPT(ModulesDebugInfo , 1, 0, "Modules debug info")
Index: clang/include/clang/Basic/DiagnosticFrontendKinds.td
===================================================================
--- clang/include/clang/Basic/DiagnosticFrontendKinds.td
+++ clang/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -105,6 +105,9 @@
     : Error<"invalid wchar_t type '%0'; must be one of 'char', 'short', 'int'">;
 def err_fe_invalid_exception_model
    : Error<"invalid exception model '%0' for target '%1'">;
+def warn_fe_concepts_ts_flag : Warning<
+  "-fconcepts-ts is deprecated - use '-std=c++2a' for concepts support">,
+  InGroup<Deprecated>;
 
 def warn_fe_serialized_diag_merge_failure : Warning<
     "unable to merge a subprocess's serialized diagnostics">,
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D73150: [... Saar Raz via Phabricator via cfe-commits

Reply via email to