aboutsummaryrefslogtreecommitdiff
path: root/test/Misc/diag-template-diffing-cxx98.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Misc/diag-template-diffing-cxx98.cpp')
-rw-r--r--test/Misc/diag-template-diffing-cxx98.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Misc/diag-template-diffing-cxx98.cpp b/test/Misc/diag-template-diffing-cxx98.cpp
index 9d0439c282..a21e4cf060 100644
--- a/test/Misc/diag-template-diffing-cxx98.cpp
+++ b/test/Misc/diag-template-diffing-cxx98.cpp
@@ -31,3 +31,19 @@ namespace default_args {
}
}
+
+namespace qualifiers {
+ template <class T>
+ void foo(void (func(T*)), T*) {}
+
+ template <class T>
+ class vector{};
+
+ void bar(const vector<int>*) {}
+
+ void test(volatile vector<int>* V) {
+ foo(bar, V);
+ }
+
+ // CHECK: candidate template ignored: deduced conflicting types for parameter 'T' ('const vector<[...]>' vs. 'volatile vector<[...]>')
+}