зеркало из https://github.com/microsoft/clang-1.git
[analyzer] Move DefaultBool so that all checkers can share it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174782 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
722cd9e3c0
Коммит
adecec3948
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче