[clang] [HLSL] Forward arguments in BuiltinTypeMethodBuilder::callBuiltin. NFC (PR #117789)
Damyan Pepper via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 26 13:07:06 PST 2024
================
@@ -656,18 +670,20 @@ BuiltinTypeDeclBuilder::addSimpleTemplateParams(ArrayRef<StringRef> Names,
}
BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addIncrementCounterMethod() {
+ using PH = BuiltinTypeMethodBuilder::PlaceHolder;
return BuiltinTypeMethodBuilder(SemaRef, *this, "IncrementCounter",
SemaRef.getASTContext().UnsignedIntTy)
- .callBuiltin("__builtin_hlsl_buffer_update_counter",
- {getConstantIntExpr(1)})
+ .callBuiltin("__builtin_hlsl_buffer_update_counter", PH::Handle,
+ getConstantIntExpr(1))
----------------
damyanp wrote:
How evil would it be to add a `Expr *convertPlaceholder(int)` that does the `getConstantIntExpr` for you, so this could be written as: `.callBuiltin("__builtin_hlsl_buffer_update_conter", PH::Handle, 1)`?
https://github.com/llvm/llvm-project/pull/117789
More information about the cfe-commits
mailing list