[PATCH] D16628: clang-cl: support __cdecl-on-struct anachronism
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 27 08:50:48 PST 2016
rnk added inline comments.
================
Comment at: lib/Parse/ParseDeclCXX.cpp:1108-1110
@@ -1106,1 +1107,5 @@
+ case tok::kw___cdecl: // struct foo {...} __cdecl x; // C4229
+ if (!getLangOpts().MicrosoftExt)
+ break;
+ // fall through
// Type qualifiers
----------------
I think this would be clearer as:
// We will diagnose __cdecl on non-function declarations later, so claim that is valid
// after a type specifier.
return getLangOpts().MicrosoftExt;
Unpacking what the fallthrough does is a little tricky.
http://reviews.llvm.org/D16628
More information about the cfe-commits
mailing list