Author: Shengxin Pei Date: 2026-09-03T17:55:40Z New Revision: db0b0e2e026585406301879650935dbb74cb4074
URL: https://github.com/llvm/llvm-project/commit/db0b0e2e026585406301879650935dbb74cb4074 DIFF: https://github.com/llvm/llvm-project/commit/db0b0e2e026585406301879650935dbb74cb4074.diff LOG: [clang][test] Move test `GH214128.cpp` into `type-traits.cpp` NFC (#221000) Follow up #219799 Added: Modified: clang/test/SemaCXX/type-traits.cpp Removed: clang/test/Parser/GH214128.cpp ################################################################################ diff --git a/clang/test/Parser/GH214128.cpp b/clang/test/Parser/GH214128.cpp deleted file mode 100644 index 60e171fbf8230..0000000000000 --- a/clang/test/Parser/GH214128.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s -// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s - -i < 0; -#if __cplusplus <= 201703L -// expected-error@-2 {{no template named 'i'}} -#endif -// expected-error@-4 {{expected '>'}} -// expected-note@-5 {{to match this '<'}} -#if __cplusplus > 201703L -// expected-warning@-7 {{declaration does not declare anything}} -#endif - -void f() { - struct __is_pod; // expected-warning {{keyword '__is_pod' will be made available as an identifier for the remainder of the translation unit}} - struct __is_pod; -} diff --git a/clang/test/SemaCXX/type-traits.cpp b/clang/test/SemaCXX/type-traits.cpp index ff74461308fb1..e000f51086f1a 100644 --- a/clang/test/SemaCXX/type-traits.cpp +++ b/clang/test/SemaCXX/type-traits.cpp @@ -5186,3 +5186,20 @@ bool b = C<T, S>; // expected-note@-1 {{while checking the satisfaction of concept 'C<T, S>' requested here}} #endif } + +namespace GH214128{ +i < 0; +#if __cplusplus <= 201703L +// expected-error@-2 {{no template named 'i'}} +#endif +// expected-error@-4 {{expected '>'}} +// expected-note@-5 {{to match this '<'}} +#if __cplusplus > 201703L +// expected-warning@-7 {{declaration does not declare anything}} +#endif + +void f() { + struct __is_pod; // expected-warning {{keyword '__is_pod' will be made available as an identifier for the remainder of the translation unit}} + struct __is_pod; +} +} _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
