Added CheckStl to garabage code testing.

This commit is contained in:
orbitcowboy 2014-09-30 08:36:55 +02:00
parent c3c8132bbd
commit fa7645ec71
2 changed files with 7 additions and 2 deletions

View File

@ -474,7 +474,7 @@ test/testexceptionsafety.o: test/testexceptionsafety.cpp lib/cxx11emu.h lib/toke
test/testfilelister.o: test/testfilelister.cpp lib/cxx11emu.h test/testsuite.h lib/errorlogger.h lib/config.h lib/suppressions.h test/redirect.h lib/library.h lib/path.h lib/mathlib.h lib/token.h lib/valueflow.h lib/settings.h lib/standards.h lib/timer.h
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CFG) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -std=c++0x -c -o test/testfilelister.o test/testfilelister.cpp
test/testgarbage.o: test/testgarbage.cpp lib/cxx11emu.h test/testsuite.h lib/errorlogger.h lib/config.h lib/suppressions.h test/redirect.h lib/library.h lib/path.h lib/mathlib.h lib/token.h lib/valueflow.h lib/tokenize.h lib/tokenlist.h lib/checkother.h lib/check.h lib/settings.h lib/standards.h lib/timer.h
test/testgarbage.o: test/testgarbage.cpp lib/cxx11emu.h test/testsuite.h lib/errorlogger.h lib/config.h lib/suppressions.h test/redirect.h lib/library.h lib/path.h lib/mathlib.h lib/token.h lib/valueflow.h lib/tokenize.h lib/tokenlist.h lib/checkother.h lib/check.h lib/settings.h lib/standards.h lib/timer.h lib/checkstl.h
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CFG) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -std=c++0x -c -o test/testgarbage.o test/testgarbage.cpp
test/testincompletestatement.o: test/testincompletestatement.cpp lib/cxx11emu.h test/testsuite.h lib/errorlogger.h lib/config.h lib/suppressions.h test/redirect.h lib/library.h lib/path.h lib/mathlib.h lib/token.h lib/valueflow.h lib/tokenize.h lib/tokenlist.h lib/checkother.h lib/check.h lib/settings.h lib/standards.h lib/timer.h

View File

@ -20,6 +20,7 @@
#include "tokenize.h"
#include "token.h"
#include "checkother.h"
#include "checkstl.h"
#include "settings.h"
extern std::ostringstream errout;
@ -75,9 +76,13 @@ private:
tokenizer.tokenize(istr, filename);
tokenizer.simplifyTokenList2();
// TODO: Run checks
// TODO: Run more checks
CheckOther checkOther(&tokenizer, &settings, this);
checkOther.runChecks(&tokenizer, &settings, this);
checkOther.runSimplifiedChecks(&tokenizer, &settings, this);
CheckStl checkStl(&tokenizer, &settings, this);
checkStl.runChecks(&tokenizer, &settings, this);
checkStl.runSimplifiedChecks(&tokenizer, &settings, this);
return tokenizer.tokens()->stringifyList(false, false, false, true, false, 0, 0);
}