[cfe-commits] [PATCH][MS][Review request] - Late Microsoft template parsing

Francois Pichet pichet2000 at gmail.com
Wed Mar 16 06:41:40 PDT 2011

On Tue, Mar 15, 2011 at 2:54 PM,  <dawn at burble.org> wrote:
> On Tue, Mar 15, 2011 at 12:29:19AM -0400, Francois Pichet wrote:
>> >>>> I haven't looked at the patch yet, but this defintely needs to be enabled
>> >>>> by its own -cc1 language option;  that option should then be enabled by
>> >>>> windows targets, rather than tying this to -fms-extensions.
> Why tie it to windows targets?  We would use it on all platforms.
>> >>> Yes. -fdelayed-template-parsing seems a good name.
> Sounds good.  Shouldn't that be enough to control the feature, so that
> the target doen't matter?

What I did in the patch is:
+  Opts.DelayedTemplateParsing = Args.hasArg(OPT_fdelayed_template_parsing) ||
+                                                  Opts.Microsoft;

The rational is that :
   1. Delayed template parsing should always be enabled if
-fms-extensions is present.
   2. To give an option to enable delayed template parsing without
microsoft extensions.
   3. Don't force delayed template parsing on Windows if
-fms-extensions is not there (some people will want strict template
support on Windows)

PS: virtually all the remaining errors when parsing Microsof C++
template headers with clang are missing "typename". A problem I plan
to fix in later patch.

More information about the cfe-commits mailing list