aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/conversion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/conversion.cpp')
-rw-r--r--test/SemaCXX/conversion.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/SemaCXX/conversion.cpp b/test/SemaCXX/conversion.cpp
index 225bc837b5..da78510c64 100644
--- a/test/SemaCXX/conversion.cpp
+++ b/test/SemaCXX/conversion.cpp
@@ -83,8 +83,10 @@ void test3() {
}
namespace test4 {
+ // FIXME: We should warn for non-dependent args (only when the param type is also non-dependent) only once
+ // not once for the template + once for every instantiation
template<typename T>
- void tmpl(char c = NULL, // expected-warning {{implicit conversion of NULL constant to 'char'}}
+ void tmpl(char c = NULL, // expected-warning 3 {{implicit conversion of NULL constant to 'char'}}
T a = NULL, // expected-warning {{implicit conversion of NULL constant to 'char'}} \
expected-warning {{implicit conversion of NULL constant to 'int'}}
T b = 1024) { // expected-warning {{implicit conversion from 'int' to 'char' changes value from 1024 to 0}}
@@ -95,8 +97,8 @@ namespace test4 {
}
void func() {
- tmpl<char>(); // expected-note {{in instantiation of default function argument expression for 'tmpl<char>' required here}}
- tmpl<int>(); // expected-note {{in instantiation of default function argument expression for 'tmpl<int>' required here}}
+ tmpl<char>(); // expected-note 2 {{in instantiation of default function argument expression for 'tmpl<char>' required here}}
+ tmpl<int>(); // expected-note 2 {{in instantiation of default function argument expression for 'tmpl<int>' required here}}
tmpl2<int*>();
}
}