aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/SemaCXX/warn_false_to_pointer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/warn_false_to_pointer.cpp b/test/SemaCXX/warn_false_to_pointer.cpp
index fb6f9551a7..26b54f6e68 100644
--- a/test/SemaCXX/warn_false_to_pointer.cpp
+++ b/test/SemaCXX/warn_false_to_pointer.cpp
@@ -8,3 +8,10 @@ void foo(int* i, int *j=(false)) // expected-warning{{ initialization of pointer
foo((int*)false);
}
+char f(struct Undefined*);
+double f(...);
+
+// Ensure that when using false in metaprogramming machinery its conversion
+// isn't flagged.
+template <int N> struct S {};
+S<sizeof(f(false))> s;