Review Request 121779: Select language/standard for parsing from config file

Sergey Kalinichev kalinichev.so.0 at gmail.com
Sun Jan 18 13:00:18 UTC 2015



> On Jan. 16, 2015, 2:21 a.m., Kevin Funk wrote:
> > duchain/parsesession.cpp, line 58
> > <https://git.reviewboard.kde.org/r/121779/diff/2/?file=339286#file339286line58>
> >
> >     Doesn't this whole change in `argsForSession` mean that we'll now parse the full project in *either* C- or C++-mode? That's not what we want. We still want to decide the parse-mode based on the mime type.
> >     
> >     We should introduce language standard version settings *per language* (C/C++/ObjC(++)), instead of *per compiler*.

>Doesn't this whole change in argsForSession mean that we'll now parse the full project in either C- or C++-mode?

Yes.

> That's not what we want. We still want to decide the parse-mode based on the mime type.

I don't think it's such a good idea, because:
a) I've seen a couple of project that use *.c extensions for C++ files.
b) And what is more important. What about *.h ? It could be C or C++ header equally well. I see no way how to distinguish that.


>We should introduce language standard version settings per language (C/C++/ObjC(++)), instead of per compiler.

Even if want to do so, it should be implemented per <language, project> pair then. Also it deserves it's own review.

So I suggest to leave it as is, because:
1) It doesn't break anything. (It still works pretty well with c++ projects)
2) It adds ability to work with plain C projects (that's what currently missing).


- Sergey


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


On Jan. 9, 2015, 3:46 p.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121779/
> -----------------------------------------------------------
> 
> (Updated Jan. 9, 2015, 3:46 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> With this kdev-clang can parse C++ files even if the file extension is .c/.h. And vice-versa
> Also the language standard now is configurable.
> 
> Note: this review depends on https://git.reviewboard.kde.org/r/121777/
> 
> 
> Diffs
> -----
> 
>   clangparsejob.cpp 5c11abb 
>   duchain/clangparsingenvironment.h 97ea297 
>   duchain/clangparsingenvironment.cpp f73822f 
>   duchain/parsesession.cpp 8f3a43c 
> 
> Diff: https://git.reviewboard.kde.org/r/121779/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150118/f999310a/attachment-0001.html>


More information about the KDevelop-devel mailing list