aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/predefined-function.c
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-01-09 23:34:55 +0000
committerSteve Naroff <snaroff@apple.com>2008-01-09 23:34:55 +0000
commitffce4d572df79a95d21138fc28bb78f753fb2653 (patch)
treec01ac35cc9e6b18358749542065e4001d30cd766 /test/Sema/predefined-function.c
parent974c676306758c8c84f5c25e3708186557a678bd (diff)
Fix Sema::ActOnDeclarator() to call MergeFunctionDecl for function decls that aren't in scope. Since C functions are in a flat namespace, we need to give them special treatment (when compared with variables and typedefs).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45789 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/predefined-function.c')
-rw-r--r--test/Sema/predefined-function.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/predefined-function.c b/test/Sema/predefined-function.c
index 80b5ab0c6b..d554b8faa8 100644
--- a/test/Sema/predefined-function.c
+++ b/test/Sema/predefined-function.c
@@ -4,9 +4,14 @@ char *funk(int format);
enum Test {A=-1};
char *funk(enum Test x);
+int eli(float b); // expected-error {{previous definition is here}}
+int b(int c) {return 1;}
+
int foo();
int foo()
{
+ int eli(int (int)); // expected-error {{redefinition of 'eli'}}
+ eli(b);
return 0;
}