Skip to content

Conversation

mizvekov
Copy link
Contributor

I also posted these on the core reflector today.

@mizvekov mizvekov self-assigned this Sep 23, 2025
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Sep 23, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 23, 2025

@llvm/pr-subscribers-clang

Author: Matheus Izvekov (mizvekov)

Changes

I also posted these on the core reflector today.


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

2 Files Affected:

  • (modified) clang/test/SemaTemplate/cwg2398.cpp (+19)
  • (modified) clang/test/SemaTemplate/temp_arg_template.cpp (+25)
diff --git a/clang/test/SemaTemplate/cwg2398.cpp b/clang/test/SemaTemplate/cwg2398.cpp
index 06333c81a603e..315fa952932c5 100644
--- a/clang/test/SemaTemplate/cwg2398.cpp
+++ b/clang/test/SemaTemplate/cwg2398.cpp
@@ -672,3 +672,22 @@ namespace nttp_partial_order {
     template void f<B>(B<nullptr>);
   } // namespace t6
 } // namespace nttp_partial_order
+
+namespace nttp_inconsistent {
+  namespace t1 {
+    template<class A, A B> struct X {};
+    // expected-error@-1 {{conflicting deduction 'C' against 'int' for parameter}}
+    template<template<class C, int D> class TT> struct Y {};
+    // expected-note@-1 {{previous template template parameter is here}}
+    template struct Y<X>;
+    // expected-note@-1 {{has different template parameters}}
+  } // namespace t1
+  namespace t2 {
+    template<class A, A B = 0> struct X {};
+    // expected-error@-1 {{conflicting deduction 'C' against 'int' for parameter}}
+    template<template<class C> class TT> struct Y {};
+    // expected-note@-1 {{previous template template parameter is here}}
+    template struct Y<X>;
+    // expected-note@-1 {{has different template parameters}}
+  } // namespace t2
+} // namespace nttp_inconsistent
diff --git a/clang/test/SemaTemplate/temp_arg_template.cpp b/clang/test/SemaTemplate/temp_arg_template.cpp
index c9576e2057e53..3d71061f9cfd5 100644
--- a/clang/test/SemaTemplate/temp_arg_template.cpp
+++ b/clang/test/SemaTemplate/temp_arg_template.cpp
@@ -168,3 +168,28 @@ namespace PR10147 {
   template<template<typename...> class A> void f(A<int>*) { A<> a; } // expected-warning 0-1{{extension}}
   void g() { f((A<>*)0); }
 }
+
+namespace multiple_conversions {
+  constexpr int g = 1;
+  struct Z {
+      constexpr operator const int&() const { return g; }
+      constexpr operator int() { return 2; }
+  } z;
+
+  template<template<const int&> class TT> struct A {
+    // precxx17-note@-1 {{template parameter is declared here}}
+    static constexpr int value = TT<z>::value;
+    // precxx17-error@-1 {{'const int &' cannot bind to template argument of type 'struct Z'}}
+    // FIXME: Bad error recovery.
+    // precxx17-error@-3 {{requires an initializer}}
+  };
+
+  template<int I> struct B {
+    static constexpr int value = I;
+  };
+  // FIXME: This should probably convert z to (const int &) first, then
+  // convert that to int.
+  static_assert(A<B>::value == 1);
+  // cxx17-error@-1 {{static assertion failed}}
+  // cxx17-note@-2 {{expression evaluates to '2 == 1'}}
+} // namespace multiple_conversions

@mizvekov mizvekov enabled auto-merge (squash) September 23, 2025 04:26
I also posted these on the core reflector today.
@mizvekov mizvekov force-pushed the users/mizvekov/add-ttp-tests branch from 068855e to 554e56e Compare September 23, 2025 05:05
@mizvekov mizvekov merged commit 15f05dc into main Sep 23, 2025
9 checks passed
@mizvekov mizvekov deleted the users/mizvekov/add-ttp-tests branch September 23, 2025 05:30
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 23, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-ppc64le-linux running on ppc64le-sanitizer while building clang at step 2 "annotate".

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

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) (timed out)
...
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat.cppm
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/lib/libc++.modules.json
[121/129] Generating MSAN_INST_TEST_OBJECTS.msan_test_main.cpp.powerpc64le-with-call.o
[123/129] Generating MSAN_INST_GTEST.gtest-all.cc.powerpc64le-with-call.o
[124/129] Generating MSAN_INST_GTEST.gtest-all.cc.powerpc64le.o
[125/129] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.powerpc64le-with-call.o
[126/129] Generating Msan-powerpc64le-with-call-Test
[127/129] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.powerpc64le.o
[128/129] Generating Msan-powerpc64le-Test
[128/129] Running compiler_rt regression tests
command timed out: 1800 seconds without output running [b'python', b'../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=4414.421542
Step 9 (test compiler-rt debug) failure: test compiler-rt debug (failure)
...
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/text_encoding.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/thread.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/tuple.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/type_traits.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/typeindex.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/typeinfo.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/unordered_map.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/unordered_set.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/utility.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/valarray.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/variant.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/vector.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std/version.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cassert.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cctype.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cerrno.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cfenv.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cfloat.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cinttypes.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/climits.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/clocale.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cmath.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/csetjmp.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/csignal.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cstdarg.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cstddef.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cstdint.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cstdio.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cstdlib.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cstring.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/ctime.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cuchar.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cwchar.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cwctype.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.cppm
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat.cppm
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le/lib/libc++.modules.json
[121/129] Generating MSAN_INST_TEST_OBJECTS.msan_test_main.cpp.powerpc64le-with-call.o
[123/129] Generating MSAN_INST_GTEST.gtest-all.cc.powerpc64le-with-call.o
[124/129] Generating MSAN_INST_GTEST.gtest-all.cc.powerpc64le.o
[125/129] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.powerpc64le-with-call.o
[126/129] Generating Msan-powerpc64le-with-call-Test
[127/129] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.powerpc64le.o
[128/129] Generating Msan-powerpc64le-Test
[128/129] Running compiler_rt regression tests

command timed out: 1800 seconds without output running [b'python', b'../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=4414.421542

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 23, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-test-suite running on ppc64le-clang-test-suite while building clang at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LeakSanitizer-Standalone-powerpc64le :: TestCases/create_thread_leak.cpp' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/./bin/clang  --driver-mode=g++ -O0  -m64 -fno-function-sections  -gline-tables-only -fsanitize=leak -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/../ -pthread /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp # RUN: at line 3
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/./bin/clang --driver-mode=g++ -O0 -m64 -fno-function-sections -gline-tables-only -fsanitize=leak -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/../ -pthread /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 1 0 0 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK123 # RUN: at line 4
+ FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK123
+ not /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 1 0 0
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 1 0 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234 # RUN: at line 5
+ FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
+ not /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 1 0
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 0 1 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234 # RUN: at line 6
+ FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
+ not /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 0 1
FileCheck error: '<stdin>' is empty.
FileCheck command line:  FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234

--

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


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