[clang] [X86] Relax AVX ABI warning on internal functions (PR #157570)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 9 14:54:20 PDT 2025
================
@@ -1513,12 +1513,17 @@ static void initFeatureMaps(const ASTContext &Ctx,
static bool checkAVXParamFeature(DiagnosticsEngine &Diag,
SourceLocation CallLoc,
+ const FunctionDecl &Callee,
const llvm::StringMap<bool> &CallerMap,
const llvm::StringMap<bool> &CalleeMap,
QualType Ty, StringRef Feature,
bool IsArgument) {
bool CallerHasFeat = CallerMap.lookup(Feature);
bool CalleeHasFeat = CalleeMap.lookup(Feature);
+ // No explicit features and the function is internal, be permissive.
+ if (!CallerHasFeat && !CalleeHasFeat && !Callee.isExternallyVisible())
+ return false;
----------------
rjmccall wrote:
Can you explain why explicit features turn the warning back on?
Also, this seems like a generally-useful thing. Do we have similar warnings for other targets?
https://github.com/llvm/llvm-project/pull/157570
More information about the cfe-commits
mailing list