summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/MicrosoftCompatibility.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/SemaCXX/MicrosoftCompatibility.cpp
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/SemaCXX/MicrosoftCompatibility.cpp')
-rw-r--r--test/SemaCXX/MicrosoftCompatibility.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaCXX/MicrosoftCompatibility.cpp b/test/SemaCXX/MicrosoftCompatibility.cpp
index 6a48f36..05037ac 100644
--- a/test/SemaCXX/MicrosoftCompatibility.cpp
+++ b/test/SemaCXX/MicrosoftCompatibility.cpp
@@ -178,3 +178,19 @@ namespace PR11791 {
del((void*)a); // expected-note {{in instantiation of function template specialization}}
}
}
+
+namespace IntToNullPtrConv {
+ struct Foo {
+ static const int ZERO = 0;
+ typedef void (Foo::*MemberFcnPtr)();
+ };
+
+ struct Bar {
+ const Foo::MemberFcnPtr pB;
+ };
+
+ Bar g_bar = { (Foo::MemberFcnPtr)Foo::ZERO };
+
+ template<int N> int *get_n() { return N; } // expected-warning {{expression which evaluates to zero treated as a null pointer constant}}
+ int *g_nullptr = get_n<0>(); // expected-note {{in instantiation of function template specialization}}
+}
OpenPOWER on IntegriCloud