================
@@ -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@+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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits