[llvm-bugs] [Bug 35576] New: Template variables could use a -Wvexing-parse diagnostic

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Dec 8 03:55:44 PST 2017


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

            Bug ID: 35576
           Summary: Template variables could use a -Wvexing-parse
                    diagnostic
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: t.p.northover at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

Consider:

    template<typename T> int junk1(T::junk);
    template<typename T> int junk2(typename T::junk);

The first of these (in C++14 onwards) declares a template variable initialized
by T::junk, the second declares a template function taking T::junk as a
parameter. They are disturbingly similar.

So Richard Smith suggested I should file a bug report to get some kind of
warning in place under -Wvexing-parse.

-- 
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/20171208/2586abf6/attachment.html>


More information about the llvm-bugs mailing list