Skip to content

Conversation

dyung
Copy link
Collaborator

@dyung dyung commented Aug 30, 2025

The test added in #155573 assumes the compiler defaults to the current default of C++17. If the compiler is changed to default to C++20, the test fails because the expected warnings about a construct being a C++20 extension are no longer emitted. This change fixes up the test to work in either C++17 or C++20 mode by disabling the warning and removing the check for it as this is not what is being tested here.

@dyung dyung requested a review from tbaederr August 30, 2025 08:58
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:bytecode Issues for the clang bytecode constexpr interpreter labels Aug 30, 2025
@llvmbot
Copy link
Member

llvmbot commented Aug 30, 2025

@llvm/pr-subscribers-clang

Author: None (dyung)

Changes

The test added in #155573 assumes the compiler defaults to the current default of C++17. If the compiler is changed to default to C++20, the test fails because the expected warnings about a construct being a C++20 extension are no longer emitted. This change fixes up the test to work in either C++17 or C++20 mode by disabling the warning and removing the check for it as this is not what is being tested here.


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

1 Files Affected:

  • (modified) clang/test/AST/ByteCode/vectors.cpp (+4-4)
diff --git a/clang/test/AST/ByteCode/vectors.cpp b/clang/test/AST/ByteCode/vectors.cpp
index 6b41c8d79d5b4..91fec8f86f613 100644
--- a/clang/test/AST/ByteCode/vectors.cpp
+++ b/clang/test/AST/ByteCode/vectors.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=expected,both -flax-vector-conversions=none %s
-// RUN: %clang_cc1 -verify=ref,both -flax-vector-conversions=none %s
+// RUN: %clang_cc1 -Wno-c++20-extensions -fexperimental-new-constant-interpreter -verify=expected,both -flax-vector-conversions=none %s
+// RUN: %clang_cc1 -Wno-c++20-extensions -verify=ref,both -flax-vector-conversions=none %s
 
 typedef int __attribute__((vector_size(16))) VI4;
 constexpr VI4 A = {1,2,3,4};
