diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-04-08 21:54:13 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-04-08 21:54:13 +0000 |
commit | 5d07401587ca9ccde3ad32f02197097549bda7b6 (patch) | |
tree | 3be63314d51252097b48cb96d4b63be95bdff53e /lib/Checker/UnixAPIChecker.cpp | |
parent | cb821d045f5e445384f34d05a526955036073c4a (diff) |
Temporarily only enable 'open' check on Mac OS X to unbreak Windows buildbot. I'm
looking into an alternate fix right now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100816 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/UnixAPIChecker.cpp')
-rw-r--r-- | lib/Checker/UnixAPIChecker.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Checker/UnixAPIChecker.cpp b/lib/Checker/UnixAPIChecker.cpp index 0c9a45f06f..213e798005 100644 --- a/lib/Checker/UnixAPIChecker.cpp +++ b/lib/Checker/UnixAPIChecker.cpp @@ -15,9 +15,13 @@ #include "GRExprEngineInternalChecks.h" #include "clang/Checker/PathSensitive/CheckerVisitor.h" #include "clang/Checker/BugReporter/BugType.h" +#include "clang/Analysis/Support/Optional.h" #include "llvm/ADT/StringSwitch.h" #include <fcntl.h> +#include "clang/Basic/TargetInfo.h" + + using namespace clang; namespace { @@ -57,6 +61,9 @@ static inline void LazyInitialize(BugType *&BT, const char *name) { //===----------------------------------------------------------------------===// static void CheckOpen(CheckerContext &C, const CallExpr *CE, BugType *&BT) { + if (C.getASTContext().Target.getTriple().getVendor() != llvm::Triple::Apple) + return; + LazyInitialize(BT, "Improper use of 'open'"); // Look at the 'oflags' argument for the O_CREAT flag. |