summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-04-08 21:54:13 +0000
committerTed Kremenek <kremenek@apple.com>2010-04-08 21:54:13 +0000
commit769b06cba337c576594fed5d7408738498593337 (patch)
treeeca7ed54f33eda564a2f88d48dba5fb16f8b52d0 /clang/lib
parent80c345927e8565e4c9da0850127c9c18f1e81b61 (diff)
downloadbcm5719-llvm-769b06cba337c576594fed5d7408738498593337.tar.gz
bcm5719-llvm-769b06cba337c576594fed5d7408738498593337.zip
Temporarily only enable 'open' check on Mac OS X to unbreak Windows buildbot. I'm
looking into an alternate fix right now. llvm-svn: 100816
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Checker/UnixAPIChecker.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Checker/UnixAPIChecker.cpp b/clang/lib/Checker/UnixAPIChecker.cpp
index 0c9a45f06f0..213e7980053 100644
--- a/clang/lib/Checker/UnixAPIChecker.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud