[LLVMbugs] [Bug 9552] New: Suboptimal error message for invalid template-parameter-list

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 25 11:02:55 PDT 2011


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

           Summary: Suboptimal error message for invalid
                    template-parameter-list
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: jonathan.sauer at gmx.de
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The following (incorrect) code:

template <typename A, B>
struct Foo;

template <typename A, B, C>
struct Bar;


results in:

$ /opt/bin/clang clang.cpp
clang.cpp:1:23: error: unknown type name 'B'
template <typename A, B>
                      ^
clang.cpp:4:24: error: parse error
template <typename A, B, C>
                       ^
clang.cpp:4:26: error: unknown type name 'C'
template <typename A, B, C>
                         ^
3 errors generated.


All three errors should propably changed to something like "incomplete template
parameter".

My version of clang:

$ /opt/bin/clang --version
clang version 3.0 (trunk 127993)
Target: x86_64-apple-darwin10
Thread model: posix

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