Skip to content

Conversation

@Michael137
Copy link
Member

This patch works towards consolidating all Clang debug-info into the clang/test/DebugInfo directory (https://discourse.llvm.org/t/clang-test-location-of-clang-debug-info-tests/87958).

Here we move only the clang/test/CodeGenCXX tests. I created a CXX subdirectory for now because many of the tests I checked actually did seem C++-specific. There is probably overlap between the Generic and CXX subdirectory, but I haven't gone through and audited them all.

The list of files i came up with is:

  1. searched for anything with *debug-info* in the filename
  2. searched for occurrences of debug-info-kind in the tests

There's a couple of tests in clang/test/CodeGenCXX that still set -debug-info-kind. They probably don't need to do that, but I'm not changing that as part of this PR.

…ugInfo directory

This patch works towards consolidating all Clang debug-info into the `clang/test/DebugInfo` directory (https://discourse.llvm.org/t/clang-test-location-of-clang-debug-info-tests/87958).

Here we move only the `clang/test/CodeGenCXX` tests. I created a `CXX`
subdirectory for now because many of the tests I checked actually did
seem C++-specific. There is probably overlap between the `Generic` and
`CXX` subdirectory, but I haven't gone through and audited them all.

The list of files i came up with is:
1. searched for anything with `*debug-info*` in the filename
2. searched for occurrences of `debug-info-kind` in the tests

There's a couple of tests in `clang/test/CodeGenCXX` that still set `-debug-info-kind`. They probably don't need to do that, but I'm not changing that as part of this PR.
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Aug 20, 2025
@llvmbot
Copy link
Member

llvmbot commented Aug 20, 2025

@llvm/pr-subscribers-clang

Author: Michael Buch (Michael137)

Changes

This patch works towards consolidating all Clang debug-info into the clang/test/DebugInfo directory (https://discourse.llvm.org/t/clang-test-location-of-clang-debug-info-tests/87958).

Here we move only the clang/test/CodeGenCXX tests. I created a CXX subdirectory for now because many of the tests I checked actually did seem C++-specific. There is probably overlap between the Generic and CXX subdirectory, but I haven't gone through and audited them all.

The list of files i came up with is:

  1. searched for anything with *debug-info* in the filename
  2. searched for occurrences of debug-info-kind in the tests

There's a couple of tests in clang/test/CodeGenCXX that still set -debug-info-kind. They probably don't need to do that, but I'm not changing that as part of this PR.


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

184 Files Affected:

  • (renamed) clang/test/CodeGenCXX/lambda-this-2.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/2006-11-20-GlobalSymbols.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/2007-01-02-UnboundedArray.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/2009-03-17.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/2009-06-16-Crash.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/2010-05-10-Var.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/2010-05-12-PtrToMember.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/2010-06-21-LocalVarDbg.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/2010-07-23-DeclLoc.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/PR20038.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/access.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/aix-static-init-debug-info.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/alias.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/all-calls-described.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/anon-namespace.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/anon-union-vars.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/artificial-arg.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/atexit-stub.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/auto-return.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/block-invocation-linkage-name.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/blocks.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/bpf-structors.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/byval.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/calling-conventions.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/char16.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/class-limited-plugin.test ()
  • (renamed) clang/test/DebugInfo/CXX/class-limited.test ()
  • (renamed) clang/test/DebugInfo/CXX/class-nolimit.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/class-optzns.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/class.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/codeview-display-name.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/codeview-heapallocsite.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/codeview-injected-class.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/codeview-nested-types.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/codeview-nodebug.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/codeview-template-literal.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/codeview-template-type.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/codeview-unnamed.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/codeview-var-templates.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/coff.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/composite-cc.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/composite-triviality-fwd-decl.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/composite-triviality.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/context.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/cp-blocks-linetables.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ctor-homing-flag.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ctor.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ctor2.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/cxx0x.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/cxx1y.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/debug-info.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/decl-nested.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/defaulted-template-alias.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/deleted.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/dependent-template-alias.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/destroy-helper.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/destructor-debug-info.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/determinism.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/difile_entry.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/dllimport-base-class.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/dtor-implicit-args.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/dup-fwd-decl.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/enum-class.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/enum-i128.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/enum-metadata-collision.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/enum.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/explicit-cast.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/explicit-this.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/export_symbols.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/fdebug-info-for-profiling.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/field-access-debug-info.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/fn-template.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/friend.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/function-context.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/fwd-ref.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/fwd-template-param.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/gline-tables-only-codeview.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/gline-tables-only.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/global-ctor-dtor.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/global.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/globalinit-loc.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/globalinit.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/hotpatch-aarch64.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/hotpatch-arm.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/hotpatch.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/incomplete-types.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/indirect-field-decl.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/inheriting-constructor.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/inline-dllexport-member.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/inlined.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/lambda-expressions.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/lambda-this.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/lambda.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/large-constant.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/limited-ctor.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/limited.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/line-if-2.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/line-if.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/line.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/linetable-cleanup.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/linetable-eh.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/linetable-fnbegin.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/linetable-virtual-variadic.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/loops.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/lpad-linetable.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/member-call.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/member.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/method-nodebug.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/method-spec.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/method.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/method2.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/microsoft-abi-member-pointers-debug-info.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ms-abi.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ms-anonymous-tag.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ms-bitfields.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ms-dtor-thunks.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ms-novtable.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ms-ptr-to-member.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ms-vbase.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/namespace.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/nested-exprs.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/nodebug.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/noreturn.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/nrvo.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/nullptr.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/object-pointer.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/objname.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/prefix-map-lambda.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/programming-language.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ptr-to-member-function.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ptr-to-ptr.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/qualifiers.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/range-for-var-names.cpp ()
  • (added) clang/test/DebugInfo/CXX/remove_substring.py (+49)
  • (renamed) clang/test/DebugInfo/CXX/rvalue-ref.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/scope.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/scoped-class.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/scoped-enums-debug-info.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/simple-template-names.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/standalone-debug-attribute.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/static-fns.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/static-member.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/struct-align.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/structured-binding-bitfield.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/structured-binding.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-alias.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-align.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-array.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-deduction-guide.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-explicit-specialization.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-fwd.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-limit.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-member.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-parameter.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-partial-specialization.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-quals.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template-recursive.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/template.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/this.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/thunk-msabi.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/thunk.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/trivial_abi_debuginfo.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/ubsan-check-debuglocs.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/union-template.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/union.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/use-after-free.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/uuid.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/var-template-partial-spec.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/var-template-partial.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/varargs.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/variadic-template-alias.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/verbose-trap.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/vla.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/vtable-debug-info.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/vtable-holder-self-reference.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/vtable-inheritance-diamond.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/vtable-inheritance-multiple.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/vtable-inheritance-simple-main.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/vtable-inheritance-simple.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/vtable-inheritance-virtual.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/vtable-optzn.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/wchar.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/windows-dtor.cpp ()
  • (renamed) clang/test/DebugInfo/CXX/zero-length-arrays.cpp ()
diff --git a/clang/test/CodeGenCXX/debug-info-lambda-this.cpp b/clang/test/CodeGenCXX/lambda-this-2.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-lambda-this.cpp
rename to clang/test/CodeGenCXX/lambda-this-2.cpp
diff --git a/clang/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp b/clang/test/DebugInfo/CXX/2006-11-20-GlobalSymbols.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp
rename to clang/test/DebugInfo/CXX/2006-11-20-GlobalSymbols.cpp
diff --git a/clang/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp b/clang/test/DebugInfo/CXX/2007-01-02-UnboundedArray.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp
rename to clang/test/DebugInfo/CXX/2007-01-02-UnboundedArray.cpp
diff --git a/clang/test/CodeGenCXX/2009-03-17-dbg.cpp b/clang/test/DebugInfo/CXX/2009-03-17.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/2009-03-17-dbg.cpp
rename to clang/test/DebugInfo/CXX/2009-03-17.cpp
diff --git a/clang/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp b/clang/test/DebugInfo/CXX/2009-06-16-Crash.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp
rename to clang/test/DebugInfo/CXX/2009-06-16-Crash.cpp
diff --git a/clang/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp b/clang/test/DebugInfo/CXX/2010-05-10-Var.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp
rename to clang/test/DebugInfo/CXX/2010-05-10-Var.cpp
diff --git a/clang/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp b/clang/test/DebugInfo/CXX/2010-05-12-PtrToMember.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp
rename to clang/test/DebugInfo/CXX/2010-05-12-PtrToMember.cpp
diff --git a/clang/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp b/clang/test/DebugInfo/CXX/2010-06-21-LocalVarDbg.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp
rename to clang/test/DebugInfo/CXX/2010-06-21-LocalVarDbg.cpp
diff --git a/clang/test/CodeGenCXX/2010-07-23-DeclLoc.cpp b/clang/test/DebugInfo/CXX/2010-07-23-DeclLoc.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/2010-07-23-DeclLoc.cpp
rename to clang/test/DebugInfo/CXX/2010-07-23-DeclLoc.cpp
diff --git a/clang/test/CodeGenCXX/PR20038.cpp b/clang/test/DebugInfo/CXX/PR20038.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/PR20038.cpp
rename to clang/test/DebugInfo/CXX/PR20038.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-access.cpp b/clang/test/DebugInfo/CXX/access.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-access.cpp
rename to clang/test/DebugInfo/CXX/access.cpp
diff --git a/clang/test/CodeGenCXX/aix-static-init-debug-info.cpp b/clang/test/DebugInfo/CXX/aix-static-init-debug-info.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/aix-static-init-debug-info.cpp
rename to clang/test/DebugInfo/CXX/aix-static-init-debug-info.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-alias.cpp b/clang/test/DebugInfo/CXX/alias.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-alias.cpp
rename to clang/test/DebugInfo/CXX/alias.cpp
diff --git a/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp b/clang/test/DebugInfo/CXX/all-calls-described.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp
rename to clang/test/DebugInfo/CXX/all-calls-described.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-anon-namespace.cpp b/clang/test/DebugInfo/CXX/anon-namespace.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-anon-namespace.cpp
rename to clang/test/DebugInfo/CXX/anon-namespace.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-anon-union-vars.cpp b/clang/test/DebugInfo/CXX/anon-union-vars.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-anon-union-vars.cpp
rename to clang/test/DebugInfo/CXX/anon-union-vars.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp b/clang/test/DebugInfo/CXX/artificial-arg.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-artificial-arg.cpp
rename to clang/test/DebugInfo/CXX/artificial-arg.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp b/clang/test/DebugInfo/CXX/atexit-stub.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-atexit-stub.cpp
rename to clang/test/DebugInfo/CXX/atexit-stub.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-auto-return.cpp b/clang/test/DebugInfo/CXX/auto-return.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-auto-return.cpp
rename to clang/test/DebugInfo/CXX/auto-return.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-block-invocation-linkage-name.cpp b/clang/test/DebugInfo/CXX/block-invocation-linkage-name.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-block-invocation-linkage-name.cpp
rename to clang/test/DebugInfo/CXX/block-invocation-linkage-name.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-blocks.cpp b/clang/test/DebugInfo/CXX/blocks.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-blocks.cpp
rename to clang/test/DebugInfo/CXX/blocks.cpp
diff --git a/clang/test/CodeGenCXX/bpf-debug-structors.cpp b/clang/test/DebugInfo/CXX/bpf-structors.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/bpf-debug-structors.cpp
rename to clang/test/DebugInfo/CXX/bpf-structors.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-byval.cpp b/clang/test/DebugInfo/CXX/byval.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-byval.cpp
rename to clang/test/DebugInfo/CXX/byval.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-calling-conventions.cpp b/clang/test/DebugInfo/CXX/calling-conventions.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-calling-conventions.cpp
rename to clang/test/DebugInfo/CXX/calling-conventions.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-char16.cpp b/clang/test/DebugInfo/CXX/char16.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-char16.cpp
rename to clang/test/DebugInfo/CXX/char16.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-class-limited-plugin.test b/clang/test/DebugInfo/CXX/class-limited-plugin.test
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-class-limited-plugin.test
rename to clang/test/DebugInfo/CXX/class-limited-plugin.test
diff --git a/clang/test/CodeGenCXX/debug-info-class-limited.test b/clang/test/DebugInfo/CXX/class-limited.test
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-class-limited.test
rename to clang/test/DebugInfo/CXX/class-limited.test
diff --git a/clang/test/CodeGenCXX/debug-info-class-nolimit.cpp b/clang/test/DebugInfo/CXX/class-nolimit.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-class-nolimit.cpp
rename to clang/test/DebugInfo/CXX/class-nolimit.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-class-optzns.cpp b/clang/test/DebugInfo/CXX/class-optzns.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-class-optzns.cpp
rename to clang/test/DebugInfo/CXX/class-optzns.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-class.cpp b/clang/test/DebugInfo/CXX/class.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-class.cpp
rename to clang/test/DebugInfo/CXX/class.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp b/clang/test/DebugInfo/CXX/codeview-display-name.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp
rename to clang/test/DebugInfo/CXX/codeview-display-name.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp b/clang/test/DebugInfo/CXX/codeview-heapallocsite.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp
rename to clang/test/DebugInfo/CXX/codeview-heapallocsite.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-injected-class.cpp b/clang/test/DebugInfo/CXX/codeview-injected-class.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-codeview-injected-class.cpp
rename to clang/test/DebugInfo/CXX/codeview-injected-class.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-nested-types.cpp b/clang/test/DebugInfo/CXX/codeview-nested-types.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-codeview-nested-types.cpp
rename to clang/test/DebugInfo/CXX/codeview-nested-types.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-nodebug.cpp b/clang/test/DebugInfo/CXX/codeview-nodebug.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-codeview-nodebug.cpp
rename to clang/test/DebugInfo/CXX/codeview-nodebug.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-template-literal.cpp b/clang/test/DebugInfo/CXX/codeview-template-literal.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-codeview-template-literal.cpp
rename to clang/test/DebugInfo/CXX/codeview-template-literal.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-template-type.cpp b/clang/test/DebugInfo/CXX/codeview-template-type.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-codeview-template-type.cpp
rename to clang/test/DebugInfo/CXX/codeview-template-type.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-unnamed.cpp b/clang/test/DebugInfo/CXX/codeview-unnamed.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-codeview-unnamed.cpp
rename to clang/test/DebugInfo/CXX/codeview-unnamed.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-var-templates.cpp b/clang/test/DebugInfo/CXX/codeview-var-templates.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-codeview-var-templates.cpp
rename to clang/test/DebugInfo/CXX/codeview-var-templates.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-coff.cpp b/clang/test/DebugInfo/CXX/coff.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-coff.cpp
rename to clang/test/DebugInfo/CXX/coff.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-composite-cc.cpp b/clang/test/DebugInfo/CXX/composite-cc.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-composite-cc.cpp
rename to clang/test/DebugInfo/CXX/composite-cc.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-composite-triviality-fwd-decl.cpp b/clang/test/DebugInfo/CXX/composite-triviality-fwd-decl.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-composite-triviality-fwd-decl.cpp
rename to clang/test/DebugInfo/CXX/composite-triviality-fwd-decl.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-composite-triviality.cpp b/clang/test/DebugInfo/CXX/composite-triviality.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-composite-triviality.cpp
rename to clang/test/DebugInfo/CXX/composite-triviality.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-context.cpp b/clang/test/DebugInfo/CXX/context.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-context.cpp
rename to clang/test/DebugInfo/CXX/context.cpp
diff --git a/clang/test/CodeGenCXX/cp-blocks-linetables.cpp b/clang/test/DebugInfo/CXX/cp-blocks-linetables.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/cp-blocks-linetables.cpp
rename to clang/test/DebugInfo/CXX/cp-blocks-linetables.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-ctor-homing-flag.cpp b/clang/test/DebugInfo/CXX/ctor-homing-flag.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-ctor-homing-flag.cpp
rename to clang/test/DebugInfo/CXX/ctor-homing-flag.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-ctor.cpp b/clang/test/DebugInfo/CXX/ctor.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-ctor.cpp
rename to clang/test/DebugInfo/CXX/ctor.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-ctor2.cpp b/clang/test/DebugInfo/CXX/ctor2.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-ctor2.cpp
rename to clang/test/DebugInfo/CXX/ctor2.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-cxx0x.cpp b/clang/test/DebugInfo/CXX/cxx0x.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-cxx0x.cpp
rename to clang/test/DebugInfo/CXX/cxx0x.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-cxx1y.cpp b/clang/test/DebugInfo/CXX/cxx1y.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-cxx1y.cpp
rename to clang/test/DebugInfo/CXX/cxx1y.cpp
diff --git a/clang/test/CodeGenCXX/debug-info.cpp b/clang/test/DebugInfo/CXX/debug-info.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info.cpp
rename to clang/test/DebugInfo/CXX/debug-info.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-decl-nested.cpp b/clang/test/DebugInfo/CXX/decl-nested.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-decl-nested.cpp
rename to clang/test/DebugInfo/CXX/decl-nested.cpp
diff --git a/clang/test/CodeGenCXX/defaulted-template-alias.cpp b/clang/test/DebugInfo/CXX/defaulted-template-alias.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/defaulted-template-alias.cpp
rename to clang/test/DebugInfo/CXX/defaulted-template-alias.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-deleted.cpp b/clang/test/DebugInfo/CXX/deleted.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-deleted.cpp
rename to clang/test/DebugInfo/CXX/deleted.cpp
diff --git a/clang/test/CodeGenCXX/dependent-template-alias.cpp b/clang/test/DebugInfo/CXX/dependent-template-alias.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/dependent-template-alias.cpp
rename to clang/test/DebugInfo/CXX/dependent-template-alias.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-destroy-helper.cpp b/clang/test/DebugInfo/CXX/destroy-helper.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-destroy-helper.cpp
rename to clang/test/DebugInfo/CXX/destroy-helper.cpp
diff --git a/clang/test/CodeGenCXX/destructor-debug-info.cpp b/clang/test/DebugInfo/CXX/destructor-debug-info.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/destructor-debug-info.cpp
rename to clang/test/DebugInfo/CXX/destructor-debug-info.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-determinism.cpp b/clang/test/DebugInfo/CXX/determinism.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-determinism.cpp
rename to clang/test/DebugInfo/CXX/determinism.cpp
diff --git a/clang/test/CodeGenCXX/difile_entry.cpp b/clang/test/DebugInfo/CXX/difile_entry.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/difile_entry.cpp
rename to clang/test/DebugInfo/CXX/difile_entry.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp b/clang/test/DebugInfo/CXX/dllimport-base-class.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp
rename to clang/test/DebugInfo/CXX/dllimport-base-class.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-dtor-implicit-args.cpp b/clang/test/DebugInfo/CXX/dtor-implicit-args.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-dtor-implicit-args.cpp
rename to clang/test/DebugInfo/CXX/dtor-implicit-args.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp b/clang/test/DebugInfo/CXX/dup-fwd-decl.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
rename to clang/test/DebugInfo/CXX/dup-fwd-decl.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-enum-class.cpp b/clang/test/DebugInfo/CXX/enum-class.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-enum-class.cpp
rename to clang/test/DebugInfo/CXX/enum-class.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-enum-i128.cpp b/clang/test/DebugInfo/CXX/enum-i128.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-enum-i128.cpp
rename to clang/test/DebugInfo/CXX/enum-i128.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-enum-metadata-collision.cpp b/clang/test/DebugInfo/CXX/enum-metadata-collision.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-enum-metadata-collision.cpp
rename to clang/test/DebugInfo/CXX/enum-metadata-collision.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-enum.cpp b/clang/test/DebugInfo/CXX/enum.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-enum.cpp
rename to clang/test/DebugInfo/CXX/enum.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-explicit-cast.cpp b/clang/test/DebugInfo/CXX/explicit-cast.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-explicit-cast.cpp
rename to clang/test/DebugInfo/CXX/explicit-cast.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-explicit-this.cpp b/clang/test/DebugInfo/CXX/explicit-this.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-explicit-this.cpp
rename to clang/test/DebugInfo/CXX/explicit-this.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-export_symbols.cpp b/clang/test/DebugInfo/CXX/export_symbols.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-export_symbols.cpp
rename to clang/test/DebugInfo/CXX/export_symbols.cpp
diff --git a/clang/test/CodeGenCXX/fdebug-info-for-profiling.cpp b/clang/test/DebugInfo/CXX/fdebug-info-for-profiling.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/fdebug-info-for-profiling.cpp
rename to clang/test/DebugInfo/CXX/fdebug-info-for-profiling.cpp
diff --git a/clang/test/CodeGenCXX/field-access-debug-info.cpp b/clang/test/DebugInfo/CXX/field-access-debug-info.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/field-access-debug-info.cpp
rename to clang/test/DebugInfo/CXX/field-access-debug-info.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-fn-template.cpp b/clang/test/DebugInfo/CXX/fn-template.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-fn-template.cpp
rename to clang/test/DebugInfo/CXX/fn-template.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-friend.cpp b/clang/test/DebugInfo/CXX/friend.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-friend.cpp
rename to clang/test/DebugInfo/CXX/friend.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-function-context.cpp b/clang/test/DebugInfo/CXX/function-context.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-function-context.cpp
rename to clang/test/DebugInfo/CXX/function-context.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-fwd-ref.cpp b/clang/test/DebugInfo/CXX/fwd-ref.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-fwd-ref.cpp
rename to clang/test/DebugInfo/CXX/fwd-ref.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-fwd-template-param.cpp b/clang/test/DebugInfo/CXX/fwd-template-param.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-fwd-template-param.cpp
rename to clang/test/DebugInfo/CXX/fwd-template-param.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-gline-tables-only-codeview.cpp b/clang/test/DebugInfo/CXX/gline-tables-only-codeview.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-gline-tables-only-codeview.cpp
rename to clang/test/DebugInfo/CXX/gline-tables-only-codeview.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-gline-tables-only.cpp b/clang/test/DebugInfo/CXX/gline-tables-only.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-gline-tables-only.cpp
rename to clang/test/DebugInfo/CXX/gline-tables-only.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp b/clang/test/DebugInfo/CXX/global-ctor-dtor.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
rename to clang/test/DebugInfo/CXX/global-ctor-dtor.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-global.cpp b/clang/test/DebugInfo/CXX/global.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-global.cpp
rename to clang/test/DebugInfo/CXX/global.cpp
diff --git a/clang/test/CodeGenCXX/globalinit-loc.cpp b/clang/test/DebugInfo/CXX/globalinit-loc.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/globalinit-loc.cpp
rename to clang/test/DebugInfo/CXX/globalinit-loc.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-globalinit.cpp b/clang/test/DebugInfo/CXX/globalinit.cpp
similarity index 100%
rename from clang/test/CodeGenCXX/debug-info-globalinit.cpp
rename to clang/test/DebugInfo/CXX/globalinit.cpp
diff --git a/clang/tes...
[truncated]

@dwblaikie
Copy link
Collaborator

Yeah, I think it's worth still keeping some language grouping - language features are somewhat hard to just grep for, so having some grouping may help find any existing coverage for a feature so we don't just keep adding new files.

( clang/test/DebugInfo/CXX/Inputs/debug-info-class-limited.cpp could be renamed to drop the debug-info prefix)

@Michael137 Michael137 merged commit f2aedc2 into llvm:main Aug 21, 2025
9 checks passed
@Michael137 Michael137 deleted the clang/move-cxx-debug-info-tests branch August 21, 2025 08:26
Michael137 added a commit to swiftlang/llvm-project that referenced this pull request Nov 4, 2025
…ugInfo directory (llvm#154538)

This patch works towards consolidating all Clang debug-info into the
`clang/test/DebugInfo` directory
(https://discourse.llvm.org/t/clang-test-location-of-clang-debug-info-tests/87958).

Here we move only the `clang/test/CodeGenCXX` tests. I created a `CXX`
subdirectory for now because many of the tests I checked actually did
seem C++-specific. There is probably overlap between the `Generic` and
`CXX` subdirectory, but I haven't gone through and audited them all.

The list of files i came up with is:
1. searched for anything with `*debug-info*` in the filename
2. searched for occurrences of `debug-info-kind` in the tests

There's a couple of tests in `clang/test/CodeGenCXX` that still set
`-debug-info-kind`. They probably don't need to do that, but I'm not
changing that as part of this PR.

(cherry picked from commit f2aedc2)
Michael137 added a commit to swiftlang/llvm-project that referenced this pull request Nov 5, 2025
…ugInfo directory (llvm#154538)

This patch works towards consolidating all Clang debug-info into the
`clang/test/DebugInfo` directory
(https://discourse.llvm.org/t/clang-test-location-of-clang-debug-info-tests/87958).

Here we move only the `clang/test/CodeGenCXX` tests. I created a `CXX`
subdirectory for now because many of the tests I checked actually did
seem C++-specific. There is probably overlap between the `Generic` and
`CXX` subdirectory, but I haven't gone through and audited them all.

The list of files i came up with is:
1. searched for anything with `*debug-info*` in the filename
2. searched for occurrences of `debug-info-kind` in the tests

There's a couple of tests in `clang/test/CodeGenCXX` that still set
`-debug-info-kind`. They probably don't need to do that, but I'm not
changing that as part of this PR.

(cherry picked from commit f2aedc2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants