functions. Patch contributed by Nuno Lopes, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43757
91177308-0d34-0410-b5e6-
96231b3b80d8
Old->getCanonicalType() == New->getCanonicalType()) {
return New;
}
+
+ if (New->getBody() == 0 &&
+ Old->getCanonicalType() == New->getCanonicalType()) {
+ return 0;
+ }
// TODO: CHECK FOR CONFLICTS, multiple decls with same name in one scope.
// TODO: This is totally simplistic. It should handle merging functions
--- /dev/null
+// RUN: clang %s -verify -fsyntax-only
+
+void foo(void);
+void foo(void) {} // expected-error{{previous definition is here}}
+void foo(void);
+void foo(void);
+
+void foo(int); // expected-error {{redefinition of 'foo'}}