[LLVMbugs] [Bug 9168] Wrong source location for CXXMemberCallExpr
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Mar 3 14:04:41 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9168
Alex <alr at google.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #4 from Alex <alr at google.com> 2011-03-03 16:04:41 CST ---
I am using r126480. The issue does not seem to be fixed.
The static type I am using is clang::Stmt.
BTW, here is my current workaround:
clang::SourceLocation GetStmtBeginLocation(clang::Stmt* stmt) {
clang::SourceLocation loc = stmt->getLocStart();
if (clang::CXXMemberCallExpr* expr =
dyn_cast<clang::CXXMemberCallExpr>(stmt)) {
if (clang::MemberExpr* member_expr =
dyn_cast<clang::MemberExpr>(expr->getCallee())) {
if (member_expr->hasQualifier()) {
loc = member_expr->getQualifierRange().getBegin();
}
}
}
return loc;
}
P.S. Sorry it took me so long to reply. Was out of office for two weeks.
--
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