brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1008 B · 6a9d713 Raw
15 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -Wno-deprecated-literal-operator -verify %s2 3using size_t = decltype(sizeof(int));4void operator "" wibble(const char *); // expected-warning {{user-defined literal suffixes not starting with '_' are reserved; no literal will invoke this operator}}5void operator "" wibble(const char *, size_t); // expected-warning {{user-defined literal suffixes not starting with '_' are reserved; no literal will invoke this operator}}6 7template<typename T>8void f() {9  // A program containing a reserved ud-suffix is ill-formed.10  123wibble; // expected-error {{invalid suffix 'wibble'}}11  123.0wibble; // expected-error {{invalid suffix 'wibble'}}12  const char *p = ""wibble; // expected-error {{invalid suffix on literal; C++11 requires a space between literal and identifier}} expected-error {{expected ';'}}13  const char *q = R"x("hello")x"wibble; // expected-error {{invalid suffix on literal; C++11 requires a space between literal and identifier}} expected-error {{expected ';'}}14}15