@@ -2404,6 +2404,10 @@ isApplicable(const ResolvedRangeInfo &Info, DiagnosticEngine &Diag) {
24042404 bool ConditionUseOnlyAllowedFunctions = false ;
24052405 StringRef ExpectName;
24062406
2407+ MacroWalking getMacroWalkingBehavior () const override {
2408+ return MacroWalking::Arguments;
2409+ }
2410+
24072411 PostWalkResult<Expr *> walkToExprPost (Expr *E) override {
24082412 if (E->getKind () != ExprKind::DeclRef)
24092413 return Action::Continue (E);
@@ -2502,6 +2506,10 @@ bool RefactoringActionConvertToSwitchStmt::performChange() {
25022506 public:
25032507 std::string VarName;
25042508
2509+ MacroWalking getMacroWalkingBehavior () const override {
2510+ return MacroWalking::Arguments;
2511+ }
2512+
25052513 PostWalkResult<Expr *> walkToExprPost (Expr *E) override {
25062514 if (E->getKind () != ExprKind::DeclRef)
25072515 return Action::Continue (E);
@@ -2519,6 +2527,10 @@ bool RefactoringActionConvertToSwitchStmt::performChange() {
25192527
25202528 SmallString<64 > ConditionalPattern = SmallString<64 >();
25212529
2530+ MacroWalking getMacroWalkingBehavior () const override {
2531+ return MacroWalking::Arguments;
2532+ }
2533+
25222534 PostWalkResult<Expr *> walkToExprPost (Expr *E) override {
25232535 auto *BE = dyn_cast<BinaryExpr>(E);
25242536 if (!BE)
@@ -3669,6 +3681,10 @@ class SynthesizedCodablePrinter : public ASTWalker {
36693681public:
36703682 SynthesizedCodablePrinter (ASTPrinter &Printer) : Printer(Printer) {}
36713683
3684+ MacroWalking getMacroWalkingBehavior () const override {
3685+ return MacroWalking::Arguments;
3686+ }
3687+
36723688 PreWalkAction walkToDeclPre (Decl *D) override {
36733689 auto *VD = dyn_cast<ValueDecl>(D);
36743690 if (!VD)
@@ -3849,6 +3865,10 @@ static NumberLiteralExpr *getTrailingNumberLiteral(ResolvedCursorInfoPtr Tok) {
38493865
38503866 explicit FindLiteralNumber (Expr *parent) : parent(parent) { }
38513867
3868+ MacroWalking getMacroWalkingBehavior () const override {
3869+ return MacroWalking::Arguments;
3870+ }
3871+
38523872 PreWalkResult<Expr *> walkToExprPre (Expr *expr) override {
38533873 if (auto *literal = dyn_cast<NumberLiteralExpr>(expr)) {
38543874 // The sub-expression must have the same start loc with the outermost
@@ -5434,6 +5454,10 @@ struct CallbackClassifier {
54345454 : ErrParam(ErrParam) {}
54355455 bool foundUnwrap () const { return FoundUnwrap; }
54365456
5457+ MacroWalking getMacroWalkingBehavior () const override {
5458+ return MacroWalking::Arguments;
5459+ }
5460+
54375461 PreWalkResult<Expr *> walkToExprPre (Expr *E) override {
54385462 // Don't walk into ternary conditionals as they may have additional
54395463 // conditions such as err != nil that make a force unwrap now valid.
0 commit comments