[clang] [clang] Compute accurate begin location for CallExpr with explicit object parameter (PR #117841)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 26 20:03:19 PST 2024
================
@@ -1639,6 +1639,13 @@ SourceLocation CallExpr::getBeginLoc() const {
if (const auto *OCE = dyn_cast<CXXOperatorCallExpr>(this))
return OCE->getBeginLoc();
+ if (const CXXMethodDecl *Method =
+ dyn_cast_or_null<const CXXMethodDecl>(getCalleeDecl());
----------------
zwuis wrote:
```suggestion
dyn_cast_if_present<const CXXMethodDecl>(getCalleeDecl());
```
https://github.com/llvm/llvm-project/pull/117841
More information about the cfe-commits
mailing list