[cfe-commits] r100816 - /cfe/trunk/lib/Checker/UnixAPIChecker.cpp
Ted Kremenek
kremenek at apple.com
Thu Apr 8 14:54:13 PDT 2010
Author: kremenek
Date: Thu Apr 8 16:54:13 2010
New Revision: 100816
URL: http://llvm.org/viewvc/llvm-project?rev=100816&view=rev
Log:
Temporarily only enable 'open' check on Mac OS X to unbreak Windows buildbot. I'm
looking into an alternate fix right now.
Modified:
cfe/trunk/lib/Checker/UnixAPIChecker.cpp
Modified: cfe/trunk/lib/Checker/UnixAPIChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/UnixAPIChecker.cpp?rev=100816&r1=100815&r2=100816&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/UnixAPIChecker.cpp (original)
+++ cfe/trunk/lib/Checker/UnixAPIChecker.cpp Thu Apr 8 16:54:13 2010
@@ -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 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.
More information about the cfe-commits
mailing list