Skip to content

Commit 99d11a5

Browse files
committed
reset the cache when setting deducing this functions
1 parent 7472299 commit 99d11a5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

clang/include/clang/AST/Expr.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3040,7 +3040,15 @@ class CallExpr : public Expr {
30403040
bool hasStoredFPFeatures() const { return CallExprBits.HasFPFeatures; }
30413041

30423042
bool usesMemberSyntax() const { return CallExprBits.ExplicitObjectMemFunUsingMemberSyntax; }
3043-
void setUsesMemberSyntax(bool V = true) { CallExprBits.ExplicitObjectMemFunUsingMemberSyntax = V; }
3043+
void setUsesMemberSyntax(bool V = true) {
3044+
CallExprBits.ExplicitObjectMemFunUsingMemberSyntax = V;
3045+
// Because the source location may be different for explicit
3046+
// member, we reset the cached values.
3047+
if(CallExprBits.HasTrailingSourceLoc) {
3048+
CallExprBits.HasTrailingSourceLoc = false;
3049+
setTrailingSourceLocs();
3050+
}
3051+
}
30443052

30453053
bool isCoroElideSafe() const { return CallExprBits.IsCoroElideSafe; }
30463054
void setCoroElideSafe(bool V = true) { CallExprBits.IsCoroElideSafe = V; }

0 commit comments

Comments
 (0)