Format string warnings: don't a.k.a. wchar_t with wchar_t.
This fixes the case where Clang would output:
error: format specifies type 'wchar_t *' (aka 'wchar_t *')
ArgTypeResult::getRepresentativeTypeName needs to take into account
that wchar_t can be a built-in type (as opposed to in C, where it is a
typedef).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149387 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/format-strings.cpp b/test/SemaCXX/format-strings.cpp
index 2011a71..4f5b74d 100644
--- a/test/SemaCXX/format-strings.cpp
+++ b/test/SemaCXX/format-strings.cpp
@@ -13,3 +13,7 @@
printf("%a", 1.0);
scanf("%afoobar", fp);
}
+
+void g() {
+ printf("%ls", "foo"); // expected-warning{{format specifies type 'wchar_t *' but the argument has type 'const char *'}}
+}