Skip to content

Remove clang-rename #108988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 18, 2024
Merged

Conversation

AaronBallman
Copy link
Collaborator

clang-rename has largely been superseded by clangd and this project
hasn't received much attention in many years. Further, our
documentation on it still claims it's in very early stages of
development despite being ~10 years old. One of the primary people
driving the tool has mentioned that they don't believe there is a
reason to continue to support it unless it's still being actively
used (https://reviews.llvm.org/D148439#4303202) and I've found no
evidence to suggest that is the case.

Original RFC: https://discourse.llvm.org/t/rfc-time-to-deprecate-remove-clang-rename/70707

clang-rename has largely been superseded by clangd and this project
hasn't received much attention in many years. Further, our
documentation on it still claims it's in very early stages of
development despite being ~10 years old. One of the primary people
driving the tool has mentioned that they don't believe there is a
reason to continue to support it unless it's still being actively
used (https://reviews.llvm.org/D148439#4303202) and I've found no
evidence to suggest that is the case.

Original RFC: https://discourse.llvm.org/t/rfc-time-to-deprecate-remove-clang-rename/70707
@AaronBallman AaronBallman added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:tooling LibTooling labels Sep 17, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 17, 2024

@llvm/pr-subscribers-clang-tools-extra

@llvm/pr-subscribers-clang

Author: Aaron Ballman (AaronBallman)

Changes

clang-rename has largely been superseded by clangd and this project
hasn't received much attention in many years. Further, our
documentation on it still claims it's in very early stages of
development despite being ~10 years old. One of the primary people
driving the tool has mentioned that they don't believe there is a
reason to continue to support it unless it's still being actively
used (https://reviews.llvm.org/D148439#4303202) and I've found no
evidence to suggest that is the case.

Original RFC: https://discourse.llvm.org/t/rfc-time-to-deprecate-remove-clang-rename/70707


Patch is 128.89 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/108988.diff

59 Files Affected:

  • (modified) clang-tools-extra/CODE_OWNERS.TXT (+1-1)
  • (modified) clang-tools-extra/docs/ReleaseNotes.rst (-3)
  • (removed) clang-tools-extra/docs/clang-rename.rst (-168)
  • (modified) clang-tools-extra/docs/index.rst (-1)
  • (modified) clang-tools-extra/test/CMakeLists.txt (-3)
  • (removed) clang-tools-extra/test/clang-apply-replacements/ClangRenameClassReplacements.cpp (-11)
  • (modified) clang/docs/ClangFormattedStatus.rst (-5)
  • (modified) clang/docs/tools/clang-formatted-files.txt (-1)
  • (modified) clang/test/CMakeLists.txt (-1)
  • (removed) clang/test/clang-rename/ClassAsTemplateArgument.cpp (-21)
  • (removed) clang/test/clang-rename/ClassFindByName.cpp (-10)
  • (removed) clang/test/clang-rename/ClassSimpleRenaming.cpp (-14)
  • (removed) clang/test/clang-rename/ClassTestMulti.cpp (-11)
  • (removed) clang/test/clang-rename/ClassTestMultiByName.cpp (-8)
  • (removed) clang/test/clang-rename/ComplexFunctionOverride.cpp (-47)
  • (removed) clang/test/clang-rename/ComplicatedClassType.cpp (-63)
  • (removed) clang/test/clang-rename/Ctor.cpp (-14)
  • (removed) clang/test/clang-rename/CtorInitializer.cpp (-17)
  • (removed) clang/test/clang-rename/DeclRefExpr.cpp (-24)
  • (removed) clang/test/clang-rename/ForceMulti.cpp (-8)
  • (removed) clang/test/clang-rename/ForwardClassDecl.cpp (-4)
  • (removed) clang/test/clang-rename/FunctionMacro.cpp (-20)
  • (removed) clang/test/clang-rename/FunctionOverride.cpp (-13)
  • (removed) clang/test/clang-rename/FunctionTemplate.cpp (-19)
  • (removed) clang/test/clang-rename/FunctionWithClassFindByName.cpp (-12)
  • (removed) clang/test/clang-rename/IncludeHeaderWithSymbol.cpp (-10)
  • (removed) clang/test/clang-rename/Inputs/HeaderWithSymbol.h (-1)
  • (removed) clang/test/clang-rename/Inputs/OffsetToNewName.yaml (-6)
  • (removed) clang/test/clang-rename/Inputs/QualifiedNameToNewName.yaml (-6)
  • (removed) clang/test/clang-rename/InvalidNewName.cpp (-2)
  • (removed) clang/test/clang-rename/InvalidOffset.cpp (-9)
  • (removed) clang/test/clang-rename/InvalidQualifiedName.cpp (-4)
  • (removed) clang/test/clang-rename/MemberExprMacro.cpp (-22)
  • (removed) clang/test/clang-rename/Namespace.cpp (-13)
  • (removed) clang/test/clang-rename/NoNewName.cpp (-4)
  • (removed) clang/test/clang-rename/NonExistFile.cpp (-2)
  • (removed) clang/test/clang-rename/TemplateClassInstantiation.cpp (-42)
  • (removed) clang/test/clang-rename/TemplateCtor.cpp (-10)
  • (removed) clang/test/clang-rename/TemplateTypename.cpp (-24)
  • (removed) clang/test/clang-rename/TemplatedClassFunction.cpp (-27)
  • (removed) clang/test/clang-rename/Typedef.cpp (-8)
  • (removed) clang/test/clang-rename/UserDefinedConversion.cpp (-26)
  • (removed) clang/test/clang-rename/Variable.cpp (-33)
  • (removed) clang/test/clang-rename/VariableMacro.cpp (-21)
  • (removed) clang/test/clang-rename/VariableTemplate.cpp (-32)
  • (removed) clang/test/clang-rename/YAMLInput.cpp (-10)
  • (modified) clang/tools/CMakeLists.txt (-1)
  • (removed) clang/tools/clang-rename/CMakeLists.txt (-26)
  • (removed) clang/tools/clang-rename/ClangRename.cpp (-242)
  • (removed) clang/tools/clang-rename/clang-rename.el (-80)
  • (removed) clang/tools/clang-rename/clang-rename.py (-70)
  • (modified) clang/unittests/CMakeLists.txt (-1)
  • (removed) clang/unittests/Rename/CMakeLists.txt (-29)
  • (removed) clang/unittests/Rename/ClangRenameTest.h (-116)
  • (removed) clang/unittests/Rename/RenameAliasTest.cpp (-303)
  • (removed) clang/unittests/Rename/RenameClassTest.cpp (-820)
  • (removed) clang/unittests/Rename/RenameEnumTest.cpp (-189)
  • (removed) clang/unittests/Rename/RenameFunctionTest.cpp (-573)
  • (removed) clang/unittests/Rename/RenameMemberTest.cpp (-228)
diff --git a/clang-tools-extra/CODE_OWNERS.TXT b/clang-tools-extra/CODE_OWNERS.TXT
index 4cf80aa2b0b826..2831ec7e25f59f 100644
--- a/clang-tools-extra/CODE_OWNERS.TXT
+++ b/clang-tools-extra/CODE_OWNERS.TXT
@@ -23,7 +23,7 @@ D: clang-tidy
 
 N: Manuel Klimek
 E: [email protected]
-D: clang-rename, all parts of clang-tools-extra not covered by someone else
+D: all parts of clang-tools-extra not covered by someone else
 
 N: Sam McCall
 E: [email protected]
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index b5b164833e1575..8a540b9606df4a 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -87,9 +87,6 @@ Improvements to clang-doc
 Improvements to clang-query
 ---------------------------
 
-Improvements to clang-rename
-----------------------------
-
 The improvements are...
 
 Improvements to clang-tidy
diff --git a/clang-tools-extra/docs/clang-rename.rst b/clang-tools-extra/docs/clang-rename.rst
deleted file mode 100644
index e13d8c3ad25f98..00000000000000
--- a/clang-tools-extra/docs/clang-rename.rst
+++ /dev/null
@@ -1,168 +0,0 @@
-============
-Clang-Rename
-============
-
-.. contents::
-
-See also:
-
-.. toctree::
-   :maxdepth: 1
-
-
-:program:`clang-rename` is a C++ refactoring tool. Its purpose is to perform
-efficient renaming actions in large-scale projects such as renaming classes,
-functions, variables, arguments, namespaces etc.
-
-The tool is in a very early development stage, so you might encounter bugs and
-crashes. Submitting reports with information about how to reproduce the issue
-to `the LLVM bugtracker <https://bugs.llvm.org>`_ will definitely help the
-project. If you have any ideas or suggestions, you might want to put a feature
-request there.
-
-Using Clang-Rename
-==================
-
-:program:`clang-rename` is a `LibTooling
-<https://clang.llvm.org/docs/LibTooling.html>`_-based tool, and it's easier to
-work with if you set up a compile command database for your project (for an
-example of how to do this see `How To Setup Tooling For LLVM
-<https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html>`_). You can also
-specify compilation options on the command line after `--`:
-
-.. code-block:: console
-
-  $ clang-rename -offset=42 -new-name=foo test.cpp -- -Imy_project/include -DMY_DEFINES ...
-
-
-To get an offset of a symbol in a file run
-
-.. code-block:: console
-
-  $ grep -FUbo 'foo' file.cpp
-
-
-The tool currently supports renaming actions inside a single translation unit
-only. It is planned to extend the tool's functionality to support multi-TU
-renaming actions in the future.
-
-:program:`clang-rename` also aims to be easily integrated into popular text
-editors, such as Vim and Emacs, and improve the workflow of users.
-
-Although a command line interface exists, it is highly recommended to use the
-text editor interface instead for better experience.
-
-You can also identify one or more symbols to be renamed by giving the fully
-qualified name:
-
-.. code-block:: console
-
-  $ clang-rename -qualified-name=foo -new-name=bar test.cpp
-
-Renaming multiple symbols at once is supported, too. However,
-:program:`clang-rename` doesn't accept both `-offset` and `-qualified-name` at
-the same time. So, you can either specify multiple `-offset` or
-`-qualified-name`.
-
-.. code-block:: console
-
-  $ clang-rename -offset=42 -new-name=bar1 -offset=150 -new-name=bar2 test.cpp
-
-or
-
-.. code-block:: console
-
-  $ clang-rename -qualified-name=foo1 -new-name=bar1 -qualified-name=foo2 -new-name=bar2 test.cpp
-
-
-Alternatively, {offset | qualified-name} / new-name pairs can be put into a YAML
-file:
-
-.. code-block:: yaml
-
-  ---
-  - Offset:         42
-    NewName:        bar1
-  - Offset:         150
-    NewName:        bar2
-  ...
-
-or
-
-.. code-block:: yaml
-
-  ---
-  - QualifiedName:  foo1
-    NewName:        bar1
-  - QualifiedName:  foo2
-    NewName:        bar2
-  ...
-
-That way you can avoid spelling out all the names as command line arguments:
-
-.. code-block:: console
-
-  $ clang-rename -input=test.yaml test.cpp
-
-:program:`clang-rename` offers the following options:
-
-.. code-block:: console
-
-  $ clang-rename --help
-  USAGE: clang-rename [subcommand] [options] <source0> [... <sourceN>]
-
-  OPTIONS:
-
-  Generic Options:
-
-    -help                      - Display available options (-help-hidden for more)
-    -help-list                 - Display list of available options (-help-list-hidden for more)
-    -version                   - Display the version of this program
-
-  clang-rename common options:
-
-    -export-fixes=<filename>   - YAML file to store suggested fixes in.
-    -extra-arg=<string>        - Additional argument to append to the compiler command line
-                                 Can be used several times.
-    -extra-arg-before=<string> - Additional argument to prepend to the compiler command line
-                                 Can be used several times.
-    -force                     - Ignore nonexistent qualified names.
-    -i                         - Overwrite edited <file>s.
-    -input=<string>            - YAML file to load oldname-newname pairs from.
-    -new-name=<string>         - The new name to change the symbol to.
-    -offset=<uint>             - Locates the symbol by offset as opposed to <line>:<column>.
-    -p <string>                - Build path
-    -pl                        - Print the locations affected by renaming to stderr.
-    -pn                        - Print the found symbol's name prior to renaming to stderr.
-    -qualified-name=<string>   - The fully qualified name of the symbol.
-
-Vim Integration
-===============
-
-You can call :program:`clang-rename` directly from Vim! To set up
-:program:`clang-rename` integration for Vim see
-`clang/tools/clang-rename/clang-rename.py
-<https://github.com/llvm/llvm-project/blob/main/clang/tools/clang-rename/clang-rename.py>`_.
-
-Please note that **you have to save all buffers, in which the replacement will
-happen before running the tool**.
-
-Once installed, you can point your cursor to symbols you want to rename, press
-`<leader>cr` and type new desired name. The `<leader> key
-<http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_3)#Map_leader>`_
-is a reference to a specific key defined by the mapleader variable and is bound
-to backslash by default.
-
-Emacs Integration
-=================
-
-You can also use :program:`clang-rename` while using Emacs! To set up
-:program:`clang-rename` integration for Emacs see
-`clang-rename/tool/clang-rename.el
-<https://github.com/llvm/llvm-project/blob/main/clang/tools/clang-rename/clang-rename.el>`_.
-
-Once installed, you can point your cursor to symbols you want to rename, press
-`M-X`, type `clang-rename` and new desired name.
-
-Please note that **you have to save all buffers, in which the replacement will
-happen before running the tool**.
diff --git a/clang-tools-extra/docs/index.rst b/clang-tools-extra/docs/index.rst
index d5c00b89a1555e..9f7324fcf74197 100644
--- a/clang-tools-extra/docs/index.rst
+++ b/clang-tools-extra/docs/index.rst
@@ -19,7 +19,6 @@ Contents
    clang-include-fixer
    modularize
    pp-trace
-   clang-rename
    clangd <https://clangd.llvm.org/>
    clang-doc
 
diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt
index 0953ff2531e1a1..d72a117166a08b 100644
--- a/clang-tools-extra/test/CMakeLists.txt
+++ b/clang-tools-extra/test/CMakeLists.txt
@@ -28,9 +28,6 @@ configure_lit_site_cfg(
   )
 
 set(CLANG_TOOLS_TEST_DEPS
-  # For the clang-apply-replacements test that uses clang-rename.
-  clang-rename
-
   # For the clang-doc tests that emit bitcode files.
   llvm-bcanalyzer
 
diff --git a/clang-tools-extra/test/clang-apply-replacements/ClangRenameClassReplacements.cpp b/clang-tools-extra/test/clang-apply-replacements/ClangRenameClassReplacements.cpp
deleted file mode 100644
index 2b478bbf900df8..00000000000000
--- a/clang-tools-extra/test/clang-apply-replacements/ClangRenameClassReplacements.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir -p %t/fixes
-// RUN: cat %s > %t.cpp
-// RUN: clang-rename -offset=254 -new-name=Bar -export-fixes=%t/fixes/clang-rename.yaml %t.cpp --
-// RUN: clang-apply-replacements %t
-// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
-
-class Foo {}; // CHECK: class Bar {};
-
-// Use grep -FUbo 'Foo' <file> to get the correct offset of Cla when changing
-// this file.
diff --git a/clang/docs/ClangFormattedStatus.rst b/clang/docs/ClangFormattedStatus.rst
index 0ee0782879ef6b..b917e077679b47 100644
--- a/clang/docs/ClangFormattedStatus.rst
+++ b/clang/docs/ClangFormattedStatus.rst
@@ -809,11 +809,6 @@ tree in terms of conformance to :doc:`ClangFormat` as of: March 06, 2022 17:32:2
      - `4`
      - `0`
      - :good:`100%`
-   * - clang/tools/clang-rename
-     - `1`
-     - `1`
-     - `0`
-     - :good:`100%`
    * - clang/tools/clang-repl
      - `1`
      - `1`
diff --git a/clang/docs/tools/clang-formatted-files.txt b/clang/docs/tools/clang-formatted-files.txt
index 48ded9c7545547..fa40ea74fb7e7d 100644
--- a/clang/docs/tools/clang-formatted-files.txt
+++ b/clang/docs/tools/clang-formatted-files.txt
@@ -608,7 +608,6 @@ clang/tools/clang-refactor/ClangRefactor.cpp
 clang/tools/clang-refactor/TestSupport.cpp
 clang/tools/clang-refactor/TestSupport.h
 clang/tools/clang-refactor/ToolRefactoringResultConsumer.h
-clang/tools/clang-rename/ClangRename.cpp
 clang/tools/clang-repl/ClangRepl.cpp
 clang/tools/clang-scan-deps/ClangScanDeps.cpp
 clang/tools/clang-shlib/clang-shlib.cpp
diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt
index 299a35723b59d5..2d84b0d73053f6 100644
--- a/clang/test/CMakeLists.txt
+++ b/clang/test/CMakeLists.txt
@@ -72,7 +72,6 @@ list(APPEND CLANG_TEST_DEPS
   clang-tblgen
   clang-offload-bundler
   clang-import-test
-  clang-rename
   clang-refactor
   clang-diff
   clang-installapi
diff --git a/clang/test/clang-rename/ClassAsTemplateArgument.cpp b/clang/test/clang-rename/ClassAsTemplateArgument.cpp
deleted file mode 100644
index 2e09a5b529e753..00000000000000
--- a/clang/test/clang-rename/ClassAsTemplateArgument.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-class Foo /* Test 1 */ {};    // CHECK: class Bar /* Test 1 */ {};
-
-template <typename T>
-void func() {}
-
-template <typename T>
-class Baz {};
-
-int main() {
-  func<Foo>();                // CHECK: func<Bar>();
-  Baz<Foo> /* Test 2 */ obj;  // CHECK: Baz<Bar> /* Test 2 */ obj;
-  return 0;
-}
-
-// Test 1.
-// RUN: clang-rename -offset=7 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-// Test 2.
-// RUN: clang-rename -offset=215 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-
-// To find offsets after modifying the file, use:
-//   grep -Ubo 'Foo.*' <file>
diff --git a/clang/test/clang-rename/ClassFindByName.cpp b/clang/test/clang-rename/ClassFindByName.cpp
deleted file mode 100644
index 4430891ec4b1e0..00000000000000
--- a/clang/test/clang-rename/ClassFindByName.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-class Foo {         // CHECK: class Bar {
-};
-
-int main() {
-  Foo *Pointer = 0; // CHECK: Bar *Pointer = 0;
-  return 0;
-}
-
-// Test 1.
-// RUN: clang-rename -qualified-name=Foo -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
diff --git a/clang/test/clang-rename/ClassSimpleRenaming.cpp b/clang/test/clang-rename/ClassSimpleRenaming.cpp
deleted file mode 100644
index 086f55736cb72f..00000000000000
--- a/clang/test/clang-rename/ClassSimpleRenaming.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-class Foo /* Test 1 */ {              // CHECK: class Bar /* Test 1 */ {
-public:
-  void foo(int x);
-};
-
-void Foo::foo(int x) /* Test 2 */ {}  // CHECK: void Bar::foo(int x) /* Test 2 */ {}
-
-// Test 1.
-// RUN: clang-rename -offset=6 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-// Test 2.
-// RUN: clang-rename -offset=109 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-
-// To find offsets after modifying the file, use:
-//   grep -Ubo 'Foo.*' <file>
diff --git a/clang/test/clang-rename/ClassTestMulti.cpp b/clang/test/clang-rename/ClassTestMulti.cpp
deleted file mode 100644
index 81e65c76065214..00000000000000
--- a/clang/test/clang-rename/ClassTestMulti.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-class Foo1 /* Offset 1 */ { // CHECK: class Bar1 /* Offset 1 */ {
-};
-
-class Foo2 /* Offset 2 */ { // CHECK: class Bar2 /* Offset 2 */ {
-};
-
-// Test 1.
-// RUN: clang-rename -offset=6 -new-name=Bar1 -offset=76 -new-name=Bar2 %s -- | sed 's,//.*,,' | FileCheck %s
-
-// To find offsets after modifying the file, use:
-//   grep -Ubo 'Foo.*' <file>
diff --git a/clang/test/clang-rename/ClassTestMultiByName.cpp b/clang/test/clang-rename/ClassTestMultiByName.cpp
deleted file mode 100644
index 61b69a1bdf4cac..00000000000000
--- a/clang/test/clang-rename/ClassTestMultiByName.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-class Foo1 { // CHECK: class Bar1
-};
-
-class Foo2 { // CHECK: class Bar2
-};
-
-// Test 1.
-// RUN: clang-rename -qualified-name=Foo1 -new-name=Bar1 -qualified-name=Foo2 -new-name=Bar2 %s -- | sed 's,//.*,,' | FileCheck %s
diff --git a/clang/test/clang-rename/ComplexFunctionOverride.cpp b/clang/test/clang-rename/ComplexFunctionOverride.cpp
deleted file mode 100644
index ccf3a20e540024..00000000000000
--- a/clang/test/clang-rename/ComplexFunctionOverride.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-struct A {
-  virtual void foo() {} /* Test 1 */    // CHECK: virtual void bar() {}
-};
-
-struct B : A {
-  void foo() override {} /* Test 2 */   // CHECK: void bar() override {}
-};
-
-struct C : B {
-  void foo() override {} /* Test 3 */   // CHECK: void bar() override {}
-};
-
-struct D : B {
-  void foo() override {} /* Test 4 */   // CHECK: void bar() override {}
-};
-
-struct E : D {
-  void foo() override {} /* Test 5 */   // CHECK: void bar() override {}
-};
-
-int main() {
-  A a;
-  a.foo();                              // CHECK: a.bar();
-  B b;
-  b.foo();                              // CHECK: b.bar();
-  C c;
-  c.foo();                              // CHECK: c.bar();
-  D d;
-  d.foo();                              // CHECK: d.bar();
-  E e;
-  e.foo();                              // CHECK: e.bar();
-  return 0;
-}
-
-// Test 1.
-// RUN: clang-rename -offset=26 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s
-// Test 2.
-// RUN: clang-rename -offset=109 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s
-// Test 3.
-// RUN: clang-rename -offset=201 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s
-// Test 4.
-// RUN: clang-rename -offset=293 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s
-// Test 5.
-// RUN: clang-rename -offset=385 -new-name=bar %s -- | sed 's,//.*,,' | FileCheck %s
-
-// To find offsets after modifying the file, use:
-//   grep -Ubo 'foo.*' <file>
diff --git a/clang/test/clang-rename/ComplicatedClassType.cpp b/clang/test/clang-rename/ComplicatedClassType.cpp
deleted file mode 100644
index 8801953031273a..00000000000000
--- a/clang/test/clang-rename/ComplicatedClassType.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// Forward declaration.
-class Foo; /* Test 1 */               // CHECK: class Bar; /* Test 1 */
-
-class Baz {
-  virtual int getValue() const = 0;
-};
-
-class Foo : public Baz  { /* Test 2 */// CHECK: class Bar : public Baz {
-public:
-  Foo(int value = 0) : x(value) {}    // CHECK: Bar(int value = 0) : x(value) {}
-
-  Foo &operator++(int) {              // CHECK: Bar &operator++(int) {
-    x++;
-    return *this;
-  }
-
-  bool operator<(Foo const &rhs) {    // CHECK: bool operator<(Bar const &rhs) {
-    return this->x < rhs.x;
-  }
-
-  int getValue() const {
-    return 0;
-  }
-
-private:
-  int x;
-};
-
-int main() {
-  Foo *Pointer = 0;                   // CHECK: Bar *Pointer = 0;
-  Foo Variable = Foo(10);             // CHECK: Bar Variable = Bar(10);
-  for (Foo it; it < Variable; it++) { // CHECK: for (Bar it; it < Variable; it++) {
-  }
-  const Foo *C = new Foo();           // CHECK: const Bar *C = new Bar();
-  const_cast<Foo *>(C)->getValue();   // CHECK: const_cast<Bar *>(C)->getValue();
-  Foo foo;                            // CHECK: Bar foo;
-  const Baz &BazReference = foo;
-  const Baz *BazPointer = &foo;
-  dynamic_cast<const Foo &>(BazReference).getValue();     /* Test 3 */ // CHECK: dynamic_cast<const Bar &>(BazReference).getValue();
-  dynamic_cast<const Foo *>(BazPointer)->getValue();      /* Test 4 */ // CHECK: dynamic_cast<const Bar *>(BazPointer)->getValue();
-  reinterpret_cast<const Foo *>(BazPointer)->getValue();  /* Test 5 */ // CHECK: reinterpret_cast<const Bar *>(BazPointer)->getValue();
-  static_cast<const Foo &>(BazReference).getValue();      /* Test 6 */ // CHECK: static_cast<const Bar &>(BazReference).getValue();
-  static_cast<const Foo *>(BazPointer)->getValue();       /* Test 7 */ // CHECK: static_cast<const Bar *>(BazPointer)->getValue();
-  return 0;
-}
-
-// Test 1.
-// RUN: clang-rename -offset=30 -new-name=Bar %s -- -frtti | sed 's,//.*,,' | FileCheck %s
-// Test 2.
-// RUN: clang-rename -offset=155 -new-name=Bar %s -- -frtti | sed 's,//.*,,' | FileCheck %s
-// Test 3.
-// RUN: clang-rename -offset=1133 -new-name=Bar %s -- -frtti | sed 's,//.*,,' | FileCheck %s
-// Test 4.
-// RUN: clang-rename -offset=1266 -new-name=Bar %s -- -frtti | sed 's,//.*,,' | FileCheck %s
-// Test 5.
-// RUN: clang-rename -offset=1402 -new-name=Bar %s -- -frtti | sed 's,//.*,,' | FileCheck %s
-// Test 6.
-// RUN: clang-rename -offset=1533 -new-name=Bar %s -- -frtti | sed 's,//.*,,' | FileCheck %s
-// Test 7.
-// RUN: clang-rename -offset=1665 -new-name=Bar %s -- -frtti | sed 's,//.*,,' | FileCheck %s
-
-// To find offsets after modifying the file, use:
-//   grep -Ubo 'Foo.*' <file>
diff --git a/clang/test/clang-rename/Ctor.cpp b/clang/test/clang-rename/Ctor.cpp
deleted file mode 100644
index 9908a4123ddfc0..00000000000000
--- a/clang/test/clang-rename/Ctor.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-class Foo {                   // CHECK: class Bar {
-public:
-  Foo();    /* Test 1 */      // CHECK: Bar();
-};
-
-Foo::Foo()  /* Test 2 */ {}   // CHECK: Bar::Bar()  /* Test 2 */ {}
-
-// Test 1.
-// RUN: clang-rename -offset=62 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-// Test 2.
-// RUN: clang-rename -offset=116 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-
-// To find offsets after modifying the file, use:
-//   grep -Ubo 'Foo.*' <file>
diff --git a/clang/test/clang-rename/CtorInitializer.cpp b/clang/test/clang-rename/CtorInitializer.cpp
deleted file mode 100644
index fed4f5b06c2755..00000000000000
--- a/clang/test/clang-rename/CtorInitializer.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-class Baz {};
-
-class Qux {
-  Baz Foo;         /* Test 1 */       // CHECK: Baz Bar;
-public:
-  Qux();
-};
-
-Qux::Qux() : Foo() /* Test 2 */ {}    // CHECK: Qux::Qux() : Bar() /* Test 2 */ {}
-
-// Test 1.
-// RUN: clang-rename -offset=33 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-// Test 2.
-// RUN: clang-rename -offset=118 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-
-// To find offsets after modifying the file, use:
-//   grep -Ubo 'Foo.*' <file>
diff --git a/clang/test/clang-rename/DeclRefExpr.cpp b/clang/test/clang-rename/DeclRefExpr.cpp
deleted file mode 100644
index 6462862d82adfa..00000000000000
--- a/clang/test/clang-rename/DeclRefExpr.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-class C {
-public:
-  static int Foo; /* Test 1 */  // CHECK: static int Bar;
-};
-
-int foo(int x) { return 0; }
-#define MACRO(a) foo(a)
-
-int main() {
-  C::Foo = 1;     /* Test 2 */  // CHECK: C::Bar = 1;
-  MACRO(C::Foo);                // CHECK: MACRO(C::Bar);
-  int y = C::Foo; /* Test 3 */  // CHECK: int y = C::Bar;
-  return 0;
-}
-
-// Test 1.
-// RUN: clang-rename -offset=31 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-// Test 2.
-// RUN: clang-rename -offset=152 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-// Test 3.
-// RUN: clang-rename -offset=271 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
-
-// To find offsets after modifying the file, use:
-//   grep -Ubo 'Foo.*' <file>
diff --git a/clang/test/clang-rename/ForceMulti.cpp b/clang/test/clang-rename/ForceMulti.cpp
deleted file mode 100644
index 41983ce260c826..00000000000000
--- a/clang/test/clang-rename/ForceMulti.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-class B /* Test 1 */ { // CHECK: class B2 /* Test 1 */ {
-};
-
-class D : public B /* Test 1 */ { // C...
[truncated]

@cor3ntin
Copy link
Contributor

can you inspect these files that still reference clang-rename?

lib/Tooling/Refactoring/Rename/RenamingAction.cpp:        errs() << "clang-rename: renamed at: " << SourceMgr.getFilename(FullLoc)
lib/Tooling/Refactoring/Rename/USRFindingAction.cpp:            "clang-rename could not find symbol (offset %0)");
lib/Tooling/Refactoring/Rename/USRFindingAction.cpp:          DiagnosticsEngine::Error, "clang-rename could not find symbol %0");

@cor3ntin
Copy link
Contributor

Also these bazel build scripts

llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn:    "//clang/tools/clang-rename",
llvm/utils/gn/secondary/clang/test/BUILD.gn:    "//clang/tools/clang-rename",
llvm/utils/gn/secondary/clang/tools/clang-rename/BUILD.gn:executable("clang-rename") {
utils/bazel/llvm-project-overlay/clang/BUILD.bazel:    "tools/clang-rename/clang-rename.el",
utils/bazel/llvm-project-overlay/clang/BUILD.bazel:    name = "clang-rename",
utils/bazel/llvm-project-overlay/clang/BUILD.bazel:    srcs = glob(["tools/clang-rename/*.cpp"]),

@AaronBallman
Copy link
Collaborator Author

can you inspect these files that still reference clang-rename?

lib/Tooling/Refactoring/Rename/RenamingAction.cpp:        errs() << "clang-rename: renamed at: " << SourceMgr.getFilename(FullLoc)
lib/Tooling/Refactoring/Rename/USRFindingAction.cpp:            "clang-rename could not find symbol (offset %0)");
lib/Tooling/Refactoring/Rename/USRFindingAction.cpp:          DiagnosticsEngine::Error, "clang-rename could not find symbol %0");

Yeah, those confused me as well -- I think it's just happenstance that it uses clang-rename in those strings because as best I can tell, there's no relationship between clang-rename and Tooling/Refactoring/Rename. CC @hyp who may have more information.

@llvmbot llvmbot added the bazel "Peripheral" support tier build system: utils/bazel label Sep 17, 2024
@AaronBallman
Copy link
Collaborator Author

Also these bazel build scripts

llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn:    "//clang/tools/clang-rename",
llvm/utils/gn/secondary/clang/test/BUILD.gn:    "//clang/tools/clang-rename",
llvm/utils/gn/secondary/clang/tools/clang-rename/BUILD.gn:executable("clang-rename") {
utils/bazel/llvm-project-overlay/clang/BUILD.bazel:    "tools/clang-rename/clang-rename.el",
utils/bazel/llvm-project-overlay/clang/BUILD.bazel:    name = "clang-rename",
utils/bazel/llvm-project-overlay/clang/BUILD.bazel:    srcs = glob(["tools/clang-rename/*.cpp"]),

I took a shot at those; I think gn and Bazel are traditionally outside the scope of what community supports though, so I don't know if I've done this right or not.

Copy link
Member

@kirillbobyrev kirillbobyrev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, clang-rename should probably be removed. I haven't touched it in years and its usability has dropped over the last few years after I re-implemented the most useful functionality in clangd.

@mizvekov
Copy link
Contributor

AFAIK the bazel build scripts are externally automatically updated based on the cmake scripts, so I don't think we should be touching them.

Copy link
Collaborator

@rupprecht rupprecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel changes LGTM. Updating them is totally not necessary, but appreciated if you do. Thanks!

@rupprecht
Copy link
Collaborator

AFAIK the bazel build scripts are externally automatically updated based on the cmake scripts, so I don't think we should be touching them.

Bazel files are not updated automatically. Updating them in the same commit is fine (but not required).

GN files are updated by the GN syncbot (e.g. a40b36f), but needs manual intervention from time to time. I assume it's probably the same as Bazel, i.e. fine to update them in the same commit. At any rate, GN and Bazel are both in the same peripheral tier -- if the change you've made to either GN or Bazel is incorrect, that's fine; someone who's invested in GN or Bazel will fix it later.

@AaronBallman AaronBallman merged commit 40c45b6 into llvm:main Sep 18, 2024
10 checks passed
@AaronBallman AaronBallman deleted the aballman-remove-clang-rename branch September 18, 2024 12:26
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 18, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-android running on sanitizer-buildbot-android while building clang-tools-extra,clang,llvm,utils at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[ DISABLED ] AddressSanitizer.DISABLED_TSDTest
[ RUN      ] AddressSanitizer.IgnoreTest
[       OK ] AddressSanitizer.IgnoreTest (0 ms)
[ RUN      ] AddressSanitizer.SignalTest
[       OK ] AddressSanitizer.SignalTest (242 ms)
[ RUN      ] AddressSanitizer.ReallocTest
[       OK ] AddressSanitizer.ReallocTest (37 ms)
[ RUN      ] AddressSanitizer.WrongFreeTest
[       OK ] AddressSanitizer.WrongFreeTest (146 ms)
[ RUN      ] AddressSanitizer.LongJmpTest
[       OK ] AddressSanitizer.LongJmpTest (0 ms)
[ RUN      ] AddressSanitizer.ThreadStackReuseTest
[       OK ] AddressSanitizer.ThreadStackReuseTest (8 ms)
[ DISABLED ] AddressSanitizer.DISABLED_MemIntrinsicUnalignedAccessTest
[ DISABLED ] AddressSanitizer.DISABLED_LargeFunctionSymbolizeTest
[ DISABLED ] AddressSanitizer.DISABLED_MallocFreeUnwindAndSymbolizeTest
[ RUN      ] AddressSanitizer.UseThenFreeThenUseTest
[       OK ] AddressSanitizer.UseThenFreeThenUseTest (137 ms)
[ RUN      ] AddressSanitizer.FileNameInGlobalReportTest
[       OK ] AddressSanitizer.FileNameInGlobalReportTest (131 ms)
[ DISABLED ] AddressSanitizer.DISABLED_StressStackReuseAndExceptionsTest
[ RUN      ] AddressSanitizer.MlockTest
[       OK ] AddressSanitizer.MlockTest (0 ms)
[ DISABLED ] AddressSanitizer.DISABLED_DemoThreadedTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoStackTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoThreadStackTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowIn
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowLeft
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowRight
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFHigh
[ DISABLED ] AddressSanitizer.DISABLED_DemoOOM
[ DISABLED ] AddressSanitizer.DISABLED_DemoDoubleFreeTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoNullDerefTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoFunctionStaticTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoTooMuchMemoryTest
[ RUN      ] AddressSanitizer.LongDoubleNegativeTest
[       OK ] AddressSanitizer.LongDoubleNegativeTest (0 ms)
[----------] 19 tests from AddressSanitizer (25782 ms total)

[----------] Global test environment tear-down
[==========] 22 tests from 2 test suites ran. (25786 ms total)
[  PASSED  ] 22 tests.

  YOU HAVE 1 DISABLED TEST

skipping tests on aarch64

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild

@@@STEP_FAILURE@@@
Step 9 (run cmake) failure: run cmake (failure)
...
-- Compiling and running to test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Compiling and running to test HAVE_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Compiling and running to test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- compiled but failed to run
CMake Warning at /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/third-party/benchmark/CMakeLists.txt:319 (message):
  Using std::regex with exceptions disabled is not fully supported
-- Compiling and running to test HAVE_STEADY_CLOCK
-- Performing Test HAVE_POSIX_REGEX -- compiled but failed to run
-- Compiling and running to test HAVE_STEADY_CLOCK
CMake Warning at /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/third-party/benchmark/CMakeLists.txt:319 (message):
  Using std::regex with exceptions disabled is not fully supported
-- Performing Test HAVE_STEADY_CLOCK -- compiled but failed to run
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Performing Test HAVE_STEADY_CLOCK -- compiled but failed to run
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Compiling and running to test HAVE_PTHREAD_AFFINITY
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Compiling and running to test HAVE_PTHREAD_AFFINITY
-- Performing Test HAVE_POSIX_REGEX -- compiled but failed to run
CMake Warning at /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/third-party/benchmark/CMakeLists.txt:319 (message):
  Using std::regex with exceptions disabled is not fully supported
-- Compiling and running to test HAVE_STEADY_CLOCK
-- Configuring done (25.0s)
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- Configuring done (25.1s)
-- Performing Test HAVE_STEADY_CLOCK -- compiled but failed to run
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Compiling and running to test HAVE_PTHREAD_AFFINITY
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- Configuring done (25.8s)
-- Generating done (2.7s)
-- Generating done (2.7s)
-- Build files have been written to: /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build_android_aarch64
-- Build files have been written to: /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build_android_i686
-- Generating done (2.7s)
-- Build files have been written to: /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build_android_arm
Step 10 (build android/aarch64) failure: build android/aarch64 (failure)
...
[607/652] Building CXX object lib/DebugInfo/Symbolize/CMakeFiles/LLVMSymbolize.dir/SymbolizableObjectFile.cpp.o
[608/652] Building CXX object lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/LLLexer.cpp.o
[609/652] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Native/SymbolCache.cpp.o
[610/652] Building CXX object lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/AArch64TargetParser.cpp.o
[611/652] Building CXX object lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/TargetParser.cpp.o
[612/652] Building CXX object lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/SubtargetFeature.cpp.o
[613/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/Architecture.cpp.o
[614/652] Building CXX object lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/RISCVTargetParser.cpp.o
[615/652] Building CXX object lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/X86TargetParser.cpp.o
[616/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/ArchitectureSet.cpp.o
[617/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/PackedVersion.cpp.o
[618/652] Building CXX object lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/Triple.cpp.o
[619/652] Building CXX object lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/RISCVISAInfo.cpp.o
[620/652] Linking CXX static library lib/libLLVMTargetParser.a
[621/652] Linking CXX static library lib/libLLVMBinaryFormat.a
[622/652] Linking CXX static library lib/libLLVMCore.a
[623/652] Linking CXX static library lib/libLLVMBitReader.a
[624/652] Linking CXX static library lib/libLLVMMC.a
[625/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/Platform.cpp.o
[626/652] Linking CXX static library lib/libLLVMMCParser.a
[627/652] Building CXX object lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/Parser.cpp.o
[628/652] Building Opts.inc...
[629/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/TextAPIError.cpp.o
[630/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/Symbol.cpp.o
[631/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/RecordVisitor.cpp.o
[632/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/SymbolSet.cpp.o
[633/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/Target.cpp.o
[634/652] Building CXX object lib/DebugInfo/Symbolize/CMakeFiles/LLVMSymbolize.dir/Symbolize.cpp.o
[635/652] Building CXX object tools/llvm-symbolizer/CMakeFiles/llvm-symbolizer.dir/llvm-symbolizer-driver.cpp.o
[636/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/InterfaceFile.cpp.o
[637/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/RecordsSlice.cpp.o
[638/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/Utils.cpp.o
[639/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/TextStubCommon.cpp.o
[640/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/TextStubV5.cpp.o
[641/652] Building CXX object tools/llvm-symbolizer/CMakeFiles/llvm-symbolizer.dir/llvm-symbolizer.cpp.o
[642/652] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/TextStub.cpp.o
[643/652] Linking CXX static library lib/libLLVMTextAPI.a
[644/652] Building CXX object lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/LLParser.cpp.o
[645/652] Linking CXX static library lib/libLLVMAsmParser.a
[646/652] Linking CXX static library lib/libLLVMIRReader.a
[647/652] Linking CXX static library lib/libLLVMObject.a
[648/652] Linking CXX static library lib/libLLVMDebugInfoDWARF.a
[649/652] Linking CXX static library lib/libLLVMDebugInfoPDB.a
[650/652] Linking CXX static library lib/libLLVMSymbolize.a
[651/652] Linking CXX static library lib/libLLVMDebuginfod.a
[652/652] Linking CXX executable bin/llvm-symbolizer
ninja: Entering directory `compiler_rt_build_android_aarch64'
ninja: error: loading 'build.ninja': No such file or directory

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
Step 19 (run instrumented asan tests [arm/aosp_coral-userdebug/AOSP.MASTER]) failure: run instrumented asan tests [arm/aosp_coral-userdebug/AOSP.MASTER] (failure)
...
[       OK ] AddressSanitizer.CallocReturnsZeroMem (8 ms)
[ DISABLED ] AddressSanitizer.DISABLED_TSDTest
[ RUN      ] AddressSanitizer.IgnoreTest
[       OK ] AddressSanitizer.IgnoreTest (0 ms)
[ RUN      ] AddressSanitizer.SignalTest
[       OK ] AddressSanitizer.SignalTest (331 ms)
[ RUN      ] AddressSanitizer.ReallocTest
[       OK ] AddressSanitizer.ReallocTest (22 ms)
[ RUN      ] AddressSanitizer.WrongFreeTest
[       OK ] AddressSanitizer.WrongFreeTest (226 ms)
[ RUN      ] AddressSanitizer.LongJmpTest
[       OK ] AddressSanitizer.LongJmpTest (0 ms)
[ RUN      ] AddressSanitizer.ThreadStackReuseTest
[       OK ] AddressSanitizer.ThreadStackReuseTest (1 ms)
[ DISABLED ] AddressSanitizer.DISABLED_MemIntrinsicUnalignedAccessTest
[ DISABLED ] AddressSanitizer.DISABLED_LargeFunctionSymbolizeTest
[ DISABLED ] AddressSanitizer.DISABLED_MallocFreeUnwindAndSymbolizeTest
[ RUN      ] AddressSanitizer.UseThenFreeThenUseTest
[       OK ] AddressSanitizer.UseThenFreeThenUseTest (290 ms)
[ RUN      ] AddressSanitizer.FileNameInGlobalReportTest
[       OK ] AddressSanitizer.FileNameInGlobalReportTest (307 ms)
[ DISABLED ] AddressSanitizer.DISABLED_StressStackReuseAndExceptionsTest
[ RUN      ] AddressSanitizer.MlockTest
[       OK ] AddressSanitizer.MlockTest (0 ms)
[ DISABLED ] AddressSanitizer.DISABLED_DemoThreadedTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoStackTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoThreadStackTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowIn
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowLeft
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowRight
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFHigh
[ DISABLED ] AddressSanitizer.DISABLED_DemoOOM
[ DISABLED ] AddressSanitizer.DISABLED_DemoDoubleFreeTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoNullDerefTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoFunctionStaticTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoTooMuchMemoryTest
[ RUN      ] AddressSanitizer.LongDoubleNegativeTest
[       OK ] AddressSanitizer.LongDoubleNegativeTest (0 ms)
[----------] 19 tests from AddressSanitizer (66344 ms total)

[----------] Global test environment tear-down
[==========] 22 tests from 2 test suites ran. (66347 ms total)
[  PASSED  ] 22 tests.

  YOU HAVE 1 DISABLED TEST

skipping tests on aarch64

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
Serial 17031FQCB00176
Step 24 (run instrumented asan tests [arm/bluejay-userdebug/TQ3A.230805.001]) failure: run instrumented asan tests [arm/bluejay-userdebug/TQ3A.230805.001] (failure)
...
[ DISABLED ] AddressSanitizer.DISABLED_TSDTest
[ RUN      ] AddressSanitizer.IgnoreTest
[       OK ] AddressSanitizer.IgnoreTest (0 ms)
[ RUN      ] AddressSanitizer.SignalTest
[       OK ] AddressSanitizer.SignalTest (242 ms)
[ RUN      ] AddressSanitizer.ReallocTest
[       OK ] AddressSanitizer.ReallocTest (37 ms)
[ RUN      ] AddressSanitizer.WrongFreeTest
[       OK ] AddressSanitizer.WrongFreeTest (146 ms)
[ RUN      ] AddressSanitizer.LongJmpTest
[       OK ] AddressSanitizer.LongJmpTest (0 ms)
[ RUN      ] AddressSanitizer.ThreadStackReuseTest
[       OK ] AddressSanitizer.ThreadStackReuseTest (8 ms)
[ DISABLED ] AddressSanitizer.DISABLED_MemIntrinsicUnalignedAccessTest
[ DISABLED ] AddressSanitizer.DISABLED_LargeFunctionSymbolizeTest
[ DISABLED ] AddressSanitizer.DISABLED_MallocFreeUnwindAndSymbolizeTest
[ RUN      ] AddressSanitizer.UseThenFreeThenUseTest
[       OK ] AddressSanitizer.UseThenFreeThenUseTest (137 ms)
[ RUN      ] AddressSanitizer.FileNameInGlobalReportTest
[       OK ] AddressSanitizer.FileNameInGlobalReportTest (131 ms)
[ DISABLED ] AddressSanitizer.DISABLED_StressStackReuseAndExceptionsTest
[ RUN      ] AddressSanitizer.MlockTest
[       OK ] AddressSanitizer.MlockTest (0 ms)
[ DISABLED ] AddressSanitizer.DISABLED_DemoThreadedTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoStackTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoThreadStackTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowIn
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowLeft
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFLowRight
[ DISABLED ] AddressSanitizer.DISABLED_DemoUAFHigh
[ DISABLED ] AddressSanitizer.DISABLED_DemoOOM
[ DISABLED ] AddressSanitizer.DISABLED_DemoDoubleFreeTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoNullDerefTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoFunctionStaticTest
[ DISABLED ] AddressSanitizer.DISABLED_DemoTooMuchMemoryTest
[ RUN      ] AddressSanitizer.LongDoubleNegativeTest
[       OK ] AddressSanitizer.LongDoubleNegativeTest (0 ms)
[----------] 19 tests from AddressSanitizer (25782 ms total)

[----------] Global test environment tear-down
[==========] 22 tests from 2 test suites ran. (25786 ms total)
[  PASSED  ] 22 tests.

  YOU HAVE 1 DISABLED TEST

skipping tests on aarch64

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
program finished with exit code 1
elapsedTime=1717.361407

rupprecht added a commit to rupprecht/llvm-project that referenced this pull request Sep 18, 2024
Removed in llvm#108988, the tool is fine but the glob for tests is now empty because all the tests were deleted.
rupprecht added a commit that referenced this pull request Sep 18, 2024
Removed in #108988, the tool is fine but the glob for tests is now empty
because all the tests were deleted.
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 19, 2024

LLVM Buildbot has detected a new failure on builder lld-x86_64-win running on as-worker-93 while building clang-tools-extra,clang,llvm,utils at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM-Unit :: Support/./SupportTests.exe/36/87' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe-LLVM-Unit-14664-36-87.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=87 GTEST_SHARD_INDEX=36 C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe
--

Script:
--
C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe --gtest_filter=ProgramEnvTest.CreateProcessLongPath
--
C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp(160): error: Expected equality of these values:
  0
  RC
    Which is: -2

C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp(163): error: fs::remove(Twine(LongPath)): did not return errc::success.
error number: 13
error message: permission denied



C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp:160
Expected equality of these values:
  0
  RC
    Which is: -2

C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp:163
fs::remove(Twine(LongPath)): did not return errc::success.
error number: 13
error message: permission denied




********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 19, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64-aix running on aix-ppc64 while building clang-tools-extra,clang,llvm,utils at step 3 "clean-build-dir".

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

Here is the relevant piece of the build log for the reference
Step 3 (clean-build-dir) failure: Delete failed. (failure) (timed out)
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: ClangScanDeps/verbose.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: rm -rf /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp
+ rm -rf /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp
RUN: at line 2: split-file /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp
+ split-file /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp
RUN: at line 3: sed -e "s|DIR|/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp|g" /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/cdb.json.in > /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/cdb.json
+ sed -e 's|DIR|/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp|g' /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/cdb.json.in
RUN: at line 5: /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/bin/clang-scan-deps -compilation-database /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/cdb.json -v -o /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/result.json 2>&1 | /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/bin/FileCheck /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test
+ /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/bin/clang-scan-deps -compilation-database /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/cdb.json -v -o /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/result.json
+ /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/bin/FileCheck /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test:6:11: error: CHECK: expected string not found in input
// CHECK: *** Virtual File System Stats:
          ^
<stdin>:1:1: note: scanning from here
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
^
<stdin>:1:8: note: possible intended match here
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
       ^

Input file: <stdin>
Check file: /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. 
check:6'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
check:6'1            ?                                                                                                     possible intended match
>>>>>>

--

********************


tmsri pushed a commit to tmsri/llvm-project that referenced this pull request Sep 19, 2024
clang-rename has largely been superseded by clangd and this project
hasn't received much attention in many years. Further, our
documentation on it still claims it's in very early stages of
development despite being ~10 years old. One of the primary people
driving the tool has mentioned that they don't believe there is a
reason to continue to support it unless it's still being actively
used (https://reviews.llvm.org/D148439#4303202) and I've found no
evidence to suggest that is the case.

Original RFC:
https://discourse.llvm.org/t/rfc-time-to-deprecate-remove-clang-rename/70707
tmsri pushed a commit to tmsri/llvm-project that referenced this pull request Sep 19, 2024
…109162)

Removed in llvm#108988, the tool is fine but the glob for tests is now empty
because all the tests were deleted.
milkice233 pushed a commit to fedora-riscv/llvm that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bazel "Peripheral" support tier build system: utils/bazel clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:tooling LibTooling clang Clang issues not falling into any other category clang-tools-extra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants