[clang] [HLSL] Forward arguments in BuiltinTypeMethodBuilder::callBuiltin. NFC (PR #117789)
Tex Riddell via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 26 14:15:04 PST 2024
================
@@ -564,9 +585,9 @@ struct BuiltinTypeMethodBuilder {
OK_Ordinary);
}
- BuiltinTypeMethodBuilder &
- callBuiltin(StringRef BuiltinName, ArrayRef<Expr *> CallParms,
- bool AddResourceHandleAsFirstArg = true) {
+ template <typename... Ts>
+ BuiltinTypeMethodBuilder &callBuiltin(StringRef BuiltinName, Ts... ArgSpecs) {
+ SmallVector<Expr *> Args{convertPlaceholder(std::forward<Ts>(ArgSpecs))...};
----------------
tex3d wrote:
Yes, `SmallVector` will have stack allocated storage. Its size is derived from the initialization, which is dependent on the number of ArgSpecs.
https://github.com/llvm/llvm-project/pull/117789
More information about the cfe-commits
mailing list