1 // RUN: %clang_cc1 -std=c++11 -ast-print %s | FileCheck %s 2 3 // CHECK: auto operator "" _foo(const char *p, decltype(sizeof(int))) -> decltype(nullptr); 4 auto operator"" _foo(const char *p, decltype(sizeof(int))) -> decltype(nullptr); 5 6 // CHECK: decltype(""_foo) operator "" _bar(unsigned long long); 7 decltype(""_foo) operator"" _bar(unsigned long long); 8 9 // CHECK: decltype(42_bar) operator "" _baz(long double); 10 decltype(42_bar) operator"" _baz(long double); 11 12 // CHECK: decltype(4.5_baz) operator "" _baz(char); 13 decltype(4.5_baz) operator"" _baz(char); 14 15 // CHECK: const char *operator "" _quux(const char *); 16 const char *operator"" _quux(const char *); 17 18 // CHECK: template <char ...> const char *operator "" _fritz(); 19 template<char...> const char *operator"" _fritz(); 20 21 // CHECK: const char *p1 = "bar1"_foo; 22 const char *p1 = "bar1"_foo; 23 // CHECK: const char *p2 = "bar2"_foo; 24 const char *p2 = R"x(bar2)x"_foo; 25 // CHECK: const char *p3 = u8"bar3"_foo; 26 const char *p3 = u8"bar3"_foo; 27 // CHECK: const char *p4 = 297_bar; 28 const char *p4 = 0x129_bar; 29 // CHECK: const char *p5 = 1.0E+12_baz; 30 const char *p5 = 1e12_baz; 31 // CHECK: const char *p6 = 'x'_baz; 32 const char *p6 = 'x'_baz; 33 // CHECK: const char *p7 = 123_quux; 34 const char *p7 = 123_quux; 35 // CHECK: const char *p8 = 4.9_quux; 36 const char *p8 = 4.9_quux; 37 // CHECK: const char *p9 = 0x42e3F_fritz; 38 const char *p9 = 0x42e3F_fritz; 39 // CHECK: const char *p10 = 3.300e+15_fritz; 40 const char *p10 = 3.300e+15_fritz; 41 42 template <class C, C...> const char *operator"" _suffix(); 43 // CHECK: const char *PR23120 = operator "" _suffix<char32_t, 66615>(); 44 const char *PR23120 = U""_suffix; 45 46 // CHECK: ; 47 ; 48 // CHECK-NOT: ; 49 50 51