[PATCH] D62975: Require stdcall etc parameters to be complete on ODR use
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 6 12:53:46 PDT 2019
rnk created this revision.
rnk added reviewers: thakis, rsmith, hans.
Herald added a project: clang.
Functions using stdcall, fastcall, or vectorcall with C linkage mangle
in the size of the parameter pack. Calculating the size of the pack
requires the parameter types to complete, which may require template
instantiation.
Previously, we would crash during IRgen when requesting the size of
incomplete or uninstantiated types, as in this reduced example:
struct Foo;
void __fastcall bar(struct Foo o);
void (__fastcall *fp)(struct Foo) = &bar;
Reported in Chromium here: https://crbug.com/971245
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62975
Files:
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaExpr.cpp
clang/test/SemaCXX/calling-conv-complete-params.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62975.203423.patch
Type: text/x-patch
Size: 5767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190606/42da39bd/attachment.bin>
More information about the cfe-commits
mailing list