[LLVMbugs] [Bug 13365] valgrind error emitting template diagnostic
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jul 15 18:16:35 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13365
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |richard-llvm at metafoo.co.uk
Resolution| |FIXED
--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> 2012-07-15 20:16:35 CDT ---
Fixed in r160245. It was this classic bug:
struct TemplateArgument { /* ... */ };
struct DeducedTemplateArgument : TemplateArgument { /* ... */ };
struct Sema::InstantiatingTemplate {
InstantiatingTemplate(/*...*/ const TemplateArgument *Arg,
unsigned NumArgs /*...*/);
};
Sema::DeduceFoo(const SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
InstantiatingTemplate Inst(Deduced.data(), Deduced.size());
// ...
}
I've switched InstantiatingTemplate over to ArrayRef to prevent recurrences of
this here. I wonder if we can implement a warning to catch this; specifically,
if we have:
f(..., x.f1(), x.f2(), ...)
where 'x.f1()' undergoes an implicit derived-to-base conversion, and 'x.f2()'
is of integral type, ALARM BELLS. [Likewise for cases like "f(..., expr, expr +
k, ...)", if there's an implicit derived-to-base conversion for both
arguments].
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list