[clang] [clang][test] add testing for the AST matcher reference (PR #110258)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 13 21:55:18 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` running on `suse-gary-m68k-cross` while building `clang` at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/554

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
                 from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:13,
                 from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Tooling/DependencyScanning/DependencyScannerTest.cpp:17:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:511:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::UnusedFileScopedDecls’ [-Wattributes]
  511 | class Sema final : public SemaBase {
      |       ^~~~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:511:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::TentativeDefinitions’ [-Wattributes]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:511:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::ExtVectorDecls’ [-Wattributes]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Sema/Sema.h:511:7: warning: ‘clang::Sema’ declared with greater visibility than the type of its field ‘clang::Sema::DelegatingCtorDecls’ [-Wattributes]
[293/1122] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/StructuralEquivalenceTest.cpp.o
[294/1122] Building CXX object tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/ASTMatchersDocTests.cpp.o
FAILED: tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/ASTMatchersDocTests.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/unittests/ASTMatchers -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/ASTMatchersDocTests.cpp.o -MF tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/ASTMatchersDocTests.cpp.o.d -o tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/ASTMatchersDocTests.cpp.o -c /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/unittests/ASTMatchers/ASTMatchersDocTests.cpp
In file included from /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/unittests/ASTMatchers/ASTMatchersDocTests.cpp:10:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::Decl; T = clang::Decl]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
  652 |     }
      |     ^
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::OMPExecutableDirective; T = clang::OMPExecutableDirective]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::Attr; T = clang::Attr]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::NestedNameSpecifierLoc; T = clang::NestedNameSpecifierLoc]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::NestedNameSpecifier; T = clang::NestedNameSpecifier]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::NamespaceDecl; T = clang::NestedNameSpecifier]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::NamespaceAliasDecl; T = clang::NestedNameSpecifier]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::CXXRecordDecl; T = clang::NestedNameSpecifier]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::Type; T = clang::NestedNameSpecifier]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::TemplateTypeParmType; T = clang::TemplateTypeParmType]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::SubstTemplateTypeParmType; T = clang::SubstTemplateTypeParmType]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::UsingType; T = clang::UsingType]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::ElaboratedType; T = clang::ElaboratedType]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::TagType; T = clang::TagType]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::RecordType; T = clang::RecordType]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::UnaryTransformType; T = clang::UnaryTransformType]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h: In static member function ‘static std::optional<std::__cxx11::basic_string<char> > clang::ast_matchers::VerifyBoundNodeMatch<T>::Match::getMatchText(const U*, const clang::ASTContext&, clang::ast_matchers::MatchKind, bool) [with U = clang::DeducedTemplateSpecializationType; T = clang::DeducedTemplateSpecializationType]’:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/ASTMatchers/ASTMatchersTest.h:652:5: warning: control reaches end of non-void function [-Wreturn-type]

```

</details>

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


More information about the cfe-commits mailing list