| 1 | // RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-extensions |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | // Wide character predefined identifiers |
| 5 | #define _STR2WSTR(str) L##str |
| 6 | #define STR2WSTR(str) _STR2WSTR(str) |
| 7 | void abcdefghi12(void) { |
| 8 | const wchar_t (*ss)[12] = &STR2WSTR(__FUNCTION__); |
| 9 | static int arr[sizeof(STR2WSTR(__FUNCTION__))==12*sizeof(wchar_t) ? 1 : -1]; |
| 10 | const wchar_t (*ss2)[31] = &STR2WSTR(__FUNCSIG__); |
| 11 | static int arr2[sizeof(STR2WSTR(__FUNCSIG__))==31*sizeof(wchar_t) ? 1 : -1]; |
| 12 | } |
| 13 | |
| 14 | namespace PR13206 { |
| 15 | void foo(const wchar_t *); |
| 16 | |
| 17 | template<class T> class A { |
| 18 | public: |
| 19 | void method() { |
| 20 | foo(L__FUNCTION__); |
| 21 | } |
| 22 | }; |
| 23 | |
| 24 | void bar() { |
| 25 | A<int> x; |
| 26 | x.method(); |
| 27 | } |
| 28 | } |
| 29 | |