int foobar(int);
int foobar() {}
which requires ifdef'ing out a testcase in predefined-function.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47236
91177308-0d34-0410-b5e6-
96231b3b80d8
FTI.ArgInfo[i].TypeInfo = Context.IntTy.getAsOpaquePtr();
}
}
-
+
// Since this is a function definition, act as though we have information
// about the arguments.
- FTI.hasPrototype = true;
+ if (FTI.NumArgs)
+ FTI.hasPrototype = true;
} else {
// FIXME: Diagnose arguments without names in C.
}
int test3() {
int a[2];
- a[0] = test3; // expected-warning{{incompatible pointer to integer conversion assigning 'int (void)', expected 'int'}}
+ a[0] = test3; // expected-warning{{incompatible pointer to integer conversion assigning 'int ()', expected 'int'}}
}
short x; void test4(char c) { x += c; }
int y; void test5(char c) { y += c; }
int t9(int a, ); // expected-error {{expected parameter declarator}}
+// PR2042
+void t10(){}
+void t11(){t10(1);}
+
{
return 0;
}
-int bar() // expected-error {{redefinition of 'bar'}} expected-error {{conflicting types for 'bar'}}
+int bar() // expected-error {{redefinition of 'bar'}}
{
return 0;
}
+#if 0
int foobar(int); // expected-error {{previous declaration is here}}
int foobar() // expected-error {{conflicting types for 'foobar'}}
{
return 0;
}
+#endif
int wibble(); // expected-error {{previous declaration is here}}
float wibble() // expected-error {{conflicting types for 'wibble'}}