================
@@ -25,3 +25,18 @@ template <C N> decltype(auto) decltypeParameter() {
static_assert(__is_same(decltype(returnParameter<C{1}>()), const C &));
static_assert(__is_same(decltype(initParameter<C{1}>()), const C &));
static_assert(__is_same(decltype(decltypeParameter<C{1}>()), const C &));
+
+// Substituting a reference template parameter into a template argument wraps
+// it in synthetic parentheses, e.g. 'Array<char, (PATTERN).size() * 10>'.
+struct StringView {
----------------
zeyi2 wrote:
Personally I'm fine with adding this test case.
One small suggestion: could we move it to `redundant-parentheses-cxx14.cpp` and
remove the comments? This uses a reference NTTP (not a C++20 class-type NTTP)
and only needs C++14 for auto return type deduction.
https://github.com/llvm/llvm-project/pull/233514
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits