[cfe-dev] Impending initialization rewrite
Douglas Gregor
dgregor at apple.com
Fri Dec 4 16:57:25 PST 2009
On Nov 30, 2009, at 7:01 AM, Douglas Gregor wrote:
> Over the next few days, I plan to rewrite much of the semantic
> analysis for initialization to clean up a variety of problems that
> have surfaced over the past few months.
This turns out to be a huge task. I'm attaching a completely-untested
version of what I'd like to do, in case anyone wants to discuss the
approach. Essentially, we're trying to capture everything in an
InitializationSequence, whose initialization corresponds to
initialization (har har) that can then be diagnosed (to emit any
delayed diagnostics) or performed (to produce a complete initializer
AST). If you've ever looked at ImplicitConversionSequence, it's like
that... but provides much more information when there is a failure, is
better encapsulated, and will subsume more of the initialization rules.
My plan is to switch one simple client of reference-initialization
(AddInitializerToDecl when the VarDecl is a reference) over to this
initialization logic and write tests to exercise all of the new code
paths, tweak the diagnostics until I'm happy, etc. Then, I'll move all
of the CheckReferenceInit callers over to this scheme, and so on.
- Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: initialization-rewrite-checkpoint-2.patch
Type: application/octet-stream
Size: 80541 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091204/86591b40/attachment.obj>
More information about the cfe-dev
mailing list