xref: /aosp_15_r20/external/clang/test/CXX/lex/lex.pptoken/p3-0x.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2*67e74705SXin Li 
3*67e74705SXin Li int a<::> = { 1, 2, 3 };
4*67e74705SXin Li int b = a<:::a<:0:>:>;
5*67e74705SXin Li bool c = a<:0:><::b;
6*67e74705SXin Li 
f()7*67e74705SXin Li template<int &n> void f() {}
8*67e74705SXin Li template void f<::b>();
9*67e74705SXin Li 
10*67e74705SXin Li #define x a<:: ## : b :>
11*67e74705SXin Li int d = x; // expected-error {{pasting formed ':::', an invalid preprocessing token}} expected-error {{expected unqualified-id}}
12*67e74705SXin Li 
13*67e74705SXin Li const char xs[] = R"(\
14*67e74705SXin Li ??=\U0000)";
15*67e74705SXin Li static_assert(sizeof(xs) == 12, "did not revert all changes");
16