[clang] [HLSL] Rewrite semantics parsing (PR #152537)
Nathan Gauër via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 25 05:55:17 PDT 2025
================
@@ -118,6 +118,48 @@ static void fixSeparateAttrArgAndNumber(StringRef ArgStr, SourceLocation ArgLoc,
Slot = new (Ctx) IdentifierLoc(ArgLoc, PP.getIdentifierInfo(FixedArg));
}
+Parser::ParsedSemantic Parser::ParseHLSLSemantic() {
+ assert(Tok.is(tok::identifier) && "Not a HLSL Annotation");
+
+ // Semantic pattern: [A-Za-z_]+[0-9]*
----------------
Keenuts wrote:
Ah right, it's slightly more complex than what I hoped. Changed the regex.
https://github.com/llvm/llvm-project/pull/152537
More information about the cfe-commits
mailing list