diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-12 23:29:02 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-12 23:29:02 +0000 |
commit | 88d10b68e0975510477d87e585c020a929739778 (patch) | |
tree | c56bd85a61a3b1e1dca2ba7cf5cda6882d290f55 /clang/lib/Sema/SemaDecl.cpp | |
parent | d9fa56a4fb24c4763adf2ea4e16b04a4f43e3e08 (diff) | |
download | bcm5719-llvm-88d10b68e0975510477d87e585c020a929739778.tar.gz bcm5719-llvm-88d10b68e0975510477d87e585c020a929739778.zip |
Revert r284008. This is us to fail to instantiate static data members in some
cases. I'm working on reducing a testcase.
llvm-svn: 284081
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index fa15b530add..7baa85a6464 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -9708,22 +9708,6 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, VDecl->getDeclContext()->isDependentContext())) { // The previous definition is hidden, and multiple definitions are // permitted (in separate TUs). Form another definition of it. - if (!isa<ParmVarDecl>(VDecl)) { - // Demote the newly parsed definition to a fake declaration. - if (!VDecl->isThisDeclarationADemotedDefinition()) - VDecl->demoteThisDefinitionToDeclaration(); - - // Make the definition visible from the point of the demotion on. - assert (!Hidden || Def == Hidden && - "We were suggested another hidden definition!"); - makeMergedDefinitionVisible(Def, VDecl->getLocation()); - - // If this is a variable template definition, make its enclosing template - // visible. - if (VarDecl *VarPattern = Def->getTemplateInstantiationPattern()) - if (VarPattern->isThisDeclarationADefinition()) - makeMergedDefinitionVisible(VarPattern, VDecl->getLocation()); - } } else { Diag(VDecl->getLocation(), diag::err_redefinition) << VDecl->getDeclName(); |