[clang] [llvm] [FMV][AIX] Implement target_clones part 2 (target-features) (PR #206786)

Wael Yehia via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 18:55:16 PDT 2026


================
@@ -633,6 +633,10 @@ bool SemaPPC::checkTargetClonesAttr(const SmallVectorImpl<StringRef> &Params,
       const SourceLocation &CurLoc =
           Loc.getLocWithOffset(LHS.data() - Param.data());
 
+      if (LHS.empty())
+        return Diag(CurLoc, diag::warn_unsupported_target_attribute)
+               << Unsupported << None << "" << TargetClones;
+
----------------
w2yehia wrote:

it's tested in `./clang/test/Sema/PowerPC/attr-target-clones.c`:
```
     48 // expected-warning at +1 {{unsupported '' in the 'target_clones' attribute string;}}
     49 void __attribute__((target_clones(",default")))
     50 empty_target_2(void);
```

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


More information about the cfe-commits mailing list