https://github.com/jsji created https://github.com/llvm/llvm-project/pull/235305
The test added by aa6e40c073e6 checks for named values (entry:, %x.addr, %x), which only appear when clang keeps value names. That is the default in assertion builds, but non-assertion CI builds discard them, so the CHECK-NEXT: entry: line fails. Pass -fno-discard-value-names explicitly. Assisted-By: Claude Opus 5.5 >From c04f9bb3c58950d8c2c870ae67f7a8b5567bd386 Mon Sep 17 00:00:00 2001 From: Jinsong Ji <[email protected]> Date: Sat, 24 Oct 2026 15:55:54 +0200 Subject: [PATCH] [Test][clang-repl]Keep value names in clang-repl pragma-optimize.cpp The test added by aa6e40c073e6 checks for named values (entry:, %x.addr, %x), which only appear when clang keeps value names. That is the default in assertion builds, but non-assertion CI builds discard them, so the CHECK-NEXT: entry: line fails. Pass -fno-discard-value-names explicitly. Assisted-By: Claude Opus 5.5 --- clang/test/Interpreter/pragma-optimize.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/test/Interpreter/pragma-optimize.cpp b/clang/test/Interpreter/pragma-optimize.cpp index 1d43c54e8edb42..580901117da51a 100644 --- a/clang/test/Interpreter/pragma-optimize.cpp +++ b/clang/test/Interpreter/pragma-optimize.cpp @@ -3,7 +3,8 @@ // '#pragma clang repl optimize(<opt>)' sets the optimization level and size for // input parsed after it; <opt> is an -O flag spelled without the leading dash. // -// RUN: cat %s | clang-repl -Xcc -Xclang -Xcc -emit-llvm | FileCheck %s +// RUN: cat %s | clang-repl -Xcc -fno-discard-value-names -Xcc -Xclang -Xcc -emit-llvm \ +// RUN: | FileCheck %s extern "C" int f_o0(int x) { return x; } // CHECK: ; Function Attrs: {{.*}}noinline {{.*}}optnone _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
