]> granicus.if.org Git - clang/commitdiff
Tweak AnalyzerOptions for consistency, and make sure default constructed object
authorDaniel Dunbar <daniel@zuster.org>
Thu, 12 Nov 2009 00:24:35 +0000 (00:24 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 12 Nov 2009 00:24:35 +0000 (00:24 +0000)
is sane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86908 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/AnalysisConsumer.h

index cb08ce22512820aa1eae3c0a13e3b344cfd256c0..d8fe9f33a9f3a7d67d91419e377d5e91ccf87809 100644 (file)
@@ -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 @@ enum AnalysisDiagClients {
 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