summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Checker')
-rw-r--r--clang/lib/Checker/CheckSecuritySyntaxOnly.cpp12
-rw-r--r--clang/lib/Checker/GRExprEngine.cpp4
-rw-r--r--clang/lib/Checker/StackAddrLeakChecker.cpp2
-rw-r--r--clang/lib/Checker/StreamChecker.cpp32
4 files changed, 25 insertions, 25 deletions
diff --git a/clang/lib/Checker/CheckSecuritySyntaxOnly.cpp b/clang/lib/Checker/CheckSecuritySyntaxOnly.cpp
index 9dfe512dc3b..4dc3afe70e6 100644
--- a/clang/lib/Checker/CheckSecuritySyntaxOnly.cpp
+++ b/clang/lib/Checker/CheckSecuritySyntaxOnly.cpp
@@ -41,8 +41,8 @@ class WalkAST : public StmtVisitor<WalkAST> {
public:
WalkAST(BugReporter &br) : BR(br),
- II_gets(0), II_getpw(0), II_mktemp(0),
- II_rand(), II_random(0), II_setid(),
+ II_gets(0), II_getpw(0), II_mktemp(0),
+ II_rand(), II_random(0), II_setid(),
CheckRand(isArc4RandomAvailable(BR.getContext())) {}
// Statement visitor methods.
@@ -332,10 +332,10 @@ void WalkAST::CheckCall_mktemp(const CallExpr *CE, const FunctionDecl *FD) {
// Issue a waring.
SourceRange R = CE->getCallee()->getSourceRange();
BR.EmitBasicReport("Potential insecure temporary file in call 'mktemp'",
- "Security",
- "Call to function 'mktemp' is insecure as it always "
- "creates or uses insecure temporary file. Use 'mkstemp' instead",
- CE->getLocStart(), &R, 1);
+ "Security",
+ "Call to function 'mktemp' is insecure as it always "
+ "creates or uses insecure temporary file. Use 'mkstemp' instead",
+ CE->getLocStart(), &R, 1);
}
//===----------------------------------------------------------------------===//
diff --git a/clang/lib/Checker/GRExprEngine.cpp b/clang/lib/Checker/GRExprEngine.cpp
index e306ac6667e..980d83cdab7 100644
--- a/clang/lib/Checker/GRExprEngine.cpp
+++ b/clang/lib/Checker/GRExprEngine.cpp
@@ -3000,9 +3000,9 @@ void GRExprEngine::VisitUnaryOperator(const UnaryOperator* U,
ExplodedNodeSet Tmp;
if (asLValue)
- VisitLValue(Ex, Pred, Tmp);
+ VisitLValue(Ex, Pred, Tmp);
else
- Visit(Ex, Pred, Tmp);
+ Visit(Ex, Pred, Tmp);
for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
const GRState* state = GetState(*I);
diff --git a/clang/lib/Checker/StackAddrLeakChecker.cpp b/clang/lib/Checker/StackAddrLeakChecker.cpp
index f4a9db62df4..c67a81dced0 100644
--- a/clang/lib/Checker/StackAddrLeakChecker.cpp
+++ b/clang/lib/Checker/StackAddrLeakChecker.cpp
@@ -108,7 +108,7 @@ void StackAddrLeakChecker::EmitStackError(CheckerContext &C, const MemRegion *R,
report->addRange(range);
C.EmitReport(report);
-}
+}
void StackAddrLeakChecker::PreVisitReturnStmt(CheckerContext &C,
const ReturnStmt *RS) {
diff --git a/clang/lib/Checker/StreamChecker.cpp b/clang/lib/Checker/StreamChecker.cpp
index b18ab2908c5..87874e315a5 100644
--- a/clang/lib/Checker/StreamChecker.cpp
+++ b/clang/lib/Checker/StreamChecker.cpp
@@ -367,8 +367,8 @@ const GRState *StreamChecker::CheckNullStream(SVal SV, const GRState *state,
}
const GRState *StreamChecker::CheckDoubleClose(const CallExpr *CE,
- const GRState *state,
- CheckerContext &C) {
+ const GRState *state,
+ CheckerContext &C) {
SymbolRef Sym = state->getSVal(CE->getArg(0)).getAsSymbol();
assert(Sym);
@@ -384,11 +384,11 @@ const GRState *StreamChecker::CheckDoubleClose(const CallExpr *CE,
ExplodedNode *N = C.GenerateSink();
if (N) {
if (!BT_doubleclose)
- BT_doubleclose = new BuiltinBug("Double fclose",
- "Try to close a file Descriptor already"
- " closed. Cause undefined behaviour.");
+ BT_doubleclose = new BuiltinBug("Double fclose",
+ "Try to close a file Descriptor already"
+ " closed. Cause undefined behaviour.");
BugReport *R = new BugReport(*BT_doubleclose,
- BT_doubleclose->getDescription(), N);
+ BT_doubleclose->getDescription(), N);
C.EmitReport(R);
}
return NULL;
@@ -400,7 +400,7 @@ const GRState *StreamChecker::CheckDoubleClose(const CallExpr *CE,
void StreamChecker::EvalDeadSymbols(CheckerContext &C,SymbolReaper &SymReaper) {
for (SymbolReaper::dead_iterator I = SymReaper.dead_begin(),
- E = SymReaper.dead_end(); I != E; ++I) {
+ E = SymReaper.dead_end(); I != E; ++I) {
SymbolRef Sym = *I;
const GRState *state = C.getState();
const StreamState *SS = state->get<StreamState>(Sym);
@@ -410,19 +410,19 @@ void StreamChecker::EvalDeadSymbols(CheckerContext &C,SymbolReaper &SymReaper) {
if (SS->isOpened()) {
ExplodedNode *N = C.GenerateSink();
if (N) {
- if (!BT_ResourceLeak)
- BT_ResourceLeak = new BuiltinBug("Resource Leak",
- "Opened File never closed. Potential Resource leak.");
- BugReport *R = new BugReport(*BT_ResourceLeak,
- BT_ResourceLeak->getDescription(), N);
- C.EmitReport(R);
+ if (!BT_ResourceLeak)
+ BT_ResourceLeak = new BuiltinBug("Resource Leak",
+ "Opened File never closed. Potential Resource leak.");
+ BugReport *R = new BugReport(*BT_ResourceLeak,
+ BT_ResourceLeak->getDescription(), N);
+ C.EmitReport(R);
}
}
}
}
void StreamChecker::EvalEndPath(GREndPathNodeBuilder &B, void *tag,
- GRExprEngine &Eng) {
+ GRExprEngine &Eng) {
SaveAndRestore<bool> OldHasGen(B.HasGeneratedNode);
const GRState *state = B.getState();
typedef llvm::ImmutableMap<SymbolRef, StreamState> SymMap;
@@ -435,9 +435,9 @@ void StreamChecker::EvalEndPath(GREndPathNodeBuilder &B, void *tag,
if (N) {
if (!BT_ResourceLeak)
BT_ResourceLeak = new BuiltinBug("Resource Leak",
- "Opened File never closed. Potential Resource leak.");
+ "Opened File never closed. Potential Resource leak.");
BugReport *R = new BugReport(*BT_ResourceLeak,
- BT_ResourceLeak->getDescription(), N);
+ BT_ResourceLeak->getDescription(), N);
Eng.getBugReporter().EmitReport(R);
}
}
OpenPOWER on IntegriCloud