Skip to content

Conversation

@anutosh491
Copy link
Member

This reverts commit 7ca7bcb.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Jun 5, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 5, 2025

@llvm/pr-subscribers-clang

Author: Anutosh Bhat (anutosh491)

Changes

This reverts commit 7ca7bcb.


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

2 Files Affected:

  • (modified) clang/lib/Parse/ParseTentative.cpp (-2)
  • (modified) clang/test/Interpreter/disambiguate-decl-stmt.cpp (-13)
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp
index f50bcd8ea90bb..95cee824c40b7 100644
--- a/clang/lib/Parse/ParseTentative.cpp
+++ b/clang/lib/Parse/ParseTentative.cpp
@@ -1171,7 +1171,6 @@ Parser::isCXXDeclarationSpecifier(ImplicitTypenameContext AllowImplicitTypename,
   case tok::kw_inline:
   case tok::kw_virtual:
   case tok::kw_explicit:
-  case tok::kw__Noreturn:
 
     // Modules
   case tok::kw___module_private__:
@@ -1226,7 +1225,6 @@ Parser::isCXXDeclarationSpecifier(ImplicitTypenameContext AllowImplicitTypename,
     // GNU
   case tok::kw_restrict:
   case tok::kw__Complex:
-  case tok::kw__Imaginary:
   case tok::kw___attribute:
   case tok::kw___auto_type:
     return TPResult::True;
diff --git a/clang/test/Interpreter/disambiguate-decl-stmt.cpp b/clang/test/Interpreter/disambiguate-decl-stmt.cpp
index f2a59c510f9a2..1f4d5e267288b 100644
--- a/clang/test/Interpreter/disambiguate-decl-stmt.cpp
+++ b/clang/test/Interpreter/disambiguate-decl-stmt.cpp
@@ -102,16 +102,3 @@ __attribute((noreturn)) Attrs2::Attrs2() = default;
 
 // Extra semicolon
 namespace N {};
-
-// Test C keywords supported in all language modes.
-// https://clang.llvm.org/docs/LanguageExtensions.html#c-keywords-supported-in-all-language-modes
-
-_Alignas(16) int aligned_var;
-int align = _Alignof(double);
-_Atomic int atomic_var = 0;
-_Complex double complex_val = 1.0 + 2.0i;
-_Float16 f = 1.5;
-_Thread_local int counter = 0;
-_Static_assert(sizeof(int) == 4, "int must be 4 bytes");
-_Imaginary float i = 2.0f; // expected-error {{imaginary types are not supported}}
-_Noreturn void noreturn_func() { while (true) {} }
\ No newline at end of file

@anutosh491
Copy link
Member Author

anutosh491 commented Jun 5, 2025

Needed a revert as we added a test for running _Float16 with clang-repl only to realize later that it should be conditionally ignored for platforms such as ppc64le and AIX.

Buildbot says the following

/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/21/include -nostdsysteminc -fsyntax-only -verify -fincremental-extensions -std=c++20 /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Interpreter/disambiguate-decl-stmt.cpp # RUN: at line 1

/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/21/include -nostdsysteminc -fsyntax-only -verify -fincremental-extensions -std=c++20 /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Interpreter/disambiguate-decl-stmt.cpp
error: 'expected-error' diagnostics seen but not expected:
File /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Interpreter/disambiguate-decl-stmt.cpp Line 113: _Float16 is not supported on this target
1 error generated.

…ed in all language models (llvm#142749)"

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.
@anutosh491 anutosh491 force-pushed the revert-c-keywords-pr branch from 6652fcc to ff70ffb Compare June 5, 2025 10:53
@vgvassilev vgvassilev merged commit 419d1c2 into llvm:main Jun 5, 2025
6 of 9 checks passed
@anutosh491 anutosh491 deleted the revert-c-keywords-pr branch June 5, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants