[clang] [clang][AMDGPU] Clean-up handling of named barrier type (PR #207687)
Pierre van Houtryve via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 9 01:58:20 PDT 2026
================
@@ -1062,4 +1062,84 @@ bool DiagnoseUnguardedBuiltins::VisitCallExpr(CallExpr *CE) {
void SemaAMDGPU::DiagnoseUnguardedBuiltinUsage(FunctionDecl *FD) {
DiagnoseUnguardedBuiltins(SemaRef).IssueDiagnostics(FD->getBody());
}
+
+static FieldDecl *getNamedBarrierField(const RecordDecl *R) {
+ for (FieldDecl *FD : R->fields()) {
+ QualType FDTy = FD->getType();
+ if (FDTy->isAMDGPUNamedBarrierTypeOrWrapper())
+ return FD;
+ }
+
+ return nullptr;
+}
+
+void SemaAMDGPU::checkNamedBarrierWrapper(RecordDecl *R) {
+ if (R->isInvalidDecl())
----------------
Pierre-vh wrote:
Should this be restricted to AMDGPU targets only ? Otherwise it runs on all class declarations.
What's the easiest way to check if we have any AMDGPU target feature available on the target/aux target?
https://github.com/llvm/llvm-project/pull/207687
More information about the cfe-commits
mailing list