[llvm-bugs] [Bug 38463] New: Declaration disambiguation is too greedy

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 6 10:39:09 PDT 2018


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

            Bug ID: 38463
           Summary: Declaration disambiguation is too greedy
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: blitzrakete at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

struct X {
  void operator=(int);
} x;

int main() {
  1 + 1, X(x) = 4; // ok
  X(x) = 4, 1 + 1; // clang fails
}

clang cannot compile the second statement, because it thinks it is a
declaration, even though it is not. EDG compiles this just fine (gcc and MSVC
do not).

-- 
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/20180806/3e6bc4b1/attachment.html>


More information about the llvm-bugs mailing list