[clang] [clang] Sema::isSimpleTypeSpecifier return true for _Bool in c99 (PR #72204)
Carl Peto via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 14 10:20:09 PST 2023
https://github.com/carlos4242 updated https://github.com/llvm/llvm-project/pull/72204
>From 26d40ec42af065fdeda6bdf679cc87928c81c97a Mon Sep 17 00:00:00 2001
From: Carl Peto <carl.peto at 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:
More information about the cfe-commits
mailing list