Review Request 117763: Make the clang plugin reuse Includes and Defines interface

Olivier Jean de Gaalon olivier.jg at gmail.com
Fri Apr 25 11:56:38 UTC 2014



> On April 25, 2014, 11:03 a.m., Olivier Jean de Gaalon wrote:
> > duchain/parsesession.cpp, line 122
> > <https://git.reviewboard.kde.org/r/117763/diff/2/?file=268184#file268184line122>
> >
> >     If I understand correctly, clang isn't able to use multiple pch files directly, only through chaining (ie file1.pch is created using file2.pch...). I'm not sure what the effect of using multiple -include args will be, IIRC it just ignores them.
> >     
> >     In any case, this won't work for kdev-clang as anything coming from the pch won't exist in the resulting ast and thus won't be duchainified.
> >     
> >     In summary, I believe the pchInclude path should be the only -include argument, and that it should originally be derived from the IDI you wrote instead of .kdev_pch_include as is currently the case.
> >     
> >     I understand this is problematic from a UI perspective at least, but IMO it's not immediately clear to the user that it's even possible to add a pch using the IDI gui currently. I realize that oldcpp can handle multiple pch just fine, but I wonder if the pch shouldn't be a single separate entry.
> 
> Sergey Kalinichev wrote:
>     I'm a little bit confused of what you're talking about...
>     
>     Currently I'm trying to handle "automatic include" feature: http://bugs.kde.org/show_bug.cgi?id=315705
>     
>     >I'm not sure what the effect of using multiple -include args will be, IIRC it just ignores them.
>     
>     I've just tested it, works for me...
>     
>     >In any case, this won't work for kdev-clang as anything coming from the pch won't exist in the resulting ast and thus won't be duchainified.
>     
>     Yep, I've noticed that, but at least kdev-clang doesn't complain anymore about using undeclared identifiers...

Ok, I see that -include is an "overloaded" argument. http://clang.llvm.org/docs/UsersManual.html#using-a-pch-file
So in the non-pch use case, this makes sense.

I'm a little surprised that it still doesn't include the contents of included files in the ast if it doesn't come from a pch... perhaps it's generating a temporary pch (hopefully this wouldn't interfere with a pch -include).


- Olivier Jean de


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117763/#review56512
-----------------------------------------------------------


On April 25, 2014, 10:35 a.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117763/
> -----------------------------------------------------------
> 
> (Updated April 25, 2014, 10:35 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> Make the clang plugin reuse Includes and Defines interface
> 
> 
> Diffs
> -----
> 
>   clangparsejob.cpp d940015 
>   duchain/parsesession.cpp f0ee15a 
> 
> Diff: https://git.reviewboard.kde.org/r/117763/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140425/8a63b6e3/attachment.html>


More information about the KDevelop-devel mailing list