File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -649,6 +649,7 @@ static bool IsPossiblyOpaquelyQualifiedTypeInternal(const Type *T) {
649
649
case Type::PackIndexing:
650
650
case Type::UnresolvedUsing:
651
651
case Type::TemplateTypeParm:
652
+ case Type::Auto:
652
653
return true ;
653
654
654
655
case Type::ConstantArray:
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -fsyntax-only -std=c++17 -verify %s
2
+ // RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s
3
+ // expected-no-diagnostics
4
+
5
+ struct false_type {
6
+ static constexpr bool value = false ;
7
+ };
8
+
9
+ struct true_type {
10
+ static constexpr bool value = true ;
11
+ };
12
+
13
+ template <auto & Value, int >
14
+ struct test : false_type {};
15
+
16
+ template <auto & Value>
17
+ struct test <Value, 0 > : true_type {};
18
+
19
+ int main () {
20
+ static constexpr int v = 42 ;
21
+ static_assert (test<v, 0 >::value);
22
+ }
You can’t perform that action at this time.
0 commit comments