[clang] Fix test added in #154418 to work when the default is C++20. (PR #154463)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 19 20:49:43 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: None (dyung)
<details>
<summary>Changes</summary>
The test added for #<!-- -->154418 specifically tests for a warning that the compiler should emit informing the user that a feature is a C++20 extension, but the compiler does not emit that when the default is C++20, so we should skip that test. This change checks whether the C++ default standard is less than C++20, and if so, skips the test.
---
Full diff: https://github.com/llvm/llvm-project/pull/154463.diff
1 Files Affected:
- (modified) clang/test/SemaTemplate/nested-name-spec-template.cpp (+1-1)
``````````diff
diff --git a/clang/test/SemaTemplate/nested-name-spec-template.cpp b/clang/test/SemaTemplate/nested-name-spec-template.cpp
index c99e1eed456cc..833f76218212a 100644
--- a/clang/test/SemaTemplate/nested-name-spec-template.cpp
+++ b/clang/test/SemaTemplate/nested-name-spec-template.cpp
@@ -168,7 +168,7 @@ namespace unresolved_using {
template struct C<int>;
} // namespace unresolved_using
-#if __cplusplus >= 201703L
+#if (__cplusplus >= 201703L && __cplusplus < 202002L)
namespace SubstTemplateTypeParmPackType {
template <int...> struct A {};
``````````
</details>
https://github.com/llvm/llvm-project/pull/154463
More information about the cfe-commits
mailing list