[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-11 Thread James Henderson via cfe-commits

https://github.com/jh7370 edited 
https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-11 Thread James Henderson via cfe-commits

https://github.com/jh7370 edited 
https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-11 Thread James Henderson via cfe-commits

https://github.com/jh7370 approved this pull request.

Formally: llvm-objcopy and obj2yaml tests look good to me, as do those that are 
pure fixes of the RUN prefix without other changes.

https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread Mircea Trofin via cfe-commits

mtrofin wrote:

> Tagging authors of modified tests: @ostannard (`fullfp-neon-*`) @MaskRay 
> (`data-segment-relro-ppc64.test`) @mtrofin (`autodetect-roots.cpp`) @OCHyams 
> (`KeyInstructions/flag.cpp`)
> 
> Just a note, regarding `autodetect-roots.cpp`, the binary compiled in the 
> test wasn't executed previously. Now it is, and it always runs for 10 seconds 
> (the main thread sleeps for 10s). I'm not sure if there are other tests that 
> run that long. It can be decreased, but might become flaky.

Nice fix!

I've seen other tests running for some amount of time, esp. in debug. Since 
tests run in parallel, I wouldn't worry about it (but let's see, of course)

https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread Mircea Trofin via cfe-commits

https://github.com/mtrofin approved this pull request.


https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread Mircea Trofin via cfe-commits

https://github.com/mtrofin edited 
https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread Orlando Cazalet-Hyams via cfe-commits


@@ -14,10 +14,6 @@
 // NO-DEBUG-NOT: debug-info-kind
 // NO-DEBUG-NOT: dwarf
 
- Help hidden: flag should not be visible.
-// RUN: %clang --help | FileCheck %s --check-prefix=HELP
-// HELP-NOT: key-instructions

OCHyams wrote:

Yep I believe that summary is correct, thanks.

https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread Orlando Cazalet-Hyams via cfe-commits

https://github.com/OCHyams edited 
https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread Orlando Cazalet-Hyams via cfe-commits

https://github.com/OCHyams commented:

The clang/test/DebugInfo/KeyInstructions/flag.cpp change LGTM, thanks for 
checking.

https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread Vladimir Vuksanovic via cfe-commits

vvuksanovic wrote:

Tagging authors of modified tests: @ostannard (`fullfp-neon-*`) @MaskRay 
(`data-segment-relro-ppc64.test`) @mtrofin (`autodetect-roots.cpp`) @OCHyams 
(`KeyInstructions/flag.cpp`)

Just a note, regarding `autodetect-roots.cpp`, the binary compiled in the test 
wasn't executed previously. Now it is, and it always runs for 10 seconds (the 
main thread sleeps for 10s). I'm not sure if there are other tests that run 
that long. It can be decreased, but might become flaky.

https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread Vladimir Vuksanovic via cfe-commits


@@ -296,9 +296,9 @@ Sections:
 ## Show that an error is reported if the section header string table name 
cannot
 ## be read.
 # RUN: yaml2obj --docnum=11 %s -o %t11.o
-# RUNasda: not obj2yaml %t11.o 2>&1 | FileCheck %s --check-prefix=ERR 
-DFILE=%t11.o
+# RUN: not obj2yaml %t11.o 2>&1 | FileCheck %s --check-prefix=ERR -DFILE=%t11.o
 
-# ERR: Error reading file: [[FILE]]: unable to read section header string 
table name: a section [index 1] has an invalid sh_name (0x1) offset which 
goes past the end of the section name string table
+# ERR: Error reading file: [[FILE]]: a section [index 1] has an invalid 
sh_name (0x1) offset which goes past the end of the section name string 
table

vvuksanovic wrote:

I agree. I tried to track down the original message, but couldn't find it.

https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread Vladimir Vuksanovic via cfe-commits


@@ -14,10 +14,6 @@
 // NO-DEBUG-NOT: debug-info-kind
 // NO-DEBUG-NOT: dwarf
 
- Help hidden: flag should not be visible.
-// RUN: %clang --help | FileCheck %s --check-prefix=HELP
-// HELP-NOT: key-instructions

vvuksanovic wrote:

The option was added to `--help` at some point, and a testcase added a few 
lines up in the same file. This was probably meant to be removed then. It still 
passes because the new test case uses the same check prefix and moves the 
cursor so this `HELP-NOT` doesn't find the flag again.

