]> granicus.if.org Git - clang/commitdiff
[analyzer] Move DefaultBool so that all checkers can share it.
authorAnna Zaks <ganna@apple.com>
Fri, 8 Feb 2013 23:55:50 +0000 (23:55 +0000)
committerAnna Zaks <ganna@apple.com>
Fri, 8 Feb 2013 23:55:50 +0000 (23:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174782 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/Checker.h
include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp

index 82bac7dd070dbf5db87c90147536dacd07734443..305ae2579d2cd95c7f22a047e498ed4a49e4fc24 100644 (file)
@@ -471,6 +471,14 @@ struct ImplicitNullDerefEvent {
   BugReporter *BR;
 };
 
+/// \brief A helper class which wraps a boolean value set to false by default.
+struct DefaultBool {
+  bool val;
+  DefaultBool() : val(false) {}
+  operator bool() const { return val; }
+  DefaultBool &operator=(bool b) { val = b; return *this; }
+};
+
 } // end ento namespace
 
 } // end clang namespace
index 42e50abbbe2eb3b2ce0de4fc692ca2c44c1761d1..ce495c9754b0a69d28c279fc91229377699cd542 100644 (file)
@@ -303,14 +303,6 @@ private:
   }
 };
 
-/// \brief A helper class which wraps a boolean value set to false by default.
-struct DefaultBool {
-  bool Val;
-  DefaultBool() : Val(false) {}
-  operator bool() const { return Val; }
-  DefaultBool &operator=(bool b) { Val = b; return *this; }
-};
-
 } // end GR namespace
 
 } // end clang namespace
index 43f1eb7a548dd041cd6c35932a102f70625df446..7ef13ab5386594d7d355b47593d50572739ce19e 100644 (file)
@@ -36,13 +36,6 @@ static bool isArc4RandomAvailable(const ASTContext &Ctx) {
 }
 
 namespace {
-struct DefaultBool {
-  bool val;
-  DefaultBool() : val(false) {}
-  operator bool() const { return val; }
-  DefaultBool &operator=(bool b) { val = b; return *this; }
-};
-  
 struct ChecksFilter {
   DefaultBool check_gets;
   DefaultBool check_getpw;
index e41ecf4b650babc33196b03047ba06f45cb3d52a..6262cb8ef9ddea3e16708711a71097d5b0c1defc 100644 (file)
@@ -43,13 +43,6 @@ using namespace clang;
 using namespace ento;
 
 namespace {
-// TODO: move this somewhere?
-struct DefaultBool {
-  bool val;
-  DefaultBool() : val(false) {}
-  operator bool() const { return val; }
-  DefaultBool &operator=(bool b) { val = b; return *this; }
-};
 
 struct ChecksFilter {
   /// Check for missing invalidation method declarations.