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 |
Andy Gibbs | c6e68da | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Nico Weber | 1598289 | 2012-06-25 22:30:41 +0000 | [diff] [blame] | 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 | } |
Nico Weber | 606cef4 | 2012-06-25 22:34:48 +0000 | [diff] [blame] | 11 | |
| 12 | namespace PR13206 { |
| 13 | void foo(const wchar_t *); |
| 14 | |
| 15 | template<class T> class A { |
| 16 | public: |
| 17 | void method() { |
| 18 | foo(L__FUNCTION__); |
| 19 | } |
| 20 | }; |
| 21 | |
| 22 | void bar() { |
| 23 | A<int> x; |
| 24 | x.method(); |
| 25 | } |
| 26 | } |