Skip to content

Commit 419d1c2

Browse files
authored
Revert "[clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (#142749) (#142933)
This broke CI on platforms such as PPC64LE and AIX due to _Float16 not being supported. We will reintroduce the changes later with proper platform guards and tests. This reverts commit 7ca7bcb.
1 parent 7df458b commit 419d1c2

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

clang/lib/Parse/ParseTentative.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,6 @@ Parser::isCXXDeclarationSpecifier(ImplicitTypenameContext AllowImplicitTypename,
11711171
case tok::kw_inline:
11721172
case tok::kw_virtual:
11731173
case tok::kw_explicit:
1174-
case tok::kw__Noreturn:
11751174

11761175
// Modules
11771176
case tok::kw___module_private__:
@@ -1226,7 +1225,6 @@ Parser::isCXXDeclarationSpecifier(ImplicitTypenameContext AllowImplicitTypename,
12261225
// GNU
12271226
case tok::kw_restrict:
12281227
case tok::kw__Complex:
1229-
case tok::kw__Imaginary:
12301228
case tok::kw___attribute:
12311229
case tok::kw___auto_type:
12321230
return TPResult::True;

clang/test/Interpreter/disambiguate-decl-stmt.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,3 @@ __attribute((noreturn)) Attrs2::Attrs2() = default;
102102

103103
// Extra semicolon
104104
namespace N {};
105-
106-
// Test C keywords supported in all language modes.
107-
// https://clang.llvm.org/docs/LanguageExtensions.html#c-keywords-supported-in-all-language-modes
108-
109-
_Alignas(16) int aligned_var;
110-
int align = _Alignof(double);
111-
_Atomic int atomic_var = 0;
112-
_Complex double complex_val = 1.0 + 2.0i;
113-
_Float16 f = 1.5;
114-
_Thread_local int counter = 0;
115-
_Static_assert(sizeof(int) == 4, "int must be 4 bytes");
116-
_Imaginary float i = 2.0f; // expected-error {{imaginary types are not supported}}
117-
_Noreturn void noreturn_func() { while (true) {} }

0 commit comments

Comments
 (0)