[LLVMbugs] [Bug 7655] New: Declaration-or-expression ambiguity resolution picks incorrectly for complicated expressions
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jul 15 13:57:47 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7655
Summary: Declaration-or-expression ambiguity resolution picks
incorrectly for complicated expressions
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: dgregor at apple.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Given this insane code:
struct X {
template<typename T> X(T);
X(int, int);
X operator()(int, int) const;
};
template<typename T, typename U> struct Y { };
X *x;
void f() {
int y = 0;
X (*x)(int(y), int(y)) = Y<int, float>(), ++y;
}
Clang, like gcc, determines that the second statement in "x" is a declaration,
when in fact it's an expression. The problem is that we don't fully parse the
initializer after the '=' to determine whether what follows the ',' is another
declarator or not.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list