[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Implement Parsing of Descriptor Tables (PR #122982)
Ashley Coleman via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jan 22 09:31:09 PST 2025
================
@@ -148,6 +148,333 @@ bool RootSignatureLexer::LexToken(RootSignatureToken &Result) {
return false;
}
+// Parser Definitions
+
+RootSignatureParser::RootSignatureParser(
+ SmallVector<RootElement> &Elements,
+ const SmallVector<RootSignatureToken> &Tokens)
+ : Elements(Elements) {
+ CurTok = Tokens.begin();
+ LastTok = Tokens.end();
+}
+
+bool RootSignatureParser::ReportError() { return true; }
+
+bool RootSignatureParser::Parse() {
+ CurTok--; // Decrement once here so we can use the ...ExpectedToken api
----------------
V-FEXrt wrote:
This is UB right? You are decrementing the `CurTok` out of its actual bounds
https://github.com/llvm/llvm-project/pull/122982
More information about the llvm-branch-commits
mailing list