[PATCH] D41217: [Concepts] Concept Specialization Expressions

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 11 10:41:25 PDT 2018


Quuxplusone added inline comments.


================
Comment at: include/clang/Sema/Sema.h:7134
+      // We are substituting template arguments into a constraint expression.
+      ConstraintSubstitution
     } Kind;
----------------
Missing a trailing comma here.


================
Comment at: test/CXX/concepts-ts/expr/expr.prim/expr.prim.id/p3.cpp:121
+template<typename T>
+concept C7 = sizeof(T) == 1 || sizeof(typename T3<T>::type) == 1; // expected-note{{while substituting template arguments into constraint expression here}} expected-note{{in instantiation of template class 'T3<short>' requested here}}
+
----------------
Nit: You could use `// expected-note at -1{{...}}`, `// expected-note at -2{{...}}` to make lines like this more readable.


================
Comment at: test/Parser/cxx-concept-declaration.cpp:48
+bool a = C16<true>;
+bool b = C17<true>;
----------------
Should you static-assert the expected results?
```
static_assert(!C12<bool>);
static_assert(C13<int>);
static_assert(C14<int>);
static_assert(C15<int>);
static_assert(C16<true>);
static_assert(C16<false>);
static_assert(C17<true>);
static_assert(!C17<false>);
```


Repository:
  rC Clang

https://reviews.llvm.org/D41217





More information about the cfe-commits mailing list