fix PR8007

reordering and redefinition issues still may linger,
I plan to nail them next

llvm-svn: 112333
This commit is contained in:
Gabor Greif 2010-08-28 00:16:06 +00:00
parent 83f9ff0452
commit b6aba3ef28
2 changed files with 6 additions and 2 deletions

View File

@ -7709,7 +7709,12 @@ void Sema::MarkDeclarationReferenced(SourceLocation Loc, Decl *D) {
else
PendingInstantiations.push_back(std::make_pair(Function, Loc));
}
}
} else // Walk redefinitions, as some of them may be instantiable.
for (FunctionDecl::redecl_iterator i(Function->redecls_begin()),
e(Function->redecls_end()); i != e; ++i) {
if (i->isImplicitlyInstantiable())
MarkDeclarationReferenced(Loc, *i);
}
// FIXME: keep track of references to static functions

View File

@ -1,5 +1,4 @@
// RUN: %clang %s -S -emit-llvm -o - | grep -e "define linkonce_odr.*_ZN6pr8007lsERNS_11std_ostreamERKNS_8StreamerINS_3FooEEE"
// XFAIL: *
namespace pr8007 {