================ @@ -183,40 +209,44 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs<CXXMethodDecl>("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *ReplacementFunction = StartsWithFunction ? StartsWithFunction : EndsWithFunction; if (ComparisonExpr->getBeginLoc().isMacroID()) ---------------- nicovank wrote:
This should ignore weird macro cases, I think this is better. This will probably require moving some existing tests to the end of that function and removing the `CHECK`s. ```suggestion if (ComparisonExpr->getBeginLoc().isMacroID() || FindExpr->getBeginLoc().isMacroID()) ``` https://github.com/llvm/llvm-project/pull/116033 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits