[LLVMdev] [RFC] The coding standard for "struct" should be relaxed or removed

Reid Kleckner rnk at google.com
Sat Mar 1 23:46:57 PST 2014


On Sat, Mar 1, 2014 at 10:33 PM, Chris Lattner <clattner at apple.com> wrote:
>
> This rule was specifically about brokenness with some version of MSVC.
>  That version (I have no idea which, or if it still does that) mangled
> classes and structs differently.  If this isn't the case for the currently
> supported version of MSVC, we should definitely remove this guideline.
>

MSVC still mangles the tag into the type, making the manglings for class
and struct differ.  We even have code for this in MicrosoftMangle.cpp.  The
consequence is that you have to use the right tag when you forward declare
something, which we can spot with -Wmismatched-tags.  I don't think this is
a very big deal, and we can probably remove the rule.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140301/35f8024e/attachment.html>


More information about the llvm-dev mailing list