https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread James Henderson via cfe-commits


@@ -296,9 +296,9 @@ Sections:
 ## Show that an error is reported if the section header string table name 
cannot
 ## be read.
 # RUN: yaml2obj --docnum=11 %s -o %t11.o
-# RUNasda: not obj2yaml %t11.o 2>&1 | FileCheck %s --check-prefix=ERR 
-DFILE=%t11.o
+# RUN: not obj2yaml %t11.o 2>&1 | FileCheck %s --check-prefix=ERR -DFILE=%t11.o
 
-# ERR: Error reading file: [[FILE]]: unable to read section header string 
table name: a section [index 1] has an invalid sh_name (0x1) offset which 
goes past the end of the section name string table
+# ERR: Error reading file: [[FILE]]: a section [index 1] has an invalid 
sh_name (0x1) offset which goes past the end of the section name string 
table

jh7370 wrote:

I actually think the checked-for message is better. Unfortunately, I can't see 
from my original commit where I intended it to come from, so this is fine.

https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread James Henderson via cfe-commits


@@ -14,10 +14,6 @@
 // NO-DEBUG-NOT: debug-info-kind
 // NO-DEBUG-NOT: dwarf
 
- Help hidden: flag should not be visible.
-// RUN: %clang --help | FileCheck %s --check-prefix=HELP
-// HELP-NOT: key-instructions

jh7370 wrote:

What's going on with this bit of deleted code?

https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread James Henderson via cfe-commits

https://github.com/jh7370 edited 
https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-10 Thread James Henderson via cfe-commits

https://github.com/jh7370 commented:

The changes that are purely fixing the RUN directive itself all look good to 
me, as does the obj2yaml test. However, I'm not sure I have enough contextual 
knowledge to be able to approve the tests in the other cases. It would be worth 
adding the authors of those tests and/or active maintainers in the relevant 
areas to review the changes to see if they are appropriate. You could 
alternatively split this PR up into individual ones with each non-trivial test 
change in a separate PR.

https://github.com/llvm/llvm-project/pull/179668
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-04 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-lld

Author: Vladimir Vuksanovic (vvuksanovic)


Changes



---
Full diff: https://github.com/llvm/llvm-project/pull/179668.diff


11 Files Affected:

- (modified) clang-tools-extra/test/clang-apply-replacements/format.cpp (+1-1) 
- (modified) clang/test/DebugInfo/KeyInstructions/flag.cpp (+1-5) 
- (modified) clang/test/Driver/hip-save-temps.hip (+3-3) 
- (modified) clang/test/OpenMP/openmp_attribute_compat.cpp (+2-2) 
- (modified) compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp 
(+41-34) 
- (modified) lld/test/ELF/linkerscript/data-segment-relro-ppc64.test (+11-19) 
- (modified) llvm/test/CodeGen/Generic/cfi-sections.ll (+2-2) 
- (modified) llvm/test/MC/Disassembler/ARM/fullfp16-neon-arm.txt (+3-3) 
- (modified) llvm/test/MC/Disassembler/ARM/fullfp16-neon-thumb.txt (+6-6) 
- (modified) llvm/test/tools/llvm-objcopy/ELF/change-section-address.test 
(+2-1) 
- (modified) llvm/test/tools/obj2yaml/ELF/shstrtab.yaml (+2-2) 


``diff
diff --git a/clang-tools-extra/test/clang-apply-replacements/format.cpp 
b/clang-tools-extra/test/clang-apply-replacements/format.cpp
index 0f40ef623d284..53851e58071d7 100644
--- a/clang-tools-extra/test/clang-apply-replacements/format.cpp
+++ b/clang-tools-extra/test/clang-apply-replacements/format.cpp
@@ -12,4 +12,4 @@
 // RUN: FileCheck --strict-whitespace -input-file=%t.dir/Inputs/format/yes.cpp 
%S/Inputs/format/yes.cpp
 // RUN: FileCheck --strict-whitespace -input-file=%t.dir/Inputs/format/no.cpp 
%S/Inputs/format/no.cpp
 //
