summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/function-overloaded-redecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/function-overloaded-redecl.cpp')
-rw-r--r--clang/test/SemaCXX/function-overloaded-redecl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/function-overloaded-redecl.cpp b/clang/test/SemaCXX/function-overloaded-redecl.cpp
new file mode 100644
index 0000000..0077881
--- /dev/null
+++ b/clang/test/SemaCXX/function-overloaded-redecl.cpp
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+typedef const int cInt;
+
+void f (int);
+void f (const int); // redecl
+
+void f (int) { } // expected-note {{previous definition is here}}
+void f (cInt) { } // expected-error {{redefinition of 'f'}}
+