@@ -50,11 +50,16 @@ class MemAccessChecker : public Checker<check::Location, check::Bind> {
5050public:
5151 void checkLocation (const SVal &Loc, bool IsLoad, const Stmt *S,
5252 CheckerContext &C) const {
53- emitErrorReport (C, Bug, " checkLocation: Loc = " + dumpToString (Loc) + " , Stmt = " + S->getStmtClassName ());
53+ emitErrorReport (C, Bug,
54+ " checkLocation: Loc = " + dumpToString (Loc) +
55+ " , Stmt = " + S->getStmtClassName ());
5456 }
5557
5658 void checkBind (SVal Loc, SVal Val, const Stmt *S, CheckerContext &C) const {
57- emitErrorReport (C, Bug, " checkBind: Loc = " + dumpToString (Loc) + " , Val = " + dumpToString (Val) + " , Stmt = " + S->getStmtClassName ());
59+ emitErrorReport (C, Bug,
60+ " checkBind: Loc = " + dumpToString (Loc) +
61+ " , Val = " + dumpToString (Val) +
62+ " , Stmt = " + S->getStmtClassName ());
5863 }
5964
6065private:
@@ -131,10 +136,13 @@ TEST(ExprEngineVisitTest, checkLocationAndBind) {
131136 )" ,
132137 Diags));
133138
134- std::string LocMsg = " checkLocation: Loc = lazyCompoundVal{0x0,MyClassRead}, Stmt = ImplicitCastExpr" ;
135- std::string BindMsg = " checkBind: Loc = &MyClassWrite, Val = lazyCompoundVal{0x0,MyClassRead}, Stmt = CXXOperatorCallExpr" ;
139+ std::string LocMsg = " checkLocation: Loc = lazyCompoundVal{0x0,MyClassRead}, "
140+ " Stmt = ImplicitCastExpr" ;
141+ std::string BindMsg =
142+ " checkBind: Loc = &MyClassWrite, Val = lazyCompoundVal{0x0,MyClassRead}, "
143+ " Stmt = CXXOperatorCallExpr" ;
136144 std::size_t LocPos = Diags.find (LocMsg);
137- std::size_t BindPos = Diags.find (BindMsg);
145+ std::size_t BindPos = Diags.find (BindMsg);
138146 EXPECT_NE (LocPos, std::string::npos);
139147 EXPECT_NE (BindPos, std::string::npos);
140148 // Check order: first checkLocation is called, then checkBind.
0 commit comments