-// RUN not clang-apply-replacements -format=blah %t.dir/Inputs/format
+// RUN: not clang-apply-replacements -format=blah %t.dir/Inputs/format
diff --git a/clang/test/DebugInfo/KeyInstructions/flag.cpp 
b/clang/test/DebugInfo/KeyInstructions/flag.cpp
index 4a4a5c4c142a7..e3cc5bf62d2c7 100644
--- a/clang/test/DebugInfo/KeyInstructions/flag.cpp
+++ b/clang/test/DebugInfo/KeyInstructions/flag.cpp
@@ -3,7 +3,7 @@
 // RUN: %clang -### -target x86_64 -c -gno-key-instructions %s 2>&1 | 
FileCheck %s --check-prefixes=NO-DEBUG
 
  Help.
-// RUN %clang --help | FileCheck %s --check-prefix=HELP
+// RUN: %clang --help | FileCheck %s --check-prefix=HELP
 // HELP: -gkey-instructions  Enable Key Instructions, which reduces the 
jumpiness of debug stepping in optimized C/C++ code in some debuggers. DWARF 
only.
 
 // KEY-INSTRUCTIONS: "-gkey-instructions"
@@ -14,10 +14,6 @@
 // NO-DEBUG-NOT: debug-info-kind
 // NO-DEBUG-NOT: dwarf
 
- Help hidden: flag should not be visible.
-// RUN: %clang --help | FileCheck %s --check-prefix=HELP
-// HELP-NOT: key-instructions
-
 // Smoke test: check for Key Instructions keywords in the IR.
 void f() {}
 // RUN: %clang_cc1 %s -triple x86_64-linux-gnu 
-debug-info-kind=line-tables-only -emit-llvm -o - | FileCheck %s 
--check-prefix=SMOKETEST-OFF
diff --git a/clang/test/Driver/hip-save-temps.hip 
b/clang/test/Driver/hip-save-temps.hip
index 142c3f1611a36..8cb5a60aa7e72 100644
--- a/clang/test/Driver/hip-save-temps.hip
+++ b/clang/test/Driver/hip-save-temps.hip
@@ -24,9 +24,9 @@
 // RUN:   FileCheck -check-prefixes=CHECK,RDC,RDCL,NOUT %s
 
 // -fgpu-rdc with -o
-// UN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
-// UN:   -nogpuinc -o executable -fgpu-rdc --offload-arch=gfx900 %s 2>&1 | \
-// UN:   FileCheck -check-prefixes=CHECK,RDC,RDCL,WOUT %s
+// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
+// RUN:   -nogpuinc -o executable -fgpu-rdc --offload-arch=gfx900 %s 2>&1 | \
+// RUN:   FileCheck -check-prefixes=CHECK,RDC,RDCL,WOUT %s
 
 // -fgpu-rdc host object path
 // RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" 
"hip-save-temps-host-x86_64-unknown-linux-gnu.hipi"
diff --git a/clang/test/OpenMP/openmp_attribute_compat.cpp 
b/clang/test/OpenMP/openmp_attribute_compat.cpp
index 69b809d45b43c..e37798bf93313 100644
--- a/clang/test/OpenMP/openmp_attribute_compat.cpp
+++ b/clang/test/OpenMP/openmp_attribute_compat.cpp
@@ -8,8 +8,8 @@
 // RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=off 
-Wno-openmp-51-extensions %s
 
 // RUN: %clang_cc1 -fopenmp -fsyntax-only -verify=pre -Wpre-openmp-51-compat 
-x c -std=c2x %s
-// RUN-: %clang_cc1 -fopenmp -fsyntax-only -verify=off -x c -std=c2x %s
-// RUN-: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=ext 
-Wopenmp -x c -std=c2x %s
+// RUN: %clang_cc1 -fopenmp -fsyntax-only -verify=off -x c -std=c2x %s
+// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=ext 
-Wopenmp -x c -std=c2x %s
 
 // off-no-diagnostics
 
diff --git a/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp 
b/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp
index a6e0d920cbc82..8631757a2ae19 100644
--- a/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp
+++ b/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp
@@ -13,7 +13,11 @@
 // RUN:   -mllvm -profile-context-root="" -g -Wl,-export-dynamic
 //
 // Run the binary, and observe the p

