http://llvm.org/bugs/show_bug.cgi?id=12128

             Bug #: 12128
           Summary: Should odr-use of a template function odr-use the
                    template arguments?
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified


Basically, the idea is, is the following testcase valid?

template<typename T> T f() { return; }
template<int (*F)()> void g() { }
void g() { g<f<int>>(); }

With my semi-recent changes, we don't try to instantiate f<int>; given that we
don't need the definition for IRGen, are we required to instantiate it?  If we
are required to instantiate, is it because g<f<int>> is odr-used, or some other
reason?

It's sort of a silly edge case, given that as far as I can tell, this won't
ever cause us to reject valid code, but I figured it was worth clarifying the
rules here.

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to