[clang] [Clang] Optimize some `getBeginLoc` implementations (PR #141058)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu May 22 06:46:28 PDT 2025
================
@@ -3028,6 +3043,19 @@ class CallExpr : public Expr {
bool hasStoredFPFeatures() const { return CallExprBits.HasFPFeatures; }
+ bool usesMemberSyntax() const {
+ return CallExprBits.ExplicitObjectMemFunUsingMemberSyntax;
+ }
+ void setUsesMemberSyntax(bool V = true) {
+ CallExprBits.ExplicitObjectMemFunUsingMemberSyntax = V;
+ // Because the source location may be different for explicit
+ // member, we reset the cached values.
+ if (CallExprBits.HasTrailingSourceLoc) {
+ CallExprBits.HasTrailingSourceLoc = false;
+ updateTrailingSourceLoc();
----------------
erichkeane wrote:
Since this is a 'cache' sorta thing... why do we update it right away? Could we instead just wait until the first caller?
https://github.com/llvm/llvm-project/pull/141058
More information about the cfe-commits
mailing list