[llvm-bugs] [Bug 46439] New: Duplicated error message "expected a qualified name after 'typename'"

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 24 07:35:49 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46439

            Bug ID: 46439
           Summary: Duplicated error message "expected a qualified name
                    after 'typename'"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: haoxintu at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

This code, bug.cc, clang emits two duplicated error messages

$cat bug.cc
void 
foo1
(typename )
{}

typedef int A;
void
foo2
(typename ::A)
{}

$clang++-trunk -c bug.cc
bug.cc:3:11: error: expected a qualified name after 'typename'
(typename )
          ^
bug.cc:3:11: error: expected a qualified name after 'typename'
2 errors generated.

The function foo2() is compiled well, but foo1() emits the duplicated messages,
so I guess clang might have something wrong with diagnostic information in this
case.   

I have tested it in almost all clang versions, and they all have this issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200624/5bf6385a/attachment.html>


More information about the llvm-bugs mailing list