19fcce65e7e1307b5b8da9be13e4092d6bb94dc1dRichard Smith// RUN: %clang_cc1 -std=c++11 -ast-print %s | FileCheck %s 29fcce65e7e1307b5b8da9be13e4092d6bb94dc1dRichard Smith 3425663a16cc0d1bbd6764300f8a59251057dffe8Richard Smith// CHECK: auto operator "" _foo(const char *p, decltype(sizeof(int))) -> decltype(nullptr); 49fcce65e7e1307b5b8da9be13e4092d6bb94dc1dRichard Smithauto operator"" _foo(const char *p, decltype(sizeof(int))) -> decltype(nullptr); 59fcce65e7e1307b5b8da9be13e4092d6bb94dc1dRichard Smith 6916883004c36291b70355d5e73abb05e138804fbRichard Smith// CHECK: decltype(""_foo) operator "" _bar(unsigned long long); 7916883004c36291b70355d5e73abb05e138804fbRichard Smithdecltype(""_foo) operator"" _bar(unsigned long long); 8916883004c36291b70355d5e73abb05e138804fbRichard Smith 9916883004c36291b70355d5e73abb05e138804fbRichard Smith// CHECK: decltype(42_bar) operator "" _baz(long double); 10916883004c36291b70355d5e73abb05e138804fbRichard Smithdecltype(42_bar) operator"" _baz(long double); 11916883004c36291b70355d5e73abb05e138804fbRichard Smith 12ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith// CHECK: decltype(4.5_baz) operator "" _baz(char); 13ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smithdecltype(4.5_baz) operator"" _baz(char); 14ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith 15ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith// CHECK: const char *operator "" _quux(const char *); 16ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smithconst char *operator"" _quux(const char *); 17ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith 18ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith// CHECK: template <char...> const char *operator "" _fritz(); 19ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smithtemplate<char...> const char *operator"" _fritz(); 20ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith 219fcce65e7e1307b5b8da9be13e4092d6bb94dc1dRichard Smith// CHECK: const char *p1 = "bar1"_foo; 229fcce65e7e1307b5b8da9be13e4092d6bb94dc1dRichard Smithconst char *p1 = "bar1"_foo; 239fcce65e7e1307b5b8da9be13e4092d6bb94dc1dRichard Smith// CHECK: const char *p2 = "bar2"_foo; 249fcce65e7e1307b5b8da9be13e4092d6bb94dc1dRichard Smithconst char *p2 = R"x(bar2)x"_foo; 259fcce65e7e1307b5b8da9be13e4092d6bb94dc1dRichard Smith// CHECK: const char *p3 = u8"bar3"_foo; 269fcce65e7e1307b5b8da9be13e4092d6bb94dc1dRichard Smithconst char *p3 = u8"bar3"_foo; 27916883004c36291b70355d5e73abb05e138804fbRichard Smith// CHECK: const char *p4 = 297_bar; 28916883004c36291b70355d5e73abb05e138804fbRichard Smithconst char *p4 = 0x129_bar; 29916883004c36291b70355d5e73abb05e138804fbRichard Smith// CHECK: const char *p5 = 1.0E+12_baz; 30916883004c36291b70355d5e73abb05e138804fbRichard Smithconst char *p5 = 1e12_baz; 31ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith// CHECK: const char *p6 = 'x'_baz; 32ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smithconst char *p6 = 'x'_baz; 33ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith// CHECK: const char *p7 = 123_quux; 34ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smithconst char *p7 = 123_quux; 35ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith// CHECK: const char *p8 = 4.9_quux; 36ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smithconst char *p8 = 4.9_quux; 37ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith// CHECK: const char *p9 = 0x42e3F_fritz; 38ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smithconst char *p9 = 0x42e3F_fritz; 39ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smith// CHECK: const char *p10 = 3.300e+15_fritz; 40ef9f29804fa8932282a17b414ef0dde2ea4eec03Richard Smithconst char *p10 = 3.300e+15_fritz; 41684aa73192d92850a926870be62a1787eb5b7ed9Michael Han// CHECK: ; 42684aa73192d92850a926870be62a1787eb5b7ed9Michael Han; 436980f17c78442a7db80d98902932ef047930284aMichael Han// CHECK-NOT: ; 44dc17384581e37436582a007be4d9185bcf7003ecEnea Zaffanella 45dc17384581e37436582a007be4d9185bcf7003ecEnea Zaffanella 46