@@ -147,7 +147,7 @@ namespace {
 namespace Assign {
   constexpr int a2() {
       VI a = {0, 0, 0, 0};
-      VI b; // both-warning {{C++20 extension}}
+      VI b;
 
       b = {1,1,1,1};
       return b[0] + b[1] + b[2] + b[3];
@@ -161,7 +161,7 @@ namespace Assign {
 
   constexpr bool invalid() {
     v2int16_t a = {0, 0};
-    v2int_t b; // both-warning {{C++20 extension}}
+    v2int_t b;
     b = a; // both-error {{incompatible type}}
 
     return true;

@dyung dyung merged commit 5d74c04 into llvm:main Aug 30, 2025
12 checks passed
@dyung dyung deleted the cxx20-test-fix branch August 30, 2025 19:12
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 30, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-quick running on linaro-clang-aarch64-quick while building clang at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'lit :: timeout-hang.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 18
not env -u FILECHECK_OPTS "/usr/bin/python3.10" /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/utils/lit/lit.py -j1 --order=lexical Inputs/timeout-hang/run-nonexistent.txt  --timeout=15 --param external=0 | "/usr/bin/python3.10" /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/utils/lit/tests/timeout-hang.py 5
# executed command: not env -u FILECHECK_OPTS /usr/bin/python3.10 /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/utils/lit/lit.py -j1 --order=lexical Inputs/timeout-hang/run-nonexistent.txt --timeout=15 --param external=0
# .---command stderr------------
# | lit.py: /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 15 seconds was requested on the command line. Forcing timeout to be 15 seconds.
# `-----------------------------
# executed command: /usr/bin/python3.10 /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/utils/lit/tests/timeout-hang.py 5
# .---command stdout------------
# | Testing took 5.25s, which is beyond the grace period of 5.0s
# `-----------------------------
# error: command failed with exit status: 1

--

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


@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 30, 2025

LLVM Buildbot has detected a new failure on builder lldb-remote-linux-ubuntu running on as-builder-9 while building clang at step 16 "test-check-lldb-api".

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

Here is the relevant piece of the build log for the reference
Step 16 (test-check-lldb-api) failure: Test just built components: check-lldb-api completed (failure)
...
PASS: lldb-api :: functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py (445 of 1300)
PASS: lldb-api :: functionalities/data-formatter/root-reference-children/TestRootReferenceChildren.py (446 of 1300)
PASS: lldb-api :: functionalities/data-formatter/parray/TestPrintArray.py (447 of 1300)
PASS: lldb-api :: functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py (448 of 1300)
PASS: lldb-api :: functionalities/data-formatter/synthcapping/TestSyntheticCapping.py (449 of 1300)
PASS: lldb-api :: functionalities/data-formatter/special-chars/TestSummaryStringSpecialChars.py (450 of 1300)
UNSUPPORTED: lldb-api :: functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py (451 of 1300)
PASS: lldb-api :: functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterStdVector.py (452 of 1300)
PASS: lldb-api :: functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py (453 of 1300)
UNRESOLVED: lldb-api :: functionalities/data-formatter/data-formatter-stl/generic/string/TestDataFormatterStdString.py (454 of 1300)
******************** TEST 'lldb-api :: functionalities/data-formatter/data-formatter-stl/generic/string/TestDataFormatterStdString.py' FAILED ********************
Script:
--
/usr/bin/python3.12 /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --libcxx-include-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/c++/v1 --libcxx-include-target-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/aarch64-unknown-linux-gnu/c++/v1 --libcxx-library-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib/aarch64-unknown-linux-gnu --arch aarch64 --build-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/lldb --compiler /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang --dsymutil /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --lldb-obj-root /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb --lldb-libs-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --cmake-build-type Release --platform-url connect://jetson-agx-2198.lab.llvm.org:1234 --platform-working-dir /home/ubuntu/lldb-tests --sysroot /mnt/fs/jetson-agx-ubuntu --env ARCH_CFLAGS=-mcpu=cortex-a78 --platform-name remote-linux --skip-category=lldb-server /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string -p TestDataFormatterStdString.py
--
Exit Code: -6

Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision 5d74c045eddc1ba00846ce6ef7df3584d439b007)
  clang revision 5d74c045eddc1ba00846ce6ef7df3584d439b007
  llvm revision 5d74c045eddc1ba00846ce6ef7df3584d439b007

--
Command Output (stderr):
--
WARNING:root:Custom libc++ is not supported for remote runs: ignoring --libcxx arguments
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_embedded_null_libcxx_dsym (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_embedded_null_libcxx_dsym) (test case does not fall in any category of interest for this run) 
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_embedded_null_libcxx_dwarf (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_embedded_null_libcxx_dwarf)
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_embedded_null_libcxx_dwo (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_embedded_null_libcxx_dwo)
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_embedded_null_libstdcxx_dsym (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_embedded_null_libstdcxx_dsym) (test case does not fall in any category of interest for this run) 
XFAIL: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_embedded_null_libstdcxx_dwarf (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_embedded_null_libstdcxx_dwarf)
XFAIL: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_embedded_null_libstdcxx_dwo (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_embedded_null_libstdcxx_dwo)
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_embedded_null_msvc_dsym (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_embedded_null_msvc_dsym) (test case does not fall in any category of interest for this run) 
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_embedded_null_msvc_dwarf (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_embedded_null_msvc_dwarf) (test case does not fall in any category of interest for this run) 
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_embedded_null_msvc_dwo (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_embedded_null_msvc_dwo) (test case does not fall in any category of interest for this run) 
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_libcxx_dsym (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_libcxx_dsym) (test case does not fall in any category of interest for this run) 
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_libcxx_dwarf (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_libcxx_dwarf)
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_libcxx_dwo (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_libcxx_dwo)
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_libstdcxx_dsym (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_libstdcxx_dsym) (test case does not fall in any category of interest for this run) 
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_libstdcxx_dwarf (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_libstdcxx_dwarf)
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_libstdcxx_dwo (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_libstdcxx_dwo)
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_msvc_dsym (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_msvc_dsym) (test case does not fall in any category of interest for this run) 
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_msvc_dwarf (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_msvc_dwarf) (test case does not fall in any category of interest for this run) 
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_msvc_dwo (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_msvc_dwo) (test case does not fall in any category of interest for this run) 
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_multibyte_libcxx_dsym (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_multibyte_libcxx_dsym) (test case does not fall in any category of interest for this run) 
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_multibyte_libcxx_dwarf (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_multibyte_libcxx_dwarf)
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_multibyte_libcxx_dwo (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_multibyte_libcxx_dwo)
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_multibyte_libstdcxx_dsym (TestDataFormatterStdString.StdStringDataFormatterTestCase.test_multibyte_libstdcxx_dsym) (test case does not fall in any category of interest for this run) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:bytecode Issues for the clang bytecode constexpr interpreter clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants