================
@@ -155,6 +163,41 @@ std::optional<RootConstants> 
RootSignatureParser::parseRootConstants() {
   return Constants;
 }
 
+std::optional<RootParam> RootSignatureParser::parseRootParam() {
+  assert((CurToken.TokKind == TokenKind::kw_CBV ||
+          CurToken.TokKind == TokenKind::kw_SRV ||
+          CurToken.TokKind == TokenKind::kw_UAV) &&
+         "Expects to only be invoked starting at given keyword");
+
+  TokenKind ParamKind = CurToken.TokKind;
+
+  if (consumeExpectedToken(TokenKind::pu_l_paren, diag::err_expected_after,
+                           CurToken.TokKind))
+    return std::nullopt;
+
+  RootParam Param;
+  switch (ParamKind) {
+  default:
----------------
alsepkow wrote:

nit: Is there a reason the default case comes first? Just looks weird to me. 
Also why do we need to add llvm_unreachable? The llvm coding standards say 
"-Wswitch " should be enabled. Do we disable it for some reason?

https://github.com/llvm/llvm-project/pull/140147
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to