Re: [PATCH][modules][PR26237]

2016-02-24 Thread Vassil Vassilev via cfe-commits
On 24/02/16 23:03, Richard Smith wrote: On Wed, Feb 24, 2016 at 2:01 PM, Vassil Vassilev wrote: On 24/02/16 22:50, Richard Smith wrote: On Wed, Feb 24, 2016 at 8:10 AM, Vassil Vassilev wrote: On 24/02/16 02:05, Richard Smith wrote: Calling getMostRecentDecl seems like a slightly fragile way

Re: [PATCH][modules][PR26237]

2016-02-24 Thread Richard Smith via cfe-commits
On Wed, Feb 24, 2016 at 2:01 PM, Vassil Vassilev wrote: > On 24/02/16 22:50, Richard Smith wrote: >> >> On Wed, Feb 24, 2016 at 8:10 AM, Vassil Vassilev >> wrote: >>> >>> On 24/02/16 02:05, Richard Smith wrote: Calling getMostRecentDecl seems like a slightly fragile way to avoid it

Re: [PATCH][modules][PR26237]

2016-02-24 Thread Vassil Vassilev via cfe-commits
On 24/02/16 22:50, Richard Smith wrote: On Wed, Feb 24, 2016 at 8:10 AM, Vassil Vassilev wrote: On 24/02/16 02:05, Richard Smith wrote: Calling getMostRecentDecl seems like a slightly fragile way to avoid iterator invalidation here. Instead... @@ -214,6 +212,19 @@ namespace clang { u

Re: [PATCH][modules][PR26237]

2016-02-24 Thread Richard Smith via cfe-commits
On Wed, Feb 24, 2016 at 8:10 AM, Vassil Vassilev wrote: > > On 24/02/16 02:05, Richard Smith wrote: >> >> Calling getMostRecentDecl seems like a slightly fragile way to avoid >> iterator invalidation here. Instead... >> >> @@ -214,6 +212,19 @@ namespace clang { >> unsigned I = Record.size(

Re: [PATCH][modules][PR26237]

2016-02-24 Thread Vassil Vassilev via cfe-commits
On 24/02/16 02:05, Richard Smith wrote: Calling getMostRecentDecl seems like a slightly fragile way to avoid iterator invalidation here. Instead... @@ -214,6 +212,19 @@ namespace clang { unsigned I = Record.size(); Record.push_back(0); + auto &Specializations = Common->Spe

Re: [PATCH][modules][PR26237]

2016-02-23 Thread Richard Smith via cfe-commits
Calling getMostRecentDecl seems like a slightly fragile way to avoid iterator invalidation here. Instead... @@ -214,6 +212,19 @@ namespace clang { unsigned I = Record.size(); Record.push_back(0); + auto &Specializations = Common->Specializations; + auto &&PartialSpecializa

Re: [PATCH][modules][PR26237]

2016-02-22 Thread Vassil Vassilev via cfe-commits
ping... On 30/01/16 21:13, Vassil Vassilev wrote: On 30/01/16 18:36, David Blaikie wrote: On Sat, Jan 30, 2016 at 9:00 AM, Vassil Vassilev wrote: AFAICT the making a test case independent on STL is the hard part. I think it will be always failing due to the relocation of the me

Re: [PATCH][modules][PR26237]

2016-01-30 Thread Vassil Vassilev via cfe-commits
On 30/01/16 18:36, David Blaikie wrote: On Sat, Jan 30, 2016 at 9:00 AM, Vassil Vassilev mailto:v.g.vassi...@gmail.com>> wrote: AFAICT the making a test case independent on STL is the hard part. I think it will be always failing due to the relocation of the memory region of the u

Re: [PATCH][modules][PR26237]

2016-01-30 Thread David Blaikie via cfe-commits
On Sat, Jan 30, 2016 at 9:00 AM, Vassil Vassilev wrote: > AFAICT the making a test case independent on STL is the hard part. I think > it will be always failing due to the relocation of the memory region of the > underlying SmallVector. > Sorry, I think I didn't explain myself well. What I mean

Re: [PATCH][modules][PR26237]

2016-01-30 Thread Vassil Vassilev via cfe-commits
AFAICT the making a test case independent on STL is the hard part. I think it will be always failing due to the relocation of the memory region of the underlying SmallVector. On 30/01/16 17:37, David Blaikie wrote: Yeah, it's good to have a reproduction, but I wouldn't actually commit one - u

Re: [PATCH][modules][PR26237]

2016-01-30 Thread David Blaikie via cfe-commits
Yeah, it's good to have a reproduction, but I wouldn't actually commit one - unless you have a checked stl to test against that always fails on possibly-invalidating sequences of operations, then you'd have a fairly simple reproduction On Jan 30, 2016 8:23 AM, "Vassil Vassilev" wrote: > Sorry. >

Re: [PATCH][modules][PR26237]

2016-01-30 Thread Vassil Vassilev via cfe-commits
Sorry. Our module builds choke on merging several modules, containing declarations from STL (we are using libc++, no modulemaps). When writing a new module containing the definition of a STL reverse_iterator, it collects all its template specializations. Some of the specializations need to b

Re: [PATCH][modules][PR26237]

2016-01-30 Thread David Blaikie via cfe-commits
It might be handy to give an overview of the issue in the review (& certainly in the commit) message rather than only citing the bug number On Jan 30, 2016 6:49 AM, "Vassil Vassilev via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > Attaching a fix to https://llvm.org/bugs/show_bug.cgi?id=262

[PATCH][modules][PR26237]

2016-01-30 Thread Vassil Vassilev via cfe-commits
Attaching a fix to https://llvm.org/bugs/show_bug.cgi?id=26237 Please review. Many thanks! --Vassil From da6b27875042ee23afaf898f189e410f177311ad Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 30 Jan 2016 14:50:06 +0100 Subject: [PATCH] [modules] Writing out template specializations