Home | History | Annotate | Download | only in lex.ext
      1 // RUN: %clang_cc1 -std=c++11 -verify %s
      2 
      3 using size_t = decltype(sizeof(int));
      4 void operator "" wibble(const char *); // expected-warning {{user-defined literal suffixes not starting with '_' are reserved; no literal will invoke this operator}}
      5 void operator "" wibble(const char *, size_t); // expected-warning {{user-defined literal suffixes not starting with '_' are reserved; no literal will invoke this operator}}
      6 
      7 template<typename T>
      8 void 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