[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags
Takuya Shimizu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 9 05:39:25 PDT 2023
hazohelet accepted this revision.
hazohelet added a comment.
I think it would be helpful to point to the subobject source range when diagnosing errors in subobject dtors, so I left some suggestions.
Otherwise this LGTM. Thanks!
================
Comment at: clang/lib/AST/ExprConstant.cpp:6663
APValue *SubobjectValue = &Value.getStructField(FD->getFieldIndex());
- if (!HandleDestructionImpl(Info, CallLoc, Subobject, *SubobjectValue,
+ if (!HandleDestructionImpl(Info, CallRange, Subobject, *SubobjectValue,
FD->getType()))
----------------
================
Comment at: clang/lib/AST/ExprConstant.cpp:6682
APValue *SubobjectValue = &Value.getStructBase(BasesLeft);
- if (!HandleDestructionImpl(Info, CallLoc, Subobject, *SubobjectValue,
+ if (!HandleDestructionImpl(Info, CallRange, Subobject, *SubobjectValue,
BaseType))
----------------
It's not the problem of this patch, but it might be nice to have `CXXBaseSpecifier::getTypeSourceRange` or alike because this is an interesting source range.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156604/new/
https://reviews.llvm.org/D156604
More information about the cfe-commits
mailing list