-fms-compatibility: Clang should form a wide string literal from L#macro_arg in a function-like macro #10356
Closed
Description
| Bugzilla Link | 9984 |
| Resolution | FIXED |
| Resolved on | Dec 14, 2014 22:19 |
| Version | trunk |
| OS | All |
| Blocks | llvm/llvm-bugzilla-archive#13707 |
| Reporter | LLVM Bugzilla Contributor |
| CC | @alexey-bataev,@majnemer,@DougGregor,@zmodem,@zygoloid,@rnk |
Extended Description
the following code produces an error:
#define TESTL(x) L#x
const wchar_t* a = L"Hello World";
const wchar_t* b = TESTL(Hello World);
The preprocessor appears to ignore the L inside the define as the literal declaring the string as a wide string. The code not using the macro passes without error.
Here is the analyzer output:
"Use of undeclared identifier 'L'"
This fails on both using the analyzer that ships with XCode 4.0.1 as well as svn trunk (test at revision 131851).
Activity