rnk added a comment.

> clang actually refuses taking the address of a stdcall function if it has an 
> incomplete type parameter:

I was going to say, I thought I remembered fixing this problem, and I guess 
that's how I fixed it: with errors.

MSVC doesn't add stdcall mangling suffixes to non-extern-C symbols, so we don't 
have this kind of issue in MSVC mode.

I think the change is reasonable as is.



================
Comment at: clang/test/CodeGen/pr52782-stdcall-func-decl.cpp:10
+class nsICanvasRenderingContextInternal {
+  NS_IMETHOD_(nsresult) InitializeWithDrawTarget(NotNull);
+} nsTBaseHashSet;
----------------
Please check for the declaration with the mangled name. In this case, we expect 
to see a `@0` suffix.

Also, the `NS_IMETHOD_` macro isn't necessary for the reduction, it can just be 
`void __stdcall InitializeWithDrawTarget(NotNull)`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116020/new/

https://reviews.llvm.org/D116020

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to