[PATCH] D141175: [test] Split out Annotations from `TestingSupport`
GMNGeoffrey accepted this revision. GMNGeoffrey added a comment. This revision is now accepted and ready to land. LGTM (+/- nits), but maybe good to get review from someone more closely associated with the TestingSupport library Comment at: utils/bazel/llvm-project-overlay/llvm/BUILD.bazel:4464 +# Split out of TestingSupport to allow using this with a different gmock/gtest version. +cc_library( I think this comment is now a bit redundant Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141175/new/ https://reviews.llvm.org/D141175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D141175: [test] Split out Annotations from `TestingSupport`
rupprecht updated this revision to Diff 488381. rupprecht added a comment. - Remove redundant comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141175/new/ https://reviews.llvm.org/D141175 Files: clang-tools-extra/clangd/unittests/Annotations.h clang-tools-extra/clangd/unittests/CMakeLists.txt clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp clang-tools-extra/clangd/unittests/FindTargetTests.cpp clang-tools-extra/clangd/unittests/SourceCodeTests.cpp clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp clang-tools-extra/include-cleaner/unittests/CMakeLists.txt clang-tools-extra/include-cleaner/unittests/FindHeadersTest.cpp clang-tools-extra/include-cleaner/unittests/LocateSymbolTest.cpp clang-tools-extra/include-cleaner/unittests/RecordTest.cpp clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp clang-tools-extra/pseudo/unittests/BracketTest.cpp clang-tools-extra/pseudo/unittests/CMakeLists.txt clang-tools-extra/unittests/clang-tidy/CMakeLists.txt clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp clang/docs/tools/clang-formatted-files.txt clang/unittests/AST/CMakeLists.txt clang/unittests/AST/DeclTest.cpp clang/unittests/AST/SourceLocationTest.cpp clang/unittests/Analysis/FlowSensitive/CMakeLists.txt clang/unittests/Analysis/FlowSensitive/SignAnalysisTest.cpp clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp clang/unittests/Analysis/FlowSensitive/TestingSupport.h clang/unittests/Analysis/FlowSensitive/TransferBranchTest.cpp clang/unittests/Sema/CMakeLists.txt clang/unittests/Sema/CodeCompleteTest.cpp clang/unittests/Tooling/CMakeLists.txt clang/unittests/Tooling/SourceCodeTest.cpp clang/unittests/Tooling/Syntax/CMakeLists.txt clang/unittests/Tooling/Syntax/TokensTest.cpp clang/unittests/Tooling/Syntax/TreeTestBase.cpp clang/unittests/Tooling/Syntax/TreeTestBase.h llvm/include/llvm/Testing/Annotations/Annotations.h llvm/include/llvm/Testing/Support/Annotations.h llvm/lib/Testing/Annotations/Annotations.cpp llvm/lib/Testing/Annotations/CMakeLists.txt llvm/lib/Testing/CMakeLists.txt llvm/lib/Testing/Support/Annotations.cpp llvm/lib/Testing/Support/CMakeLists.txt llvm/unittests/Support/AnnotationsTest.cpp llvm/unittests/Support/CMakeLists.txt llvm/unittests/Testing/Annotations/AnnotationsTest.cpp llvm/unittests/Testing/Annotations/CMakeLists.txt llvm/unittests/Testing/CMakeLists.txt utils/bazel/llvm-project-overlay/llvm/BUILD.bazel Index: utils/bazel/llvm-project-overlay/llvm/BUILD.bazel === --- utils/bazel/llvm-project-overlay/llvm/BUILD.bazel +++ utils/bazel/llvm-project-overlay/llvm/BUILD.bazel @@ -4450,18 +4450,26 @@ "lib/Testing/Support/*.cpp", "lib/Testing/Support/*.h", ]), -hdrs = glob([ -"include/llvm/Testing/Support/*.h", -]), +hdrs = glob(["include/llvm/Testing/Support/*.h"]), copts = llvm_copts, deps = [ ":Support", +":TestingAnnotations", ":config", "//third-party/unittest:gmock", "//third-party/unittest:gtest", ], ) +cc_library( +name = "TestingAnnotations", +testonly = True, +srcs = ["lib/Testing/Annotations/Annotations.cpp"], +hdrs = ["include/llvm/Testing/Annotations/Annotations.h"], +copts = llvm_copts, +deps = [":Support"], +) + # Begin testonly binary utilities Index: llvm/unittests/Testing/CMakeLists.txt === --- llvm/unittests/Testing/CMakeLists.txt +++ llvm/unittests/Testing/CMakeLists.txt @@ -1,2 +1,3 @@ add_subdirectory(ADT) +add_subdirectory(Annotations) add_subdirectory(Support) Index: llvm/unittests/Testing/Annotations/CMakeLists.txt === --- /dev/null +++ llvm/unittests/Testing/Annotations/CMakeLists.txt @@ -0,0 +1,10 @@ +set(LLVM_LINK_COMPONENTS + Support + TestingAnnotations + ) + +add_llvm_unittest(TestingAnnotationTests + AnnotationsTest.cpp + ) + +target_link_libraries(TestingAnnotationTests PRIVATE LLVMTestingAnnotations) Index: llvm/unittests/Testing/Annotations/AnnotationsTest.cpp === --- llvm/unittests/Testing/Annotations/AnnotationsTest.cpp +++ llvm/unittests/Testing/Annotations/AnnotationsTest.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===--===// -#include "llvm/Testing/Support/Annotations.h" +#include "llvm/Testing/Annotations/Annotations.h" #include "gmock/gmock.h" #inc
[PATCH] D141175: [test] Split out Annotations from `TestingSupport`
sammccall accepted this revision. sammccall added a comment. This looks good, i think it also doesn't belong in Testing/Support because it's not a peer to anything in Support/. I think you can use `PARTIAL_SOURCES_INTENDED` to partition directories, but it's unusual and a bit of a hassle. Either way seems fine to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141175/new/ https://reviews.llvm.org/D141175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D141175: [test] Split out Annotations from `TestingSupport`
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3432f4bf86e7: [test] Split out Annotations from `TestingSupport` (authored by rupprecht). Changed prior to commit: https://reviews.llvm.org/D141175?vs=488381&id=488762#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141175/new/ https://reviews.llvm.org/D141175 Files: clang-tools-extra/clangd/unittests/Annotations.h clang-tools-extra/clangd/unittests/CMakeLists.txt clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp clang-tools-extra/clangd/unittests/FindTargetTests.cpp clang-tools-extra/clangd/unittests/SourceCodeTests.cpp clang-tools-extra/clangd/unittests/tweaks/TweakTesting.h clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp clang-tools-extra/include-cleaner/unittests/CMakeLists.txt clang-tools-extra/include-cleaner/unittests/FindHeadersTest.cpp clang-tools-extra/include-cleaner/unittests/LocateSymbolTest.cpp clang-tools-extra/include-cleaner/unittests/RecordTest.cpp clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp clang-tools-extra/pseudo/unittests/BracketTest.cpp clang-tools-extra/pseudo/unittests/CMakeLists.txt clang-tools-extra/unittests/clang-tidy/CMakeLists.txt clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp clang/docs/tools/clang-formatted-files.txt clang/unittests/AST/CMakeLists.txt clang/unittests/AST/DeclTest.cpp clang/unittests/AST/SourceLocationTest.cpp clang/unittests/Analysis/FlowSensitive/CMakeLists.txt clang/unittests/Analysis/FlowSensitive/SignAnalysisTest.cpp clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp clang/unittests/Analysis/FlowSensitive/TestingSupport.h clang/unittests/Analysis/FlowSensitive/TransferBranchTest.cpp clang/unittests/Sema/CMakeLists.txt clang/unittests/Sema/CodeCompleteTest.cpp clang/unittests/Tooling/CMakeLists.txt clang/unittests/Tooling/SourceCodeTest.cpp clang/unittests/Tooling/Syntax/CMakeLists.txt clang/unittests/Tooling/Syntax/TokensTest.cpp clang/unittests/Tooling/Syntax/TreeTestBase.cpp clang/unittests/Tooling/Syntax/TreeTestBase.h llvm/include/llvm/Testing/Annotations/Annotations.h llvm/include/llvm/Testing/Support/Annotations.h llvm/lib/Testing/Annotations/Annotations.cpp llvm/lib/Testing/Annotations/CMakeLists.txt llvm/lib/Testing/CMakeLists.txt llvm/lib/Testing/Support/Annotations.cpp llvm/lib/Testing/Support/CMakeLists.txt llvm/unittests/Support/AnnotationsTest.cpp llvm/unittests/Support/CMakeLists.txt llvm/unittests/Testing/Annotations/AnnotationsTest.cpp llvm/unittests/Testing/Annotations/CMakeLists.txt llvm/unittests/Testing/CMakeLists.txt utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel utils/bazel/llvm-project-overlay/llvm/BUILD.bazel Index: utils/bazel/llvm-project-overlay/llvm/BUILD.bazel === --- utils/bazel/llvm-project-overlay/llvm/BUILD.bazel +++ utils/bazel/llvm-project-overlay/llvm/BUILD.bazel @@ -4516,9 +4516,7 @@ "lib/Testing/Support/*.cpp", "lib/Testing/Support/*.h", ]), -hdrs = glob([ -"include/llvm/Testing/Support/*.h", -]), +hdrs = glob(["include/llvm/Testing/Support/*.h"]), copts = llvm_copts, deps = [ ":Support", @@ -4528,6 +4526,15 @@ ], ) +cc_library( +name = "TestingAnnotations", +testonly = True, +srcs = ["lib/Testing/Annotations/Annotations.cpp"], +hdrs = ["include/llvm/Testing/Annotations/Annotations.h"], +copts = llvm_copts, +deps = [":Support"], +) + # Begin testonly binary utilities Index: utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel === --- utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel +++ utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel @@ -29,6 +29,7 @@ "//clang:tooling", "//llvm:Core", "//llvm:Support", +"//llvm:TestingAnnotations", "//llvm:TestingSupport", "//third-party/unittest:gmock", "//third-party/unittest:gtest", @@ -136,6 +137,7 @@ "//clang:tooling", "//llvm:Support", "//llvm:TestingADT", +"//llvm:TestingAnnotations", "//llvm:TestingSupport", "//third-party/unittest:gmock", "//third-party/unittest:gtest", @@ -342,6 +344,7 @@ "//clang:parse", "//clang:sema", "//clang:tooling", +"//llvm:TestingAnnotations", "//llvm:TestingSupport", "//third-party/unittest:gmock", "//third-party/unittest:gtest", @@ -420,6 +423,7 @@ "//clang:tooling_refactoring",