[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-04 Thread via cfe-commits

llvmbot wrote:



@llvm/pr-subscribers-lld-elf

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

Author: Vladimir Vuksanovic (vvuksanovic)


Changes



---
Full diff: https://github.com/llvm/llvm-project/pull/179668.diff


11 Files Affected:

- (modified) clang-tools-extra/test/clang-apply-replacements/format.cpp (+1-1) 
- (modified) clang/test/DebugInfo/KeyInstructions/flag.cpp (+1-5) 
- (modified) clang/test/Driver/hip-save-temps.hip (+3-3) 
- (modified) clang/test/OpenMP/openmp_attribute_compat.cpp (+2-2) 
- (modified) compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp 
(+41-34) 
- (modified) lld/test/ELF/linkerscript/data-segment-relro-ppc64.test (+11-19) 
- (modified) llvm/test/CodeGen/Generic/cfi-sections.ll (+2-2) 
- (modified) llvm/test/MC/Disassembler/ARM/fullfp16-neon-arm.txt (+3-3) 
- (modified) llvm/test/MC/Disassembler/ARM/fullfp16-neon-thumb.txt (+6-6) 
- (modified) llvm/test/tools/llvm-objcopy/ELF/change-section-address.test 
(+2-1) 
- (modified) llvm/test/tools/obj2yaml/ELF/shstrtab.yaml (+2-2) 


``diff
diff --git a/clang-tools-extra/test/clang-apply-replacements/format.cpp 
b/clang-tools-extra/test/clang-apply-replacements/format.cpp
index 0f40ef623d284..53851e58071d7 100644
--- a/clang-tools-extra/test/clang-apply-replacements/format.cpp
+++ b/clang-tools-extra/test/clang-apply-replacements/format.cpp
@@ -12,4 +12,4 @@
 // RUN: FileCheck --strict-whitespace -input-file=%t.dir/Inputs/format/yes.cpp 
%S/Inputs/format/yes.cpp
 // RUN: FileCheck --strict-whitespace -input-file=%t.dir/Inputs/format/no.cpp 
%S/Inputs/format/no.cpp
 //
-// RUN not clang-apply-replacements -format=blah %t.dir/Inputs/format
+// RUN: not clang-apply-replacements -format=blah %t.dir/Inputs/format
diff --git a/clang/test/DebugInfo/KeyInstructions/flag.cpp 
b/clang/test/DebugInfo/KeyInstructions/flag.cpp
index 4a4a5c4c142a7..e3cc5bf62d2c7 100644
--- a/clang/test/DebugInfo/KeyInstructions/flag.cpp
+++ b/clang/test/DebugInfo/KeyInstructions/flag.cpp
@@ -3,7 +3,7 @@
 // RUN: %clang -### -target x86_64 -c -gno-key-instructions %s 2>&1 | 
FileCheck %s --check-prefixes=NO-DEBUG
 
  Help.
-// RUN %clang --help | FileCheck %s --check-prefix=HELP
+// RUN: %clang --help | FileCheck %s --check-prefix=HELP
 // HELP: -gkey-instructions  Enable Key Instructions, which reduces the 
jumpiness of debug stepping in optimized C/C++ code in some debuggers. DWARF 
only.
 
 // KEY-INSTRUCTIONS: "-gkey-instructions"
@@ -14,10 +14,6 @@
 // NO-DEBUG-NOT: debug-info-kind
 // NO-DEBUG-NOT: dwarf
 
- Help hidden: flag should not be visible.
-// RUN: %clang --help | FileCheck %s --check-prefix=HELP
-// HELP-NOT: key-instructions
-
 // Smoke test: check for Key Instructions keywords in the IR.
 void f() {}
 // RUN: %clang_cc1 %s -triple x86_64-linux-gnu 
-debug-info-kind=line-tables-only -emit-llvm -o - | FileCheck %s 
--check-prefix=SMOKETEST-OFF
diff --git a/clang/test/Driver/hip-save-temps.hip 
b/clang/test/Driver/hip-save-temps.hip
index 142c3f1611a36..8cb5a60aa7e72 100644
--- a/clang/test/Driver/hip-save-temps.hip
+++ b/clang/test/Driver/hip-save-temps.hip
@@ -24,9 +24,9 @@
 // RUN:   FileCheck -check-prefixes=CHECK,RDC,RDCL,NOUT %s
 
 // -fgpu-rdc with -o
-// UN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
-// UN:   -nogpuinc -o executable -fgpu-rdc --offload-arch=gfx900 %s 2>&1 | \
-// UN:   FileCheck -check-prefixes=CHECK,RDC,RDCL,WOUT %s
+// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
+// RUN:   -nogpuinc -o executable -fgpu-rdc --offload-arch=gfx900 %s 2>&1 | \
+// RUN:   FileCheck -check-prefixes=CHECK,RDC,RDCL,WOUT %s
 
 // -fgpu-rdc host object path
 // RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" 
"hip-save-temps-host-x86_64-unknown-linux-gnu.hipi"
diff --git a/clang/test/OpenMP/openmp_attribute_compat.cpp 
b/clang/test/OpenMP/openmp_attribute_compat.cpp
index 69b809d45b43c..e37798bf93313 100644
--- a/clang/test/OpenMP/openmp_attribute_compat.cpp
+++ b/clang/test/OpenMP/openmp_attribute_compat.cpp
@@ -8,8 +8,8 @@
 // RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=off 
-Wno-openmp-51-extensions %s
 
 // RUN: %clang_cc1 -fopenmp -fsyntax-only -verify=pre -Wpre-openmp-51-compat 
-x c -std=c2x %s
-// RUN-: %clang_cc1 -fopenmp -fsyntax-only -verify=off -x c -std=c2x %s
-// RUN-: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=ext 
-Wopenmp -x c -std=c2x %s
+// RUN: %clang_cc1 -fopenmp -fsyntax-only -verify=off -x c -std=c2x %s
+// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=ext 
-Wopenmp -x c -std=c2x %s
 
 // off-no-diagnostics
 
diff --git a/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp 
b/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp
index a6e0d920cbc82..8631757a2ae19 100644
--- a/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp
+++ b/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp
@@ -13,7 +13,11 @@
 // RUN:   -mllvm -profile-context-root="" -g -Wl,-export-dynami

[clang] [clang-tools-extra] [compiler-rt] [lld] [llvm] [NFC] Fix tests with invalid RUN directives (PR #179668)

2026-02-04 Thread Vladimir Vuksanovic via cfe-commits

https://github.com/vvuksanovic created 
https://github.com/llvm/llvm-project/pull/179668

None

>From 0241fc3d3147d9f460d6bcdd0ceb2d1a01bf36b8 Mon Sep 17 00:00:00 2001
From: Vladimir Vuksanovic 
Date: Wed, 4 Feb 2026 15:13:29 +0100
Subject: [PATCH] [NFC] Fix tests with invalid RUN directives

---
 .../test/clang-apply-replacements/format.cpp  |  2 +-
 clang/test/DebugInfo/KeyInstructions/flag.cpp |  6 +-
 clang/test/Driver/hip-save-temps.hip  |  6 +-
 clang/test/OpenMP/openmp_attribute_compat.cpp |  4 +-
 .../TestCases/autodetect-roots.cpp| 75 ++-
 .../data-segment-relro-ppc64.test | 30 +++-
 llvm/test/CodeGen/Generic/cfi-sections.ll |  4 +-
 .../MC/Disassembler/ARM/fullfp16-neon-arm.txt |  6 +-
 .../Disassembler/ARM/fullfp16-neon-thumb.txt  | 12 +--
 .../ELF/change-section-address.test   |  3 +-
 llvm/test/tools/obj2yaml/ELF/shstrtab.yaml|  4 +-
 11 files changed, 74 insertions(+), 78 deletions(-)

diff --git a/clang-tools-extra/test/clang-apply-replacements/format.cpp 
b/clang-tools-extra/test/clang-apply-replacements/format.cpp
index 0f40ef623d284..53851e58071d7 100644
--- a/clang-tools-extra/test/clang-apply-replacements/format.cpp
+++ b/clang-tools-extra/test/clang-apply-replacements/format.cpp
@@ -12,4 +12,4 @@
 // RUN: FileCheck --strict-whitespace -input-file=%t.dir/Inputs/format/yes.cpp 
%S/Inputs/format/yes.cpp
 // RUN: FileCheck --strict-whitespace -input-file=%t.dir/Inputs/format/no.cpp 
%S/Inputs/format/no.cpp
 //
-// RUN not clang-apply-replacements -format=blah %t.dir/Inputs/format
+// RUN: not clang-apply-replacements -format=blah %t.dir/Inputs/format
diff --git a/clang/test/DebugInfo/KeyInstructions/flag.cpp 
b/clang/test/DebugInfo/KeyInstructions/flag.cpp
index 4a4a5c4c142a7..e3cc5bf62d2c7 100644
--- a/clang/test/DebugInfo/KeyInstructions/flag.cpp
+++ b/clang/test/DebugInfo/KeyInstructions/flag.cpp
@@ -3,7 +3,7 @@
 // RUN: %clang -### -target x86_64 -c -gno-key-instructions %s 2>&1 | 
FileCheck %s --check-prefixes=NO-DEBUG
 
  Help.
-// RUN %clang --help | FileCheck %s --check-prefix=HELP
+// RUN: %clang --help | FileCheck %s --check-prefix=HELP
 // HELP: -gkey-instructions  Enable Key Instructions, which reduces the 
jumpiness of debug stepping in optimized C/C++ code in some debuggers. DWARF 
only.
 
 // KEY-INSTRUCTIONS: "-gkey-instructions"
@@ -14,10 +14,6 @@
 // NO-DEBUG-NOT: debug-info-kind
 // NO-DEBUG-NOT: dwarf
 
- Help hidden: flag should not be visible.
-// RUN: %clang --help | FileCheck %s --check-prefix=HELP
-// HELP-NOT: key-instructions
-
 // Smoke test: check for Key Instructions keywords in the IR.
 void f() {}
 // RUN: %clang_cc1 %s -triple x86_64-linux-gnu 
-debug-info-kind=line-tables-only -emit-llvm -o - | FileCheck %s 
--check-prefix=SMOKETEST-OFF
diff --git a/clang/test/Driver/hip-save-temps.hip 
b/clang/test/Driver/hip-save-temps.hip
index 142c3f1611a36..8cb5a60aa7e72 100644
--- a/clang/test/Driver/hip-save-temps.hip
+++ b/clang/test/Driver/hip-save-temps.hip
@@ -24,9 +24,9 @@
 // RUN:   FileCheck -check-prefixes=CHECK,RDC,RDCL,NOUT %s
 
 // -fgpu-rdc with -o
-// UN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
-// UN:   -nogpuinc -o executable -fgpu-rdc --offload-arch=gfx900 %s 2>&1 | \
-// UN:   FileCheck -check-prefixes=CHECK,RDC,RDCL,WOUT %s
+// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
+// RUN:   -nogpuinc -o executable -fgpu-rdc --offload-arch=gfx900 %s 2>&1 | \
+// RUN:   FileCheck -check-prefixes=CHECK,RDC,RDCL,WOUT %s
 
 // -fgpu-rdc host object path
 // RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" 
"hip-save-temps-host-x86_64-unknown-linux-gnu.hipi"
diff --git a/clang/test/OpenMP/openmp_attribute_compat.cpp 
b/clang/test/OpenMP/openmp_attribute_compat.cpp
index 69b809d45b43c..e37798bf93313 100644
--- a/clang/test/OpenMP/openmp_attribute_compat.cpp
+++ b/clang/test/OpenMP/openmp_attribute_compat.cpp
@@ -8,8 +8,8 @@
 // RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=off 
-Wno-openmp-51-extensions %s
 
 // RUN: %clang_cc1 -fopenmp -fsyntax-only -verify=pre -Wpre-openmp-51-compat 
-x c -std=c2x %s
-// RUN-: %clang_cc1 -fopenmp -fsyntax-only -verify=off -x c -std=c2x %s
-// RUN-: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=ext 
-Wopenmp -x c -std=c2x %s
+// RUN: %clang_cc1 -fopenmp -fsyntax-only -verify=off -x c -std=c2x %s
+// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -fsyntax-only -verify=ext 
-Wopenmp -x c -std=c2x %s
 
 // off-no-diagnostics
 
diff --git a/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp 
b/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp
index a6e0d920cbc82..8631757a2ae19 100644
--- a/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp
+++ b/compiler-rt/test/ctx_profile/TestCases/autodetect-roots.cpp
@@ -13,7 +13,11 @@
 // RUN:   -mllvm -profile-context-root="" -g -Wl,-export-dynamic
 //
 // Run the binary, and observe the profile fetch handler