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

           Summary: Annoying -Wunused-function
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


The following code:

namespace {
template<class T>
inline void char_less(T t1, T t2)
{ }

template<>
inline void char_less<char>(char t1, char t2)
{ }

}

Is triggered by -Wunused-function :

warning: unused function 'char_less' [-Wunused-function]
inline void char_less<char>(char t1, char t2)

Putting functions in unnamed namespaces is a common trick. While
-Wunused-function is not triggered by the templated function, it is triggered
by the specialization.

-- 
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