[cfe-commits] r171088 - in /cfe/trunk: lib/Sema/Sema.cpp test/SemaCXX/warn-func-not-needed.cpp
Rafael EspĂndola
rafael.espindola at gmail.com
Wed Dec 26 11:36:50 PST 2012
On 25 December 2012 23:43, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
> dgregor, I committed this as it was the lowest risk patch to fix the
> regression. Let me know if you think we should change the side marking
> the decls used instead.
I now went back and think that we should do it. The problem is that
with two phase lookup in
static void f();
static void f();
template<typename T>
static void g() {
f();
}
static void f() {
}
void h() {
g<int>();
}
the call to f refers to the second decl, but it is only marked used at
the end of the translation unit during instantiation, after the third
f decl has been linked in.
Is the attached patch OK?
Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 2218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121226/2c0c6602/attachment.obj>
More information about the cfe-commits
mailing list