[cfe-commits] [PATCH] CFG command line arguments for C++ features

Marcin Świderski marcin.sfider at gmail.com
Wed Sep 29 23:42:35 PDT 2010


Thanks for noticing this. I will fix this and commit if there are no other
issues.

W dniu 30 września 2010 08:25 użytkownik Zhongxing Xu <xuzhongxing at gmail.com
> napisał:

> Hi Marcin,
>
> Overall the patch looks good. But one problem:
>
> @@ -126,7 +130,8 @@
>                                                      idx::TranslationUnit
> *TU) {
>    AnalysisContext *&AC = Contexts[D];
>    if (!AC)
> -    AC = new AnalysisContext(D, TU, UseUnoptimizedCFG);
> +    AC = new AnalysisContext(D, TU, UseUnoptimizedCFG, AddImplicitDtors,
> +        AddInitializers);
>
> Notice that the fourth parameter is bool addehedges = false. We could set
> it to false for now. In the future we would add an option for it, too.
>
> You could spot this bug by actually running clang with the patch on a test
> case:
>
> $ clang -cc1 -analyze -cfg-view -cfg-add-implicit-dtors scope.cpp
>
> And see no effect with the new option.
>

I did test the patch some other way and it appeared to work properly.
Sometimes tests can be broken though...

>
> And for each patch, you can run 'make test' to ensure it does not break
> regression tests.
>
> Yes, I do it all the time.

>
> 2010/9/30 Marcin Świderski <marcin.sfider at gmail.com>
>
> Patch adds two new command line arguments:
>> -cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for
>> AnalysisCosumer to true
>> -cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for
>> AnalysisCosumer to true
>>
>> Please approve for commit.
>>
>> Marcin
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100930/87e0aefe/attachment.html>


More information about the cfe-commits mailing list