[clang] [Clang][AMDGPU] Accept builtins in lambda declarations (PR #135027)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 9 07:30:38 PDT 2025


================
@@ -27,7 +27,7 @@ bool SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID,
   // position of memory order and scope arguments in the builtin
   unsigned OrderIndex, ScopeIndex;
 
-  const auto *FD = SemaRef.getCurFunctionDecl();
+  const auto *FD = SemaRef.getCurFunctionDecl(true);
----------------
shiltian wrote:

```suggestion
  const auto *FD = SemaRef.getCurFunctionDecl(/*AllowLambda=*/true);
```

https://github.com/llvm/llvm-project/pull/135027


More information about the cfe-commits mailing list