<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
So the MSVCCompat part of the rename is landed, r199209.<br>
<br>
I'm holding back on the more intrusive MicrosoftExt part because I
think we've in fact already achieved the distinction we wanted:<br>
<br>
<code>LANGOPT(MSVCCompat , 1, 0, "Microsoft Visual C++ full
compatibility mode")</code><code><br>
</code><code>LANGOPT(MicrosoftExt , 1, 0, "Microsoft C++
extensions")</code><br>
<br>
Alp.<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 05/01/2014 05:20, Alp Toker wrote:<br>
</div>
<blockquote cite="mid:52C8EB97.1020405@nuanti.com" type="cite">On
04/01/2014 21:07, David Majnemer wrote:
<br>
<blockquote type="cite">It seems that I mixed up MicrosoftMode and
MicrosoftExt which lead to a discussion between Alp Toker, Aaron
Ballman, and myself.
<br>
<br>
We agreed that the current state of affairs is confusing and
should be remedied:
<br>
- MicrosoftExt will be renamed to MSVCExt (and will still be
controlled by -fms-extensions)
<br>
- MicrosoftMode will be renamed to MSVCCompat (and will still be
controlled by -fms-compatibility)
<br>
</blockquote>
<br>
Attached patch does the mechanical regex replace described above,
passed through clang-format.
<br>
<br>
The only manual changes are in LangOptions.def, where the
MSVC-related options are brought closer together with updated
descriptions:
<br>
<br>
LANGOPT(MSVCExt , 1, 0, "Microsoft extensions")
<br>
LANGOPT(MSVCCompat , 1, 0, "Microsoft Visual C++ quirks
mode")
<br>
<br>
<blockquote type="cite">
<br>
This makes it more clear what should happen with 'struct
type_info', it is a non-conforming extension and should be
controlled by MSVCCompat.
<br>
</blockquote>
<br>
It looks like there were plenty of others like type_info using the
wrong option. Needs an audit after the renaming.
<br>
<br>
Alp.
<br>
<br>
<br>
<br>
<blockquote type="cite">
<br>
<br>
<br>
On Sat, Jan 4, 2014 at 11:41 AM, Alp Toker <<a class="moz-txt-link-abbreviated" href="mailto:alp@nuanti.com">alp@nuanti.com</a>
<a class="moz-txt-link-rfc2396E" href="mailto:alp@nuanti.com"><mailto:alp@nuanti.com></a>> wrote:
<br>
<br>
<br>
On 04/01/2014 19:09, David Majnemer wrote:
<br>
<br>
Hi Alp,
<br>
<br>
I am working on RTTI support, a prerequisite for proper
EH.
<br>
<br>
I'm not sure why we would want to move it from
MicrosoftExt.
<br>
The way I see it, we have MicrosoftMode for conforming
<br>
extensions (__uuidof, etc.) and MicrosoftExt for
<br>
non-conforming extensions (extra qualification on member
<br>
functions, etc.). This seems like a non-conforming
extension
<br>
to me.
<br>
<br>
<br>
Thanks for the clarification David.
<br>
<br>
If it's the way you describe, that indicates a naming
problem --
<br>
in all the other clang language standards 'Ext' and 'Mode'
have
<br>
opposite semantics.
<br>
<br>
For example, C++11 mode is the native setting, whereas C++11
<br>
extensions is the default setting plus C++11 language
features as
<br>
extensions with backward compatibility.
<br>
<br>
Extensions enable features without changing the core
semantics,
<br>
whereas a "mode" is potentially a whole different
<br>
incompatible/vendor-specific language dialect.
<br>
<br>
In contrast, it appears that MicrosoftExt has become the
<br>
native/MSVC mode whereas MicrosoftMode is now being used as
a flag
<br>
to add Microsoft extensions usable in conforming code.
<br>
<br>
A quick grep shows they're used interchangeably, depending
on who
<br>
wrote the code.
<br>
<br>
In practice it looks like comments and variable names
already
<br>
refer to MicrosoftExt as "Microsoft mode"...
<br>
<br>
lib/Basic/Builtins.cpp: MSModeUnsupported =
<br>
!LangOpts.MicrosoftExt
<br>
<br>
... and refer to MicrosoftMode as "Microsoft extensions" ...
<br>
<br>
lib/Sema/SemaDecl.cpp: if
(getLangOpts().MicrosoftMode)
<br>
lib/Sema/SemaDecl.cpp- DiagID =
<br>
diag::ext_ms_forward_ref_enum;
<br>
<br>
Did we just discover a case of unchecked confusion? :-)
<br>
<br>
Alp.
<br>
<br>
<br>
<br>
<br>
On Saturday, January 4, 2014, Alp Toker wrote:
<br>
<br>
This is also a good starting point if anyone wants
to work
<br>
on MS
<br>
exception support.
<br>
<br>
However while making this change it occurred to me
that this
<br>
should be moved from MicrosoftExt to MicrosoftMode
--
<br>
thoughts?
<br>
<br>
Alp.
<br>
<br>
<br>
While making this change
<br>
On 04/01/2014 15:25, Alp Toker wrote:
<br>
<br>
Author: alp
<br>
Date: Sat Jan 4 09:25:02 2014
<br>
New Revision: 198497
<br>
<br>
URL:
<br>
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project?rev=198497&view=rev">http://llvm.org/viewvc/llvm-project?rev=198497&view=rev</a>
<br>
Log:
<br>
Move MS predefined type_info out of
<br>
InitializePredefinedMacros
<br>
<br>
Instead of keeping it in amongst the macros,
build the
<br>
declaration at Sema init
<br>
the same way we do with other predeclared and
builtin
<br>
types.
<br>
<br>
In practice this means the declaration is marked
<br>
implicit and
<br>
therefore won't
<br>
show up as an unwanted user-declared type in
tooling
<br>
which has
<br>
been a
<br>
frequently reported issue (though I haven't been
able
<br>
to cook
<br>
up a test).
<br>
<br>
Modified:
<br>
cfe/trunk/lib/Frontend/InitPreprocessor.cpp
<br>
cfe/trunk/lib/Sema/Sema.cpp
<br>
<br>
Modified:
cfe/trunk/lib/Frontend/InitPreprocessor.cpp
<br>
URL:
<br>
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=198497&r1=198496&r2=198497&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=198497&r1=198496&r2=198497&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp
(original)
<br>
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp
Sat Jan 4
<br>
09:25:02 2014
<br>
@@ -518,7 +518,6 @@ static void
<br>
InitializePredefinedMacros(c
<br>
if (LangOpts.CPlusPlus) {
<br>
// FIXME: Support Microsoft's
__identifier
<br>
extension
<br>
in the lexer.
<br>
Builder.append("#define __identifier(x)
x");
<br>
- Builder.append("class type_info;");
<br>
}
<br>
}
<br>
<br>
Modified: cfe/trunk/lib/Sema/Sema.cpp
<br>
URL:
<br>
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=198497&r1=198496&r2=198497&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=198497&r1=198496&r2=198497&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/Sema.cpp (original)
<br>
+++ cfe/trunk/lib/Sema/Sema.cpp Sat Jan 4
09:25:02 2014
<br>
@@ -178,6 +178,13 @@ void Sema::Initialize() {
<br>
PushOnScopeChains(Context.getObjCProtocolDecl(), TUScope);
<br>
}
<br>
+ // Initialize Microsoft "predefined C++
types".
<br>
+ if (PP.getLangOpts().MicrosoftExt &&
<br>
PP.getLangOpts().CPlusPlus) {
<br>
+ if
<br>
(IdResolver.begin(&Context.Idents.get("type_info"))
==
<br>
IdResolver.end())
<br>
+
PushOnScopeChains(Context.buildImplicitRecord("type_info",
<br>
TTK_Class),
<br>
+ TUScope);
<br>
+ }
<br>
+
<br>
// Initialize predefined OpenCL types.
<br>
if (PP.getLangOpts().OpenCL) {
<br>
addImplicitTypedef("image1d_t",
<br>
Context.OCLImage1dTy);
<br>
<br>
<br>
_______________________________________________
<br>
cfe-commits mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-rfc2396E" href="mailto:cfe-commits@cs.uiuc.edu"><mailto:cfe-commits@cs.uiuc.edu></a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a>
<br>
<br>
<br>
-- <a class="moz-txt-link-freetext" href="http://www.nuanti.com">http://www.nuanti.com</a>
<br>
the browser experts
<br>
<br>
_______________________________________________
<br>
cfe-commits mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-rfc2396E" href="mailto:cfe-commits@cs.uiuc.edu"><mailto:cfe-commits@cs.uiuc.edu></a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a>
<br>
<br>
<br>
-- <a class="moz-txt-link-freetext" href="http://www.nuanti.com">http://www.nuanti.com</a>
<br>
the browser experts
<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.nuanti.com">http://www.nuanti.com</a>
the browser experts
</pre>
</body>
</html>