[PATCH] D19056: [MSVC] Fix check for wchar_t type in case of -fno-wchar
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 13 10:31:58 PDT 2016
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: test/SemaCXX/no-wchar.cpp:12
@@ +11,2 @@
+void foo1(wchar_t * t = L"");
+// expected-warning at -1 {{conversion from string literal to 'wchar_t *' (aka 'unsigned short *') is deprecated}}
----------------
Can you add some negative tests like these:
short *p1 = L""; // error
int *p2 = L""; // error
Even if they don't make it into IsStringLiteralToNonConstPointerConversion, it's nice to test around things a bit.
http://reviews.llvm.org/D19056
More information about the cfe-commits
mailing list