[PATCH] D116020: [clang][#52782] Bail on incomplete parameter type in stdcall name mangling
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 4 14:28:13 PST 2022
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
More information about the cfe-commits
mailing list