Review Request 123519: lazy check if function like

Zhang HuiJie yitianbuji at gmail.com
Wed May 6 02:27:02 UTC 2015



> On 五月 6, 2015, 3:19 a.m., Milian Wolff wrote:
> > languages/cpp/cpplanguagesupport.cpp, line 828
> > <https://git.reviewboard.kde.org/r/123519/diff/1/?file=363290#file363290line828>
> >
> >     where does the second->function_like come from? shouldn't that be fixed instead? or, alternatively, can it be removed now?

The new one is tring to solve this problem:

//here we define A as a function like macro, and it will labeled as "function_like" in the preprocessing stage.
//the flag "function_like" will be used in following preprocessing and special language support stage.

#define A() function_body;

//Then we define B as alias of A, but it will not be labeled as "function_like".
//What's more, if we want to mark it as it is, we will have to look through the enviroments. 
//And there are so many macros to check,  it is realy hurt. So i prefer to not check when preprocess.

#define B A;

//Now, call B;
//With isFunctionLike, this patch do nothing when preprocess, it just check whether a macro is function like
//when we call specialLanguageObjectNavigationWidget, ie when the cursor over a macro. And there are
// only a few times that we want to have a look in one macro. So, it more better than fixed in preprocessing stage.

B();

//As to remove it, I will check it. If so, this patch should be drop then.


- Zhang


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


On 四月 27, 2015, 5:01 p.m., Zhang HuiJie wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123519/
> -----------------------------------------------------------
> 
> (Updated 四月 27, 2015, 5:01 p.m.)
> 
> 
> Review request for KDevelop and Kevin Funk.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> new implementation of checking if a macro function like, it just check while when we need.
> 
> 
> Diffs
> -----
> 
>   languages/cpp/cpplanguagesupport.h e1659ae 
>   languages/cpp/cpplanguagesupport.cpp a0f47b1 
> 
> Diff: https://git.reviewboard.kde.org/r/123519/diff/
> 
> 
> Testing
> -------
> 
> I had discard the previous implementation(https://git.reviewboard.kde.org/r/122975/) for huge cost, this one work well and no obvious cost :).
> 
> 
> Thanks,
> 
> Zhang HuiJie
> 
>

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


More information about the KDevelop-devel mailing list