[clang] [clang][NFC] Use full diagnostic text in C++ DR tests (PR #179674)
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/31341 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) ... [201/205] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64-with-call.o [202/205] Generating Msan-aarch64-with-call-Test [203/205] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64.o [204/205] Generating Msan-aarch64-Test [204/205] Running compiler_rt regression tests llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:273: warning: input '/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/interception/Unit' contained no tests llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:273: warning: input '/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/Unit' contained no tests llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds. -- Testing: 6345 tests, 72 workers -- Testing: 0.. 10.. 20.. FAIL: HWAddressSanitizer-aarch64 :: TestCases/hwasan_symbolize_stack_overflow.cpp (1975 of 6345) TEST 'HWAddressSanitizer-aarch64 :: TestCases/hwasan_symbolize_stack_overflow.cpp' FAILED Exit Code: 1 Command Output (stdout): -- # RUN: at line 1 rm -rf /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp; mkdir /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp # executed command: rm -rf /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp # note: command had no output on stdout or stderr # executed command: mkdir /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp # note: command had no output on stdout or stderr # RUN: at line 2 /home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions -Wl,--build-id -g /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/hwasan/TestCases/hwasan_symbolize_stack_overflow.cpp -o /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp/hwasan_overflow # executed command: /home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions -Wl,--build-id -g /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/hwasan/TestCases/hwasan_symbolize_stack_overflow.cpp -o /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp/hwasan_overflow # note: command had no output on stdout or stderr # RUN: at line 3 env HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:symbolize=0 not /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp/hwasan_overflow 16 2>&1 | /home/b/sanitizer-aarch64-linux/build/build_default/bin/hwasan_symbolize --symbols /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp --index | FileCheck /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/hwasan/TestCases/hwasan_symbolize_stack_overflow.cpp --check-prefixes=CHECK,AFTER0 # executed command: env HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:symbolize=0 not /home/b/saniti
[clang] [clang][NFC] Use full diagnostic text in C++ DR tests (PR #179674)
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/179674 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][NFC] Use full diagnostic text in C++ DR tests (PR #179674)
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Vlad Serebrennikov (Endilll)
Changes
This is the first of two patches that apply various fixes to C++ DR tests based
on new tooling I developed. This patch is almost entirely about incomplete
diagnostic text in `expected` directives, which was intended to be complete,
but I failed to notice that during reviews.
There is also a couple of fixes for `expected-note` directives that were not
correctly indented relative to the error they attach to. Then there is couple
of fixes when `expected` directives where not placed correctly (didn't use
`@-1` way).
---
Patch is 37.14 KiB, truncated to 20.00 KiB below, full version:
https://github.com/llvm/llvm-project/pull/179674.diff
20 Files Affected:
- (modified) clang/test/CXX/drs/cwg0xx.cpp (+13-13)
- (modified) clang/test/CXX/drs/cwg11xx.cpp (+2-2)
- (modified) clang/test/CXX/drs/cwg13xx.cpp (+2-2)
- (modified) clang/test/CXX/drs/cwg14xx.cpp (+8-8)
- (modified) clang/test/CXX/drs/cwg16xx.cpp (+4-4)
- (modified) clang/test/CXX/drs/cwg18xx.cpp (+1-1)
- (modified) clang/test/CXX/drs/cwg19xx.cpp (+1-1)
- (modified) clang/test/CXX/drs/cwg1xx.cpp (+2-2)
- (modified) clang/test/CXX/drs/cwg20xx.cpp (+6-6)
- (modified) clang/test/CXX/drs/cwg22xx.cpp (+1-1)
- (modified) clang/test/CXX/drs/cwg23xx.cpp (+1-1)
- (modified) clang/test/CXX/drs/cwg26xx.cpp (+6-6)
- (modified) clang/test/CXX/drs/cwg27xx.cpp (+6-6)
- (modified) clang/test/CXX/drs/cwg29xx.cpp (+4-2)
- (modified) clang/test/CXX/drs/cwg30xx.cpp (+2-2)
- (modified) clang/test/CXX/drs/cwg3xx.cpp (+12-12)
- (modified) clang/test/CXX/drs/cwg4xx.cpp (+9-9)
- (modified) clang/test/CXX/drs/cwg5xx.cpp (+7-7)
- (modified) clang/test/CXX/drs/cwg6xx.cpp (+7-7)
- (modified) clang/test/CXX/drs/cwg7xx.cpp (+2-2)
``diff
diff --git a/clang/test/CXX/drs/cwg0xx.cpp b/clang/test/CXX/drs/cwg0xx.cpp
index 10a4f1d6add3a..6d3a3238d4f38 100644
--- a/clang/test/CXX/drs/cwg0xx.cpp
+++ b/clang/test/CXX/drs/cwg0xx.cpp
@@ -335,14 +335,14 @@ namespace cwg25 { // cwg25: 4
// since-cxx17-note@-2 {{use 'noexcept(false)' instead}}
void (A::*g)() throw () = f;
// cxx98-14-error@-1 {{target exception specification is not superset of
source}}
- // since-cxx17-error@-2 {{different exception specifications}}
+ // since-cxx17-error@-2 {{cannot initialize a variable of type 'void
(A::*)() throw()' with an lvalue of type 'void (A::*)() throw(int)': different
exception specifications}}
void (A::*g2)() throw () = 0;
void (A::*h)() throw (int, char) = f;
// since-cxx17-error@-1 {{ISO C++17 does not allow dynamic exception
specifications}}
// since-cxx17-note@-2 {{use 'noexcept(false)' instead}}
void (A::*i)() throw () = &A::f;
// cxx98-14-error@-1 {{target exception specification is not superset of
source}}
- // since-cxx17-error@-2 {{different exception specifications}}
+ // since-cxx17-error@-2 {{cannot initialize a variable of type 'void
(A::*)() throw()' with an rvalue of type 'void (A::*)() throw(int)': different
exception specifications}}
void (A::*i2)() throw () = 0;
void (A::*j)() throw (int, char) = &A::f;
// since-cxx17-error@-1 {{ISO C++17 does not allow dynamic exception
specifications}}
@@ -350,11 +350,11 @@ namespace cwg25 { // cwg25: 4
void x() {
g2 = f;
// cxx98-14-error@-1 {{target exception specification is not superset of
source}}
-// since-cxx17-error@-2 {{different exception specifications}}
+// since-cxx17-error@-2 {{assigning to 'void (A::*)() throw()' from
incompatible type 'void (A::*)() throw(int)': different exception
specifications}}
h = f;
i2 = &A::f;
// cxx98-14-error@-1 {{target exception specification is not superset of
source}}
-// since-cxx17-error@-2 {{different exception specifications}}
+// since-cxx17-error@-2 {{assigning to 'void (A::*)() throw()' from
incompatible type 'void (A::*)() throw(int)': different exception
specifications}}
j = &A::f;
}
} // namespace cwg25
@@ -708,7 +708,7 @@ namespace cwg39 { // cwg39: no
struct cwg39::PR5916::D -> C -> A}} */
// expected-note@#cwg39-A-n {{member found by ambiguous name lookup}}
-// expected-error@#cwg39-sizeof {{unknown type name}}
+// expected-error@#cwg39-sizeof {{unknown type name 'n'}}
#if __cplusplus >= 201103L
decltype(D::n) n;
/* since-cxx11-error@-1
@@ -1058,19 +1058,19 @@ namespace cwg62 { // cwg62: 2.9
void f() {
struct NoLinkage {};
X a;
-// cxx98-error@-1 {{template argument uses local type }}
+// cxx98-error@-1 {{template argument uses local type 'NoLinkage'}}
X b;
-// cxx98-error@-1 {{template argument uses local type }}
+// cxx98-error@-1 {{template argument uses local type 'NoLinkage'}}
get();
-// cxx98-error@-1 {{template argument uses local type }}
-// cxx98-note@-2 {{while substituting explicitly-specified template
arguments}}
+// cxx98-error@-1 {{template argument us
[clang] [clang][NFC] Use full diagnostic text in C++ DR tests (PR #179674)
https://github.com/Endilll auto_merge_enabled https://github.com/llvm/llvm-project/pull/179674 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][NFC] Use full diagnostic text in C++ DR tests (PR #179674)
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/179674
This is the first of two patches that apply various fixes to C++ DR tests based
on new tooling I developed. This patch is almost entirely about incomplete
diagnostic text in `expected` directives, which was intended to be complete,
but I failed to notice that during reviews.
There is also a couple of fixes for `expected-note` directives that were not
correctly indented relative to the error they attach to. Then there is couple
of fixes when `expected` directives where not placed correctly (didn't use
`@-1` way).
>From 66a0eeda4f1f719def91d0e2a7a534af53033238 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Wed, 4 Feb 2026 17:13:59 +0300
Subject: [PATCH] [clang][NFC] Use full diagnostic text in C++ DR tests
---
clang/test/CXX/drs/cwg0xx.cpp | 26 +-
clang/test/CXX/drs/cwg11xx.cpp | 4 ++--
clang/test/CXX/drs/cwg13xx.cpp | 4 ++--
clang/test/CXX/drs/cwg14xx.cpp | 16
clang/test/CXX/drs/cwg16xx.cpp | 8
clang/test/CXX/drs/cwg18xx.cpp | 2 +-
clang/test/CXX/drs/cwg19xx.cpp | 2 +-
clang/test/CXX/drs/cwg1xx.cpp | 4 ++--
clang/test/CXX/drs/cwg20xx.cpp | 12 ++--
clang/test/CXX/drs/cwg22xx.cpp | 2 +-
clang/test/CXX/drs/cwg23xx.cpp | 2 +-
clang/test/CXX/drs/cwg26xx.cpp | 12 ++--
clang/test/CXX/drs/cwg27xx.cpp | 12 ++--
clang/test/CXX/drs/cwg29xx.cpp | 6 --
clang/test/CXX/drs/cwg30xx.cpp | 4 ++--
clang/test/CXX/drs/cwg3xx.cpp | 24
clang/test/CXX/drs/cwg4xx.cpp | 18 +-
clang/test/CXX/drs/cwg5xx.cpp | 14 +++---
clang/test/CXX/drs/cwg6xx.cpp | 14 +++---
clang/test/CXX/drs/cwg7xx.cpp | 4 ++--
20 files changed, 96 insertions(+), 94 deletions(-)
diff --git a/clang/test/CXX/drs/cwg0xx.cpp b/clang/test/CXX/drs/cwg0xx.cpp
index 10a4f1d6add3a..6d3a3238d4f38 100644
--- a/clang/test/CXX/drs/cwg0xx.cpp
+++ b/clang/test/CXX/drs/cwg0xx.cpp
@@ -335,14 +335,14 @@ namespace cwg25 { // cwg25: 4
// since-cxx17-note@-2 {{use 'noexcept(false)' instead}}
void (A::*g)() throw () = f;
// cxx98-14-error@-1 {{target exception specification is not superset of
source}}
- // since-cxx17-error@-2 {{different exception specifications}}
+ // since-cxx17-error@-2 {{cannot initialize a variable of type 'void
(A::*)() throw()' with an lvalue of type 'void (A::*)() throw(int)': different
exception specifications}}
void (A::*g2)() throw () = 0;
void (A::*h)() throw (int, char) = f;
// since-cxx17-error@-1 {{ISO C++17 does not allow dynamic exception
specifications}}
// since-cxx17-note@-2 {{use 'noexcept(false)' instead}}
void (A::*i)() throw () = &A::f;
// cxx98-14-error@-1 {{target exception specification is not superset of
source}}
- // since-cxx17-error@-2 {{different exception specifications}}
+ // since-cxx17-error@-2 {{cannot initialize a variable of type 'void
(A::*)() throw()' with an rvalue of type 'void (A::*)() throw(int)': different
exception specifications}}
void (A::*i2)() throw () = 0;
void (A::*j)() throw (int, char) = &A::f;
// since-cxx17-error@-1 {{ISO C++17 does not allow dynamic exception
specifications}}
@@ -350,11 +350,11 @@ namespace cwg25 { // cwg25: 4
void x() {
g2 = f;
// cxx98-14-error@-1 {{target exception specification is not superset of
source}}
-// since-cxx17-error@-2 {{different exception specifications}}
+// since-cxx17-error@-2 {{assigning to 'void (A::*)() throw()' from
incompatible type 'void (A::*)() throw(int)': different exception
specifications}}
h = f;
i2 = &A::f;
// cxx98-14-error@-1 {{target exception specification is not superset of
source}}
-// since-cxx17-error@-2 {{different exception specifications}}
+// since-cxx17-error@-2 {{assigning to 'void (A::*)() throw()' from
incompatible type 'void (A::*)() throw(int)': different exception
specifications}}
j = &A::f;
}
} // namespace cwg25
@@ -708,7 +708,7 @@ namespace cwg39 { // cwg39: no
struct cwg39::PR5916::D -> C -> A}} */
// expected-note@#cwg39-A-n {{member found by ambiguous name lookup}}
-// expected-error@#cwg39-sizeof {{unknown type name}}
+// expected-error@#cwg39-sizeof {{unknown type name 'n'}}
#if __cplusplus >= 201103L
decltype(D::n) n;
/* since-cxx11-error@-1
@@ -1058,19 +1058,19 @@ namespace cwg62 { // cwg62: 2.9
void f() {
struct NoLinkage {};
X a;
-// cxx98-error@-1 {{template argument uses local type }}
+// cxx98-error@-1 {{template argument uses local type 'NoLinkage'}}
X b;
-// cxx98-error@-1 {{template argument uses local type }}
+// cxx98-error@-1 {{template argument uses local type 'NoLinkage'}}
get();
-// cxx98-error@-1 {{template argument uses local type }}
-// cxx98-note@-2 {{while substituting explicitly-specified template
arguments}}
+// cxx98-error@-1 {{template argum
