Skip to content

Commit c59a8bc

Browse files
committed
Add KEYCUSTOMFN flag definition and mapping
Added the missing KEYCUSTOMFN keyword flag that was causing compilation errors. Changes: - Added KEYCUSTOMFN = 0x10000000 to keyword flags enum in IdentifierTable.h - Shifted KEYFIXEDPOINT to 0x20000000 to make room - Added case for KEYCUSTOMFN in getKeywordStatus() in IdentifierTable.cpp - Maps to LangOpts.CustomizableFunctions This fixes the 'KEYCUSTOMFN was not declared in this scope' errors.
1 parent 7cfbe57 commit c59a8bc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

clang/include/clang/Basic/IdentifierTable.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ enum TokenKey : unsigned {
7676
KEYZOS = 0x2000000,
7777
KEYNOZOS = 0x4000000,
7878
KEYHLSL = 0x8000000,
79-
KEYFIXEDPOINT = 0x10000000,
79+
KEYCUSTOMFN = 0x10000000,
80+
KEYFIXEDPOINT = 0x20000000,
8081
KEYMAX = KEYFIXEDPOINT, // The maximum key
8182
KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
8283
KEYALL = (KEYMAX | (KEYMAX - 1)) & ~KEYNOMS18 & ~KEYNOOPENCL &

clang/lib/Basic/IdentifierTable.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ static KeywordStatus getKeywordStatusHelper(const LangOptions &LangOpts,
139139
return LangOpts.ZVector ? KS_Enabled : KS_Unknown;
140140
case KEYCOROUTINES:
141141
return LangOpts.Coroutines ? KS_Enabled : KS_Unknown;
142+
case KEYCUSTOMFN:
143+
return LangOpts.CustomizableFunctions ? KS_Enabled : KS_Unknown;
142144
case KEYMODULES:
143145
return KS_Unknown;
144146
case KEYOPENCLCXX:

0 commit comments

Comments
 (0)