[LLVMbugs] [Bug 19593] New: bad diagnostic on "this" as parameter name

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 28 16:50:35 PDT 2014


            Bug ID: 19593
           Summary: bad diagnostic on "this" as parameter name
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nlewycky at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


struct A {
 static void B(A* this) {}

$ clang a.cc
a.cc:2:19: error: expected ')'
 static void B(A* this) {}
a.cc:2:15: note: to match this '('
 static void B(A* this) {}
1 error generated.

We could have errored on the attempt to use the "this" keyword as a variable
name, then created the variable anyways.

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/20140428/faeaab89/attachment.html>

More information about the llvm-bugs mailing list