[clang] [Clang] Use valid source loc for empty target_clones diagnostic (PR #173747)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 1 08:48:16 PST 2026


================
@@ -38,9 +38,10 @@ class SemaX86 : public SemaBase {
   void handleAnyInterruptAttr(Decl *D, const ParsedAttr &AL);
   void handleForceAlignArgPointerAttr(Decl *D, const ParsedAttr &AL);
 
-  bool checkTargetClonesAttr(SmallVectorImpl<StringRef> &Params,
-                             SmallVectorImpl<SourceLocation> &Locs,
-                             SmallVectorImpl<SmallString<64>> &NewParams);
+  bool checkTargetClonesAttr(const SmallVectorImpl<StringRef> &Params,
+                             const SmallVectorImpl<SourceLocation> &Locs,
+                             SmallVectorImpl<SmallString<64>> &NewParams,
+                             const SourceLocation &AttrLoc);
----------------
Sirraide wrote:

`SourceLocation`s should be passed by value

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


More information about the cfe-commits mailing list