================
@@ -1273,6 +1273,168 @@ void 
Sema::AddImplicitMSFunctionNoBuiltinAttr(FunctionDecl *FD) {
     FD->addAttr(NoBuiltinAttr::CreateImplicit(Context, V.data(), V.size()));
 }
 
+static bool typeListMatches(FunctionDecl *FD,
+                            const clang::Sema::SymbolLabel &Label) {
+  assert(Label.TypeList.has_value());
+  if (FD->getNumParams() != Label.TypeList->size()) {
+    return false;
+  }
+
+  // Check if arguments match.
+  for (unsigned i = 0; i != FD->getNumParams(); ++i) {
+    const ParmVarDecl *PVD = FD->getParamDecl(i);
+    QualType ParmType = PVD->getOriginalType().getCanonicalType();
----------------
perry-ca wrote:

Good catch.  This code does work for a case like:
```
void func(int []);
#pragma export(func(int[]))
```
but not for:
```
void func(int []);
#pragma export(func(int*))
```
(or vice versa)

The later case should work.  I'll add code to use `getType()` and then to decay 
the types.

https://github.com/llvm/llvm-project/pull/111035
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to