r241140 - -frewrite-includes: Rework how includes and modules are differentiated
David Blaikie
dblaikie at gmail.com
Wed Jul 1 10:35:38 PDT 2015
On Wed, Jul 1, 2015 at 12:21 AM, Justin Bogner <mail at justinbogner.com>
wrote:
> David Blaikie <dblaikie at gmail.com> writes:
> > On Tue, Jun 30, 2015 at 9:40 PM, Justin Bogner <mail at justinbogner.com>
> wrote:
> >
> > Author: bogner
> > Date: Tue Jun 30 23:40:10 2015
> > New Revision: 241140
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=241140&view=rev
> > Log:
> > -frewrite-includes: Rework how includes and modules are
> differentiated
> >
> > The map of FileChange structs here was storing two disjoint types of
> > information:
> >
> > 1. A pointer to the Module that an #include directive implicitly
> > imported
> >
> > 2. A FileID and FileType for an included file. These would be left
> > uninitialized in the Module case.
> >
> > This change splits these two kinds of information into their own
> maps,
> > which both simplifies how we access either and avoids the undefined
> > behaviour we were hitting due to the uninitialized fields in the
> > included file case.
> >
> > Mostly NFC, but fixes some errors found by self-host with ubsan.
> >
> > Ideally it'd be nice to have those test cases reduced and committed, so
> they
> > can be found/verified/etc without a full selfhost build later on.
>
> I worded this poorly - the errors were in the test suite (in
> Frontend/rewrite-includes-missing.c) when running check-clang with a
> self-hosted clang with ubsan enabled.
>
Ah, so an UBSan bot/anyone developing with UBSan enabled would've caught
this - sounds good. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150701/3a3cd2b6/attachment.html>
More information about the cfe-commits
mailing list