http://llvm.org/bugs/show_bug.cgi?id=11192
Summary: Invocation of operator ++ does not get a location
Product: clang
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
If you run this you can see that the invocations of operator ++ gets <invalid
loc> while operator << has a valid location
=====
// Command line: c-index-test -test-load-source all file.cpp
struct A
{
int value;
A & operator ++ () // preincrement
{
value += 1;
return (*this);
}
A & operator ++ (int) // postincrement
{
value += 2;
return (*this);
}
A & operator << (int rhs)
{
value = 23;
return (*this);
}
};
A a;
void func (void)
{
++a; // CHECK: <invalid loc>:0:0: DeclRefExpr=operator++:6:7
a++; // CHECK: <invalid loc>:0:0: DeclRefExpr=operator++:11:7
a << 23; // CHECK: file.cpp:29:5: DeclRefExpr=operator<<:16:7
}
=====
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs