Fix issues with C "tentative" definitions.
- Move checking from MergeVarDecl->FinializeDeclaratorGroup. Since MergeVarDecl is called before the initializer is attacted, it can't be done there (this removes a long standing FIXME).
- Add Sema::isTentativeDefinition() and Sema::CheckForFileScopedRedefinitions().
- Remove FIXME's and touch-up test case.
Still some more work to do (forthcoming)...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54533 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 0fda782..4274a1c 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -290,7 +290,9 @@
bool &Redeclaration);
VarDecl *MergeVarDecl(VarDecl *New, Decl *Old);
FunctionDecl *MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old);
-
+ bool isTentativeDefinition(VarDecl *VD);
+ void CheckForFileScopedRedefinitions(Scope *S, VarDecl *VD);
+
/// Helpers for dealing with function parameters
bool CheckParmsForFunctionDef(FunctionDecl *FD);
ImplicitParamDecl *CreateImplicitParameter(Scope *S, IdentifierInfo *Id,