[cfe-dev] fatal error while reparsing translation unit: file '/some/path/to/header' has been modified since the precompiled header '/tmp/preamble-8ae0ef.pch' was built

Dan Schmidt dcschmid at gmail.com
Mon Jun 23 09:48:52 PDT 2014


Awesome, thanks!

On Mon Jun 23 2014 at 12:46:29 PM, Ben Langmuir <blangmuir at apple.com> wrote:

> Hey Dan,
>
> Should be fixed in r211504.  I’ll try to get your test case added to the
> regression tests when I have some time.
>
> Thanks for the detailed report,
>
> Ben
>
> On Jun 20, 2014, at 5:55 PM, Ben Langmuir <blangmuir at apple.com> wrote:
>
>
> On Jun 20, 2014, at 4:39 PM, Dan Schmidt <dcschmid at gmail.com> wrote:
>
> FYI, I've determined that the issue was introduced in r206309. I haven't
> looked into it any further than that at this point, but thought I'd give an
> update in case anyone else was able to look into it.
>
>
> Thanks for bisecting!  This is probably something to do with the changes I
> made to how FileManagers are shared among the ASTUnit bits.  I’ll take a
> look.
>
> Ben
>
>
> -ds
>
> On Thu Jun 19 2014 at 7:18:12 AM, Dan Schmidt <dcschmid at gmail.com> wrote:
>
>> ping
>>
>> Has anyone else seen similar errors? Is this a bug in libclang?
>>
>> On Tue Jun 17 2014 at 10:48:04 AM, Manuel Klimek <klimek at google.com>
>> wrote:
>>
>>> +argyrios
>>>
>>> On Mon, Jun 16, 2014 at 2:07 PM, Dan Schmidt <dcschmid at gmail.com> wrote:
>>>
>>>> Hello clang devs,
>>>>
>>>> I use YouCompleteMe as a semantic completion engine for vim, which in
>>>> turn uses libclang to provide completions. By default, YCM uses the 3.4
>>>> version of libclang, and all works well. However, I recently updated it to
>>>> use the head version and now I'm seeing errors like that listed in the
>>>> subject. I've been able to create a minimal reproduction - see the attached
>>>> files.
>>>>
>>>> To execute run commands similar to the following:
>>>>
>>>>    - tar xvf clang_parse.tar.gz
>>>>    - cd clang_parse
>>>>    - mkdir obj
>>>>    - cd obj
>>>>    - cmake -D CMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -D
>>>>    PATH_TO_LLVM_ROOT=<path to llvm head install dir - should have include and
>>>>    lib under here> ../src/
>>>>    - make
>>>>    - ./parse_tu
>>>>
>>>> The basic test case is this:
>>>>
>>>>    - Write the small cpp and h files to disk.
>>>>    - Parse the translation unit - observe that the syntax error is
>>>>    reported
>>>>    - Immediately reparse the TU.
>>>>    - Update the header in memory and reparse - observe that the syntax
>>>>    error is gone.
>>>>    - Save the header to disk and reparse. Observe the "file
>>>>    '/tmp/header_file.h' has been modified since the precompiled header
>>>>    '/some/path/preamble-eb3c0c.pch' was built" error.
>>>>
>>>> Am I using these methods incorrectly, or is there a bug in clang? If
>>>> I'm using them incorrectly, what is the correct way to reparse a
>>>> translation unit that has changed?
>>>>
>>>> Thanks,
>>>> Dan
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> cfe-dev mailing list
>>>> cfe-dev at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>>>
>>>>
>>>  _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140623/d3e0f5b8/attachment.html>


More information about the cfe-dev mailing list