[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:20:05 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))...};
----------------
bogner wrote:
This raises a good point though - I'll change this to just use `std::array` here since we know the exact size at compile time.
https://github.com/llvm/llvm-project/pull/117789
More information about the cfe-commits
mailing list