[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / SemaCXX / cv-unqual-rvalues.cpp
blobed76ced38c76e8aaa109f11df110915773484de4
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // PR7463: Make sure that when we have an rvalue, it does not have
4 // cv-qualified non-class type.
5 template <typename T_> void g (T_&); // expected-note 7{{not viable}}
7 template<const int X> void h() {
8 g(X); // expected-error{{no matching function for call to 'g'}}
11 template<typename T, T X> void h2() {
12 g(X); // expected-error{{no matching function for call to 'g'}}
15 void a(__builtin_va_list x) {
16 g(__builtin_va_arg(x, const int)); // expected-error{{no matching function for call to 'g'}}
17 g((const int)0); // expected-error{{no matching function for call to 'g'}}
18 typedef const int cint;
19 g(cint(0)); // expected-error{{no matching function for call to 'g'}}
20 g(static_cast<const int>(1)); // expected-error{{no matching function for call to 'g'}}
21 g(reinterpret_cast<int *const>(0)); // expected-error{{no matching function for call to 'g'}}
22 h<0>();
23 h2<const int, 0>(); // expected-note{{instantiation of}}