[clang] [clang][FMV][AArch64] Improve streaming mode compatibility. (PR #100181)
Sander de Smalen via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 24 09:57:59 PDT 2024
================
@@ -3183,6 +3183,25 @@ class ASTContext : public RefCountedBase<ASTContext> {
const FunctionDecl *FD,
llvm::function_ref<void(FunctionDecl *)> Pred) const;
+ bool areFMVCompatible(const FunctionDecl *FD1,
+ const FunctionDecl *FD2) const {
+ if (!hasSameType(FD1->getReturnType(), FD2->getReturnType()))
+ return false;
+
+ if (FD1->isVariadic() != FD2->isVariadic())
+ return false;
+
+ if (FD1->getNumParams() != FD2->getNumParams())
+ return false;
+
+ for (unsigned I = 0; I < FD1->getNumParams(); ++I)
+ if (!hasSameType(FD1->getParamDecl(I)->getOriginalType(),
+ FD2->getParamDecl(I)->getOriginalType()))
----------------
sdesmalen-arm wrote:
Is there a test (missing) for this condition?
https://github.com/llvm/llvm-project/pull/100181
More information about the cfe-commits
mailing list