[cfe-commits] r86908 - /cfe/trunk/include/clang/Frontend/AnalysisConsumer.h

Daniel Dunbar daniel at zuster.org
Wed Nov 11 16:24:36 PST 2009


Author: ddunbar
Date: Wed Nov 11 18:24:35 2009
New Revision: 86908

URL: http://llvm.org/viewvc/llvm-project?rev=86908&view=rev
Log:
Tweak AnalyzerOptions for consistency, and make sure default constructed object
is sane.

Modified:
    cfe/trunk/include/clang/Frontend/AnalysisConsumer.h

Modified: cfe/trunk/include/clang/Frontend/AnalysisConsumer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/AnalysisConsumer.h?rev=86908&r1=86907&r2=86908&view=diff

==============================================================================
--- cfe/trunk/include/clang/Frontend/AnalysisConsumer.h (original)
+++ cfe/trunk/include/clang/Frontend/AnalysisConsumer.h Wed Nov 11 18:24:35 2009
@@ -1,4 +1,4 @@
-//===--- AnalysisConsumer.h - Front-end hooks for the analysis engine------===//
+//===--- AnalysisConsumer.h - Front-end Analysis Engine Hooks ---*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -53,19 +53,31 @@
 NUM_ANALYSIS_DIAG_CLIENTS
 };
 
-struct AnalyzerOptions {
+class AnalyzerOptions {
+public:
   std::vector<Analyses> AnalysisList;
   AnalysisStores AnalysisStoreOpt;
   AnalysisConstraints AnalysisConstraintsOpt;
   AnalysisDiagClients AnalysisDiagOpt;
-  bool VisualizeEGDot;
-  bool VisualizeEGUbi;
-  bool AnalyzeAll;
-  bool AnalyzerDisplayProgress;
-  bool PurgeDead;
-  bool EagerlyAssume;
   std::string AnalyzeSpecificFunction;
-  bool TrimGraph;
+  unsigned AnalyzeAll : 1;
+  unsigned AnalyzerDisplayProgress : 1;
+  unsigned EagerlyAssume : 1;
+  unsigned PurgeDead : 1;
+  unsigned TrimGraph : 1;
+  unsigned VisualizeEGDot : 1;
+  unsigned VisualizeEGUbi : 1;
+
+public:
+  AnalyzerOptions() {
+    AnalyzeAll = 0;
+    AnalyzerDisplayProgress = 0;
+    EagerlyAssume = 0;
+    PurgeDead = 0;
+    TrimGraph = 0;
+    VisualizeEGDot = 0;
+    VisualizeEGUbi = 0;
+  }
 };
 
 /// CreateAnalysisConsumer - Creates an ASTConsumer to run various code





More information about the cfe-commits mailing list