[clang-tools-extra] [clang-tidy][NFC] Move isOutOfLine matcher into utils::Matchers (PR #228547)

via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 2 13:51:15 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

The build failed before running any tests. Click on a failure below to see the details.

<details>
<summary>[code=1] tools/clang/tools/extra/clang-tidy/modernize/CMakeFiles/obj.clangTidyModernizeModule.dir/UseEqualsDefaultCheck.cpp.o</summary>

```
FAILED: [code=1] tools/clang/tools/extra/clang-tidy/modernize/CMakeFiles/obj.clangTidyModernizeModule.dir/UseEqualsDefaultCheck.cpp.o
sccache /opt/llvm/bin/clang++ -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/clang-tidy/modernize -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/clang-tidy/modernize -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/clang-tidy -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/clang/tools/extra/clang-tidy/modernize/CMakeFiles/obj.clangTidyModernizeModule.dir/UseEqualsDefaultCheck.cpp.o -MF tools/clang/tools/extra/clang-tidy/modernize/CMakeFiles/obj.clangTidyModernizeModule.dir/UseEqualsDefaultCheck.cpp.o.d -o tools/clang/tools/extra/clang-tidy/modernize/CMakeFiles/obj.clangTidyModernizeModule.dir/UseEqualsDefaultCheck.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp:53:8: error: reference to 'internal' is ambiguous
53 | static internal::Matcher<Expr> accessToFieldInVar(const FieldDecl *Field,
|        ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/ASTMatchers/ASTMatchFinder.h:293:11: note: candidate found by name lookup is 'clang::ast_matchers::internal'
293 | namespace internal {
|           ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/clang-tidy/modernize/../utils/Matchers.h:165:1: note: candidate found by name lookup is 'clang::tidy::matchers::internal'
165 | AST_MATCHER_P(Stmt, isStatementIdenticalToBoundNode, std::string, ID) {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/ASTMatchers/ASTMatchersMacros.h:131:3: note: expanded from macro 'AST_MATCHER_P'
131 |   AST_MATCHER_P_OVERLOAD(Type, DefineMatcher, ParamType, Param, 0)
|   ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/ASTMatchers/ASTMatchersMacros.h:135:13: note: expanded from macro 'AST_MATCHER_P_OVERLOAD'
135 |   namespace internal {                                                         \
|             ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp:55:10: error: no viable conversion from returned value of type '::clang::ast_matchers::internal::Matcher<Expr>' to function return type 'int'
55 |   return ignoringImpCasts(
|          ^~~~~~~~~~~~~~~~~
56 |       memberExpr(hasObjectExpression(declRefExpr(to(varDecl(equalsNode(Var))))),
|       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 |                  member(fieldDecl(equalsNode(Field)))));
|                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/ASTMatchers/ASTMatchersInternal.h:624:3: note: candidate function
624 |   operator DynTypedMatcher() const & { return Implementation; }
|   ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/ASTMatchers/ASTMatchersInternal.h:626:3: note: candidate function
626 |   operator DynTypedMatcher() && { return std::move(Implementation); }
|   ^
2 errors generated.
```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/228547


More information about the cfe-commits mailing list