summaryrefslogtreecommitdiffstats
path: root/clang/test/Misc/diag-template-diffing.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2013-01-30 20:04:31 +0000
committerRichard Trieu <rtrieu@google.com>2013-01-30 20:04:31 +0000
commit90c31f51c60749dd4f3361f24ff7579b27343c3b (patch)
tree0c0fd812a4cef005e34ac3fc7be0c2ded3c9973e /clang/test/Misc/diag-template-diffing.cpp
parent0f86433efbaaf1aa5ac8b524f4e4b94ec9af6c12 (diff)
downloadbcm5719-llvm-90c31f51c60749dd4f3361f24ff7579b27343c3b.tar.gz
bcm5719-llvm-90c31f51c60749dd4f3361f24ff7579b27343c3b.zip
Handle passing non-Qualtypes to %diff better. Instead of asserting, fall back
to printing the default case. This is a fix for PR15023. llvm-svn: 173965
Diffstat (limited to 'clang/test/Misc/diag-template-diffing.cpp')
-rw-r--r--clang/test/Misc/diag-template-diffing.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Misc/diag-template-diffing.cpp b/clang/test/Misc/diag-template-diffing.cpp
index bb85a45d5d5..c158255f806 100644
--- a/clang/test/Misc/diag-template-diffing.cpp
+++ b/clang/test/Misc/diag-template-diffing.cpp
@@ -830,6 +830,21 @@ namespace rdar12456626 {
};
}
+namespace PR15023 {
+ // Don't crash when non-QualTypes are passed to a diff modifier.
+ template <typename... Args>
+ void func(void (*func)(Args...), Args...) { }
+
+ void bar(int, int &) {
+ }
+
+ void foo(int x) {
+ func(bar, 1, x)
+ }
+ // CHECK-ELIDE-NOTREE: no matching function for call to 'func'
+ // CHECK-ELIDE-NOTREE: candidate template ignored: deduced conflicting types for parameter 'Args' (<int, int &> vs. <int, int>)
+}
+
// CHECK-ELIDE-NOTREE: {{[0-9]*}} errors generated.
// CHECK-NOELIDE-NOTREE: {{[0-9]*}} errors generated.
// CHECK-ELIDE-TREE: {{[0-9]*}} errors generated.
OpenPOWER on IntegriCloud