summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/function-overload-typo-crash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/function-overload-typo-crash.cpp')
-rw-r--r--test/SemaCXX/function-overload-typo-crash.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/function-overload-typo-crash.cpp b/test/SemaCXX/function-overload-typo-crash.cpp
new file mode 100644
index 0000000..0fea312
--- /dev/null
+++ b/test/SemaCXX/function-overload-typo-crash.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// PR10283
+void min();
+void min(int);
+
+template <typename T> void max(T);
+
+void f() {
+ fin(); //expected-error {{use of undeclared identifier 'fin'; did you mean 'min'}}
+ fax(0); //expected-error {{use of undeclared identifier 'fax'; did you mean 'max'}}
+}
OpenPOWER on IntegriCloud