[LLVMbugs] [Bug 19751] New: rejects-valid if parenthesized temporary is incremented, due to incorrect disambiguation
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 14 16:56:17 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19751
Bug ID: 19751
Summary: rejects-valid if parenthesized temporary is
incremented, due to incorrect disambiguation
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: richard-llvm at metafoo.co.uk
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang incorrectly rejects this:
struct X { void operator++(int); };
void f() { (X())++; }
... because it believes the (X()) is a cast. I think this *only* goes wrong for
++ and --, where we need more than one token of lookahead past the
parenthesized type/expression.
When ParseCastExpression is called from the disambiguation code, it should call
the inner ParseCastExpression in the same disambiguation mode, and put its
token back if that call finds a non-cast-expression.
Amusingly, EDG and GCC have the same bug.
--
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/20140514/d426d738/attachment.html>
More information about the llvm-bugs
mailing list