diff options
| author | Juan Manuel Martinez Caamaño <jmartinezcaamao@gmail.com> | 2025-11-21 10:14:20 +0100 |
|---|---|---|
| committer | Juan Manuel Martinez Caamaño <jmartinezcaamao@gmail.com> | 2025-11-21 10:14:20 +0100 |
| commit | 011550bafcb51a39ee23b036c0b6d8707beb3f42 (patch) | |
| tree | acf6b8018567312ee5c6541468c5a7cc819f7be1 | |
| parent | 4479e246311be1b1175e9e95a2e00a9930d424fb (diff) | |
[Review] Drop the caller is device conditionusers/jmmartinez/fix/load_lds_typesignature/1
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 6e6f4594e974..c325f0b230d0 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -6728,16 +6728,13 @@ ExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, checkDirectCallValidity(*this, Fn, FD, ArgExprs); - // If this expression is a call to a builtin function in HIP device + // If this expression is a call to a builtin function in HIP // compilation, allow a pointer-type argument to default address space to be // passed as a pointer-type parameter to a non-default address space. // If Arg is declared in the default address space and Param is declared // in a non-default address space, perform an implicit address space cast to // the parameter type. - FunctionDecl *Caller = getCurFunctionDecl(/*AllowLambda =*/true); - bool CallerIsDevice = Caller && (Caller->hasAttr<CUDAGlobalAttr>() || - Caller->hasAttr<CUDADeviceAttr>()); - if (getLangOpts().HIP && CallerIsDevice && FD && FD->getBuiltinID()) { + if (getLangOpts().HIP && FD && FD->getBuiltinID()) { for (unsigned Idx = 0; Idx < ArgExprs.size() && Idx < FD->param_size(); ++Idx) { ParmVarDecl *Param = FD->getParamDecl(Idx); |
