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

            Bug ID: 17585
           Summary: Diagnostics for template keywords showing up inside
                    local classes aren't good
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

consider:

void foo() {
  template <typename> int i;
}

we issue:

error: expected expression

gcc provides a better error:

error: a template declaration cannot appear at block scope


another case:

void foo() {
  struct S { template <typename> int i; };
}

we issue:

error: member 'i' declared as a template

gcc provides:

invalid declaration of member template in local class



These plain english messages are very nice, we should do something similar.

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