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

Zhongxing Xu xuzhongxing at gmail.com
Wed Sep 29 23:25:37 PDT 2010


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.

And for each patch, you can run 'make test' to ensure it does not break
regression tests.


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/51a35a50/attachment.html>


More information about the cfe-commits mailing list