[clang] [HLSL] Forward arguments in BuiltinTypeMethodBuilder::callBuiltin. NFC (PR #117789)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 26 14:23:28 PST 2024
================
@@ -502,7 +520,10 @@ struct BuiltinTypeMethodBuilder {
HLSLParamModifierAttr::Spelling Modifier =
HLSLParamModifierAttr::Keyword_in) {
assert(Method == nullptr && "Cannot add param, method already created");
- llvm_unreachable("not yet implemented");
+ const IdentifierInfo &II = DeclBuilder.SemaRef.getASTContext().Idents.get(
+ Name, tok::TokenKind::identifier);
+ Params.emplace_back(II, Ty, Modifier);
+ return *this;
----------------
bogner wrote:
Neither can the other parts of this class that deal with parameters, such as when we introduce the types. That other code is also more complicated than simply filling a container, so I think leaving this as a hard crash feels kind of silly. I can of course introduce it in the follow up that actually forwards parameters if you feel strongly.
https://github.com/llvm/llvm-project/pull/117789
More information about the cfe-commits
mailing list