Skip to content

Commit 469a1a7

Browse files
chore: autopublish 2026-04-22T21:26:25Z
1 parent 841a635 commit 469a1a7

2 files changed

Lines changed: 15 additions & 21 deletions

File tree

tools/clang/include/clang/Lex/Token.h

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -294,26 +294,18 @@ class Token {
294294

295295
// HLSL Change Starts
296296
bool isHLSLReserved() const {
297-
return
298-
is(tok::kw___is_signed) ||
299-
is(tok::kw___declspec) ||
300-
is(tok::kw___forceinline) ||
301-
is(tok::kw_auto) ||
302-
is(tok::kw_catch) || is(tok::kw_const_cast) ||
303-
is(tok::kw_delete) || is(tok::kw_dynamic_cast) ||
304-
is(tok::kw_enum) || is(tok::kw_explicit) ||
305-
is(tok::kw_friend) ||
306-
is(tok::kw_goto) ||
307-
is(tok::kw_mutable) ||
308-
is(tok::kw_new) ||
309-
is(tok::kw_operator) ||
310-
is(tok::kw_protected) || is(tok::kw_private) || is(tok::kw_public) ||
311-
is(tok::kw_reinterpret_cast) ||
312-
is(tok::kw_signed) || is(tok::kw_sizeof) || is(tok::kw_static_cast) ||
313-
is(tok::kw_template) || is(tok::kw_throw) || is(tok::kw_try) || is(tok::kw_typename) ||
314-
is(tok::kw_union) || is(tok::kw_using) ||
315-
is(tok::kw_virtual) ||
316-
is(tok::kw_volatile);
297+
return is(tok::kw___is_signed) || is(tok::kw___declspec) ||
298+
is(tok::kw___forceinline) || is(tok::kw_auto) || is(tok::kw_catch) ||
299+
is(tok::kw_const_cast) || is(tok::kw_delete) ||
300+
is(tok::kw_dynamic_cast) || is(tok::kw_enum) ||
301+
is(tok::kw_explicit) || is(tok::kw_friend) || is(tok::kw_goto) ||
302+
is(tok::kw_mutable) || is(tok::kw_new) || is(tok::kw_operator) ||
303+
is(tok::kw_protected) || is(tok::kw_private) || is(tok::kw_public) ||
304+
is(tok::kw_reinterpret_cast) || is(tok::kw_signed) ||
305+
is(tok::kw_sizeof) || is(tok::kw_static_cast) ||
306+
is(tok::kw_template) || is(tok::kw_throw) || is(tok::kw_try) ||
307+
is(tok::kw_typename) || is(tok::kw_union) || is(tok::kw_using) ||
308+
is(tok::kw_virtual) || is(tok::kw_volatile);
317309
}
318310
// HLSL Change Starts
319311

tools/clang/lib/Parse/ParseDecl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4193,7 +4193,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
41934193
getLangOpts());
41944194
break;
41954195
case tok::kw_volatile:
4196-
if (getLangOpts().HLSL) { goto HLSLReservedKeyword; } // HLSL Change - volatile is reserved for HLSL
4196+
if (getLangOpts().HLSL) {
4197+
goto HLSLReservedKeyword;
4198+
} // HLSL Change - volatile is reserved for HLSL
41974199
isInvalid = DS.SetTypeQual(DeclSpec::TQ_volatile, Loc, PrevSpec, DiagID,
41984200
getLangOpts());
41994201
break;

0 commit comments

Comments
 (0)