Nico Weber | 1598289 | 2012-06-25 22:30:41 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-extensions |
| 2 | |
| 3 | // Wide character predefined identifiers |
| 4 | #define _STR2WSTR(str) L##str |
| 5 | #define STR2WSTR(str) _STR2WSTR(str) |
| 6 | void abcdefghi12(void) { |
| 7 | const wchar_t (*ss)[12] = &STR2WSTR(__FUNCTION__); |
| 8 | static int arr[sizeof(STR2WSTR(__FUNCTION__))==12*sizeof(wchar_t) ? 1 : -1]; |
| 9 | } |
Nico Weber | 606cef4 | 2012-06-25 22:34:48 +0000 | [diff] [blame^] | 10 | |
| 11 | namespace PR13206 { |
| 12 | void foo(const wchar_t *); |
| 13 | |
| 14 | template<class T> class A { |
| 15 | public: |
| 16 | void method() { |
| 17 | foo(L__FUNCTION__); |
| 18 | } |
| 19 | }; |
| 20 | |
| 21 | void bar() { |
| 22 | A<int> x; |
| 23 | x.method(); |
| 24 | } |
| 25 | } |