[llvm-bugs] [Bug 41192] New: clang can't parse a global-namespace-qualfiied qualified-id after a type definition

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 21 19:02:42 PDT 2019


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

            Bug ID: 41192
           Summary: clang can't parse a global-namespace-qualfiied
                    qualified-id after a type definition
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: compile-fail
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

I believe this testcase is valid:

struct A;
struct B { static A a; };
struct A {} ::B::a;

Clang rejects this; it's apparently surprised to see a '::' appearing after a
class definition and incorrectly believes a semicolon was missing.

Interestingly, GCC rejects this too, in the same way. ICC and MSVC accept.

-- 
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/20190322/9306f0c6/attachment.html>


More information about the llvm-bugs mailing list