https://github.com/carlos4242 created https://github.com/llvm/llvm-project/pull/72204
Currently returns false for _Bool, regardless of C dialect. Fixes #72203. I'm unsure how to add a unit test for this? I am open to suggestions! @AaronBallman >From 26d40ec42af065fdeda6bdf679cc87928c81c97a Mon Sep 17 00:00:00 2001 From: Carl Peto <carl.p...@me.com> Date: Tue, 14 Nov 2023 03:50:14 +0000 Subject: [PATCH] [clang] Sema::isSimpleTypeSpecifier return true for _Bool in c99 Currently returns false for _Bool, regardless of C dialect. Fixes #72203. --- clang/lib/Sema/SemaDecl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 3876eb501083acb..da40b9a1a1b21b9 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -153,6 +153,9 @@ bool Sema::isSimpleTypeSpecifier(tok::TokenKind Kind) const { case tok::kw___auto_type: return true; + case tok::kw__Bool: + return getLangOpts().C99; + case tok::annot_typename: case tok::kw_char16_t: case tok::kw_char32_t: _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits