made check.h less heavy (#2633)
This commit is contained in:
parent
0832830a95
commit
37bc0483a4
232
Makefile
232
Makefile
|
@ -188,6 +188,7 @@ LIBOBJ = $(libcppdir)/analyzerinfo.o \
|
||||||
$(libcppdir)/cppcheck.o \
|
$(libcppdir)/cppcheck.o \
|
||||||
$(libcppdir)/ctu.o \
|
$(libcppdir)/ctu.o \
|
||||||
$(libcppdir)/errorlogger.o \
|
$(libcppdir)/errorlogger.o \
|
||||||
|
$(libcppdir)/errortypes.o \
|
||||||
$(libcppdir)/exprengine.o \
|
$(libcppdir)/exprengine.o \
|
||||||
$(libcppdir)/forwardanalyzer.o \
|
$(libcppdir)/forwardanalyzer.o \
|
||||||
$(libcppdir)/importproject.o \
|
$(libcppdir)/importproject.o \
|
||||||
|
@ -400,121 +401,124 @@ validateRules:
|
||||||
|
|
||||||
###### Build
|
###### Build
|
||||||
|
|
||||||
$(libcppdir)/analyzerinfo.o: lib/analyzerinfo.cpp externals/tinyxml/tinyxml2.h lib/analyzerinfo.h lib/config.h lib/errorlogger.h lib/importproject.h lib/path.h lib/platform.h lib/suppressions.h lib/utils.h
|
$(libcppdir)/analyzerinfo.o: lib/analyzerinfo.cpp externals/tinyxml/tinyxml2.h lib/analyzerinfo.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/path.h lib/platform.h lib/suppressions.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/analyzerinfo.o $(libcppdir)/analyzerinfo.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/analyzerinfo.o $(libcppdir)/analyzerinfo.cpp
|
||||||
|
|
||||||
$(libcppdir)/astutils.o: lib/astutils.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/astutils.o: lib/astutils.cpp lib/astutils.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/astutils.o $(libcppdir)/astutils.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/astutils.o $(libcppdir)/astutils.cpp
|
||||||
|
|
||||||
$(libcppdir)/check.o: lib/check.cpp lib/check.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/check.o: lib/check.cpp lib/check.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/check.o $(libcppdir)/check.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/check.o $(libcppdir)/check.cpp
|
||||||
|
|
||||||
$(libcppdir)/check64bit.o: lib/check64bit.cpp lib/check.h lib/check64bit.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/check64bit.o: lib/check64bit.cpp lib/check.h lib/check64bit.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/check64bit.o $(libcppdir)/check64bit.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/check64bit.o $(libcppdir)/check64bit.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkassert.o: lib/checkassert.cpp lib/check.h lib/checkassert.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkassert.o: lib/checkassert.cpp lib/check.h lib/checkassert.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkassert.o $(libcppdir)/checkassert.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkassert.o $(libcppdir)/checkassert.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkautovariables.o: lib/checkautovariables.cpp lib/astutils.h lib/check.h lib/checkautovariables.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkautovariables.o: lib/checkautovariables.cpp lib/astutils.h lib/check.h lib/checkautovariables.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkautovariables.o $(libcppdir)/checkautovariables.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkautovariables.o $(libcppdir)/checkautovariables.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkbool.o: lib/checkbool.cpp lib/astutils.h lib/check.h lib/checkbool.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkbool.o: lib/checkbool.cpp lib/astutils.h lib/check.h lib/checkbool.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkbool.o $(libcppdir)/checkbool.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkbool.o $(libcppdir)/checkbool.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkboost.o: lib/checkboost.cpp lib/check.h lib/checkboost.h lib/config.h lib/errorlogger.h lib/library.h lib/mathlib.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkboost.o: lib/checkboost.cpp lib/check.h lib/checkboost.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkboost.o $(libcppdir)/checkboost.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkboost.o $(libcppdir)/checkboost.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkbufferoverrun.o: lib/checkbufferoverrun.cpp externals/tinyxml/tinyxml2.h lib/astutils.h lib/check.h lib/checkbufferoverrun.h lib/config.h lib/ctu.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkbufferoverrun.o: lib/checkbufferoverrun.cpp externals/tinyxml/tinyxml2.h lib/astutils.h lib/check.h lib/checkbufferoverrun.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkbufferoverrun.o $(libcppdir)/checkbufferoverrun.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkbufferoverrun.o $(libcppdir)/checkbufferoverrun.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkclass.o: lib/checkclass.cpp lib/astutils.h lib/check.h lib/checkclass.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkclass.o: lib/checkclass.cpp lib/astutils.h lib/check.h lib/checkclass.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkclass.o $(libcppdir)/checkclass.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkclass.o $(libcppdir)/checkclass.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkcondition.o: lib/checkcondition.cpp lib/astutils.h lib/check.h lib/checkcondition.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkcondition.o: lib/checkcondition.cpp lib/astutils.h lib/check.h lib/checkcondition.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkcondition.o $(libcppdir)/checkcondition.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkcondition.o $(libcppdir)/checkcondition.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkexceptionsafety.o: lib/checkexceptionsafety.cpp lib/check.h lib/checkexceptionsafety.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkexceptionsafety.o: lib/checkexceptionsafety.cpp lib/check.h lib/checkexceptionsafety.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkexceptionsafety.o $(libcppdir)/checkexceptionsafety.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkexceptionsafety.o $(libcppdir)/checkexceptionsafety.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkfunctions.o: lib/checkfunctions.cpp lib/astutils.h lib/check.h lib/checkfunctions.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkfunctions.o: lib/checkfunctions.cpp lib/astutils.h lib/check.h lib/checkfunctions.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkfunctions.o $(libcppdir)/checkfunctions.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkfunctions.o $(libcppdir)/checkfunctions.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkinternal.o: lib/checkinternal.cpp lib/astutils.h lib/check.h lib/checkinternal.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkinternal.o: lib/checkinternal.cpp lib/astutils.h lib/check.h lib/checkinternal.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkinternal.o $(libcppdir)/checkinternal.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkinternal.o $(libcppdir)/checkinternal.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkio.o: lib/checkio.cpp lib/check.h lib/checkio.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkio.o: lib/checkio.cpp lib/check.h lib/checkio.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkio.o $(libcppdir)/checkio.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkio.o $(libcppdir)/checkio.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkleakautovar.o: lib/checkleakautovar.cpp lib/astutils.h lib/check.h lib/checkleakautovar.h lib/checkmemoryleak.h lib/checknullpointer.h lib/config.h lib/ctu.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkleakautovar.o: lib/checkleakautovar.cpp lib/astutils.h lib/check.h lib/checkleakautovar.h lib/checkmemoryleak.h lib/checknullpointer.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkleakautovar.o $(libcppdir)/checkleakautovar.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkleakautovar.o $(libcppdir)/checkleakautovar.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkmemoryleak.o: lib/checkmemoryleak.cpp lib/astutils.h lib/check.h lib/checkmemoryleak.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkmemoryleak.o: lib/checkmemoryleak.cpp lib/astutils.h lib/check.h lib/checkmemoryleak.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkmemoryleak.o $(libcppdir)/checkmemoryleak.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkmemoryleak.o $(libcppdir)/checkmemoryleak.cpp
|
||||||
|
|
||||||
$(libcppdir)/checknullpointer.o: lib/checknullpointer.cpp lib/astutils.h lib/check.h lib/checknullpointer.h lib/config.h lib/ctu.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checknullpointer.o: lib/checknullpointer.cpp lib/astutils.h lib/check.h lib/checknullpointer.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checknullpointer.o $(libcppdir)/checknullpointer.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checknullpointer.o $(libcppdir)/checknullpointer.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkother.o: lib/checkother.cpp lib/astutils.h lib/check.h lib/checkother.h lib/checkuninitvar.h lib/config.h lib/ctu.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkother.o: lib/checkother.cpp lib/astutils.h lib/check.h lib/checkother.h lib/checkuninitvar.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkother.o $(libcppdir)/checkother.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkother.o $(libcppdir)/checkother.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkpostfixoperator.o: lib/checkpostfixoperator.cpp lib/check.h lib/checkpostfixoperator.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkpostfixoperator.o: lib/checkpostfixoperator.cpp lib/check.h lib/checkpostfixoperator.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkpostfixoperator.o $(libcppdir)/checkpostfixoperator.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkpostfixoperator.o $(libcppdir)/checkpostfixoperator.cpp
|
||||||
|
|
||||||
$(libcppdir)/checksizeof.o: lib/checksizeof.cpp lib/check.h lib/checksizeof.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checksizeof.o: lib/checksizeof.cpp lib/check.h lib/checksizeof.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checksizeof.o $(libcppdir)/checksizeof.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checksizeof.o $(libcppdir)/checksizeof.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkstl.o: lib/checkstl.cpp lib/astutils.h lib/check.h lib/checkstl.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/pathanalysis.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkstl.o: lib/checkstl.cpp lib/astutils.h lib/check.h lib/checkstl.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/pathanalysis.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkstl.o $(libcppdir)/checkstl.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkstl.o $(libcppdir)/checkstl.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkstring.o: lib/checkstring.cpp lib/astutils.h lib/check.h lib/checkstring.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkstring.o: lib/checkstring.cpp lib/astutils.h lib/check.h lib/checkstring.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkstring.o $(libcppdir)/checkstring.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkstring.o $(libcppdir)/checkstring.cpp
|
||||||
|
|
||||||
$(libcppdir)/checktype.o: lib/checktype.cpp lib/check.h lib/checktype.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checktype.o: lib/checktype.cpp lib/check.h lib/checktype.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checktype.o $(libcppdir)/checktype.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checktype.o $(libcppdir)/checktype.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkuninitvar.o: lib/checkuninitvar.cpp lib/astutils.h lib/check.h lib/checknullpointer.h lib/checkuninitvar.h lib/config.h lib/ctu.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkuninitvar.o: lib/checkuninitvar.cpp lib/astutils.h lib/check.h lib/checknullpointer.h lib/checkuninitvar.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkuninitvar.o $(libcppdir)/checkuninitvar.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkuninitvar.o $(libcppdir)/checkuninitvar.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkunusedfunctions.o: lib/checkunusedfunctions.cpp externals/tinyxml/tinyxml2.h lib/astutils.h lib/check.h lib/checkunusedfunctions.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkunusedfunctions.o: lib/checkunusedfunctions.cpp externals/tinyxml/tinyxml2.h lib/astutils.h lib/check.h lib/checkunusedfunctions.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkunusedfunctions.o $(libcppdir)/checkunusedfunctions.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkunusedfunctions.o $(libcppdir)/checkunusedfunctions.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkunusedvar.o: lib/checkunusedvar.cpp lib/astutils.h lib/check.h lib/checkunusedvar.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkunusedvar.o: lib/checkunusedvar.cpp lib/astutils.h lib/check.h lib/checkunusedvar.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkunusedvar.o $(libcppdir)/checkunusedvar.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkunusedvar.o $(libcppdir)/checkunusedvar.cpp
|
||||||
|
|
||||||
$(libcppdir)/checkvaarg.o: lib/checkvaarg.cpp lib/astutils.h lib/check.h lib/checkvaarg.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/checkvaarg.o: lib/checkvaarg.cpp lib/astutils.h lib/check.h lib/checkvaarg.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkvaarg.o $(libcppdir)/checkvaarg.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/checkvaarg.o $(libcppdir)/checkvaarg.cpp
|
||||||
|
|
||||||
$(libcppdir)/clangimport.o: lib/clangimport.cpp lib/clangimport.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/clangimport.o: lib/clangimport.cpp lib/clangimport.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/clangimport.o $(libcppdir)/clangimport.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/clangimport.o $(libcppdir)/clangimport.cpp
|
||||||
|
|
||||||
$(libcppdir)/cppcheck.o: lib/cppcheck.cpp externals/picojson.h externals/simplecpp/simplecpp.h externals/tinyxml/tinyxml2.h lib/analyzerinfo.h lib/check.h lib/checkunusedfunctions.h lib/clangimport.h lib/config.h lib/cppcheck.h lib/ctu.h lib/errorlogger.h lib/exprengine.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/version.h
|
$(libcppdir)/cppcheck.o: lib/cppcheck.cpp externals/picojson.h externals/simplecpp/simplecpp.h externals/tinyxml/tinyxml2.h lib/analyzerinfo.h lib/check.h lib/checkunusedfunctions.h lib/clangimport.h lib/config.h lib/cppcheck.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/exprengine.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/version.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/cppcheck.o $(libcppdir)/cppcheck.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/cppcheck.o $(libcppdir)/cppcheck.cpp
|
||||||
|
|
||||||
$(libcppdir)/ctu.o: lib/ctu.cpp externals/tinyxml/tinyxml2.h lib/astutils.h lib/check.h lib/config.h lib/ctu.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/ctu.o: lib/ctu.cpp externals/tinyxml/tinyxml2.h lib/astutils.h lib/check.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/ctu.o $(libcppdir)/ctu.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/ctu.o $(libcppdir)/ctu.cpp
|
||||||
|
|
||||||
$(libcppdir)/errorlogger.o: lib/errorlogger.cpp externals/tinyxml/tinyxml2.h lib/analyzerinfo.h lib/check.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/errorlogger.o: lib/errorlogger.cpp externals/tinyxml/tinyxml2.h lib/analyzerinfo.h lib/check.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/errorlogger.o $(libcppdir)/errorlogger.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/errorlogger.o $(libcppdir)/errorlogger.cpp
|
||||||
|
|
||||||
$(libcppdir)/exprengine.o: lib/exprengine.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/exprengine.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/errortypes.o: lib/errortypes.cpp lib/config.h lib/errortypes.h
|
||||||
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/errortypes.o $(libcppdir)/errortypes.cpp
|
||||||
|
|
||||||
|
$(libcppdir)/exprengine.o: lib/exprengine.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/exprengine.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/exprengine.o $(libcppdir)/exprengine.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/exprengine.o $(libcppdir)/exprengine.cpp
|
||||||
|
|
||||||
$(libcppdir)/forwardanalyzer.o: lib/forwardanalyzer.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/forwardanalyzer.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/utils.h lib/valueflow.h lib/valueptr.h
|
$(libcppdir)/forwardanalyzer.o: lib/forwardanalyzer.cpp lib/astutils.h lib/config.h lib/errortypes.h lib/forwardanalyzer.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/utils.h lib/valueflow.h lib/valueptr.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/forwardanalyzer.o $(libcppdir)/forwardanalyzer.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/forwardanalyzer.o $(libcppdir)/forwardanalyzer.cpp
|
||||||
|
|
||||||
$(libcppdir)/importproject.o: lib/importproject.cpp externals/picojson.h externals/tinyxml/tinyxml2.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/importproject.o: lib/importproject.cpp externals/picojson.h externals/tinyxml/tinyxml2.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/importproject.o $(libcppdir)/importproject.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/importproject.o $(libcppdir)/importproject.cpp
|
||||||
|
|
||||||
$(libcppdir)/library.o: lib/library.cpp externals/tinyxml/tinyxml2.h lib/astutils.h lib/config.h lib/errorlogger.h lib/library.h lib/mathlib.h lib/path.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/library.o: lib/library.cpp externals/tinyxml/tinyxml2.h lib/astutils.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/library.o $(libcppdir)/library.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/library.o $(libcppdir)/library.cpp
|
||||||
|
|
||||||
$(libcppdir)/mathlib.o: lib/mathlib.cpp lib/config.h lib/errorlogger.h lib/mathlib.h lib/suppressions.h lib/utils.h
|
$(libcppdir)/mathlib.o: lib/mathlib.cpp lib/config.h lib/errortypes.h lib/mathlib.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/mathlib.o $(libcppdir)/mathlib.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/mathlib.o $(libcppdir)/mathlib.cpp
|
||||||
|
|
||||||
$(libcppdir)/path.o: lib/path.cpp externals/simplecpp/simplecpp.h lib/config.h lib/path.h lib/utils.h
|
$(libcppdir)/path.o: lib/path.cpp externals/simplecpp/simplecpp.h lib/config.h lib/path.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/path.o $(libcppdir)/path.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/path.o $(libcppdir)/path.cpp
|
||||||
|
|
||||||
$(libcppdir)/pathanalysis.o: lib/pathanalysis.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/library.h lib/mathlib.h lib/pathanalysis.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/pathanalysis.o: lib/pathanalysis.cpp lib/astutils.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/pathanalysis.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/pathanalysis.o $(libcppdir)/pathanalysis.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/pathanalysis.o $(libcppdir)/pathanalysis.cpp
|
||||||
|
|
||||||
$(libcppdir)/pathmatch.o: lib/pathmatch.cpp lib/config.h lib/path.h lib/pathmatch.h lib/utils.h
|
$(libcppdir)/pathmatch.o: lib/pathmatch.cpp lib/config.h lib/path.h lib/pathmatch.h lib/utils.h
|
||||||
|
@ -523,244 +527,244 @@ $(libcppdir)/pathmatch.o: lib/pathmatch.cpp lib/config.h lib/path.h lib/pathmatc
|
||||||
$(libcppdir)/platform.o: lib/platform.cpp externals/tinyxml/tinyxml2.h lib/config.h lib/path.h lib/platform.h lib/utils.h
|
$(libcppdir)/platform.o: lib/platform.cpp externals/tinyxml/tinyxml2.h lib/config.h lib/path.h lib/platform.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/platform.o $(libcppdir)/platform.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/platform.o $(libcppdir)/platform.cpp
|
||||||
|
|
||||||
$(libcppdir)/preprocessor.o: lib/preprocessor.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h
|
$(libcppdir)/preprocessor.o: lib/preprocessor.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/preprocessor.o $(libcppdir)/preprocessor.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/preprocessor.o $(libcppdir)/preprocessor.cpp
|
||||||
|
|
||||||
$(libcppdir)/programmemory.o: lib/programmemory.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/library.h lib/mathlib.h lib/programmemory.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/programmemory.o: lib/programmemory.cpp lib/astutils.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/programmemory.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/programmemory.o $(libcppdir)/programmemory.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/programmemory.o $(libcppdir)/programmemory.cpp
|
||||||
|
|
||||||
$(libcppdir)/settings.o: lib/settings.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/settings.o: lib/settings.cpp lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/settings.o $(libcppdir)/settings.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/settings.o $(libcppdir)/settings.cpp
|
||||||
|
|
||||||
$(libcppdir)/suppressions.o: lib/suppressions.cpp externals/tinyxml/tinyxml2.h lib/config.h lib/errorlogger.h lib/mathlib.h lib/path.h lib/suppressions.h lib/utils.h
|
$(libcppdir)/suppressions.o: lib/suppressions.cpp externals/tinyxml/tinyxml2.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/mathlib.h lib/path.h lib/suppressions.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/suppressions.o $(libcppdir)/suppressions.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/suppressions.o $(libcppdir)/suppressions.cpp
|
||||||
|
|
||||||
$(libcppdir)/symboldatabase.o: lib/symboldatabase.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/symboldatabase.o: lib/symboldatabase.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/symboldatabase.o $(libcppdir)/symboldatabase.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/symboldatabase.o $(libcppdir)/symboldatabase.cpp
|
||||||
|
|
||||||
$(libcppdir)/templatesimplifier.o: lib/templatesimplifier.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/templatesimplifier.o: lib/templatesimplifier.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/templatesimplifier.o $(libcppdir)/templatesimplifier.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/templatesimplifier.o $(libcppdir)/templatesimplifier.cpp
|
||||||
|
|
||||||
$(libcppdir)/timer.o: lib/timer.cpp lib/config.h lib/timer.h
|
$(libcppdir)/timer.o: lib/timer.cpp lib/config.h lib/timer.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/timer.o $(libcppdir)/timer.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/timer.o $(libcppdir)/timer.cpp
|
||||||
|
|
||||||
$(libcppdir)/token.o: lib/token.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/token.o: lib/token.cpp lib/astutils.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/token.o $(libcppdir)/token.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/token.o $(libcppdir)/token.cpp
|
||||||
|
|
||||||
$(libcppdir)/tokenize.o: lib/tokenize.cpp lib/check.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/tokenize.o: lib/tokenize.cpp lib/check.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/tokenize.o $(libcppdir)/tokenize.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/tokenize.o $(libcppdir)/tokenize.cpp
|
||||||
|
|
||||||
$(libcppdir)/tokenlist.o: lib/tokenlist.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
$(libcppdir)/tokenlist.o: lib/tokenlist.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/tokenlist.o $(libcppdir)/tokenlist.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/tokenlist.o $(libcppdir)/tokenlist.cpp
|
||||||
|
|
||||||
$(libcppdir)/utils.o: lib/utils.cpp lib/config.h lib/utils.h
|
$(libcppdir)/utils.o: lib/utils.cpp lib/config.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/utils.o $(libcppdir)/utils.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/utils.o $(libcppdir)/utils.cpp
|
||||||
|
|
||||||
$(libcppdir)/valueflow.o: lib/valueflow.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/forwardanalyzer.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/programmemory.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/valueptr.h
|
$(libcppdir)/valueflow.o: lib/valueflow.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/forwardanalyzer.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/programmemory.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/valueptr.h
|
||||||
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/valueflow.o $(libcppdir)/valueflow.cpp
|
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o $(libcppdir)/valueflow.o $(libcppdir)/valueflow.cpp
|
||||||
|
|
||||||
cli/cmdlineparser.o: cli/cmdlineparser.cpp cli/cmdlineparser.h cli/cppcheckexecutor.h cli/filelister.h cli/threadexecutor.h externals/tinyxml/tinyxml2.h lib/check.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
cli/cmdlineparser.o: cli/cmdlineparser.cpp cli/cmdlineparser.h cli/cppcheckexecutor.h cli/filelister.h cli/threadexecutor.h externals/tinyxml/tinyxml2.h lib/check.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o cli/cmdlineparser.o cli/cmdlineparser.cpp
|
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o cli/cmdlineparser.o cli/cmdlineparser.cpp
|
||||||
|
|
||||||
cli/cppcheckexecutor.o: cli/cppcheckexecutor.cpp cli/cmdlineparser.h cli/cppcheckexecutor.h cli/filelister.h cli/threadexecutor.h externals/simplecpp/simplecpp.h lib/analyzerinfo.h lib/check.h lib/checkunusedfunctions.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
cli/cppcheckexecutor.o: cli/cppcheckexecutor.cpp cli/cmdlineparser.h cli/cppcheckexecutor.h cli/filelister.h cli/threadexecutor.h externals/simplecpp/simplecpp.h lib/analyzerinfo.h lib/check.h lib/checkunusedfunctions.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o cli/cppcheckexecutor.o cli/cppcheckexecutor.cpp
|
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o cli/cppcheckexecutor.o cli/cppcheckexecutor.cpp
|
||||||
|
|
||||||
cli/filelister.o: cli/filelister.cpp cli/filelister.h lib/config.h lib/path.h lib/pathmatch.h lib/utils.h
|
cli/filelister.o: cli/filelister.cpp cli/filelister.h lib/config.h lib/path.h lib/pathmatch.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o cli/filelister.o cli/filelister.cpp
|
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o cli/filelister.o cli/filelister.cpp
|
||||||
|
|
||||||
cli/main.o: cli/main.cpp cli/cppcheckexecutor.h lib/config.h lib/errorlogger.h lib/suppressions.h
|
cli/main.o: cli/main.cpp cli/cppcheckexecutor.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/suppressions.h
|
||||||
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o cli/main.o cli/main.cpp
|
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o cli/main.o cli/main.cpp
|
||||||
|
|
||||||
cli/threadexecutor.o: cli/threadexecutor.cpp cli/cppcheckexecutor.h cli/threadexecutor.h lib/analyzerinfo.h lib/check.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h
|
cli/threadexecutor.o: cli/threadexecutor.cpp cli/cppcheckexecutor.h cli/threadexecutor.h lib/analyzerinfo.h lib/check.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h
|
||||||
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o cli/threadexecutor.o cli/threadexecutor.cpp
|
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o cli/threadexecutor.o cli/threadexecutor.cpp
|
||||||
|
|
||||||
test/options.o: test/options.cpp test/options.h
|
test/options.o: test/options.cpp test/options.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/options.o test/options.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/options.o test/options.cpp
|
||||||
|
|
||||||
test/test64bit.o: test/test64bit.cpp lib/check.h lib/check64bit.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/test64bit.o: test/test64bit.cpp lib/check.h lib/check64bit.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/test64bit.o test/test64bit.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/test64bit.o test/test64bit.cpp
|
||||||
|
|
||||||
test/testassert.o: test/testassert.cpp lib/check.h lib/checkassert.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testassert.o: test/testassert.cpp lib/check.h lib/checkassert.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testassert.o test/testassert.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testassert.o test/testassert.cpp
|
||||||
|
|
||||||
test/testastutils.o: test/testastutils.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testastutils.o: test/testastutils.cpp lib/astutils.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testastutils.o test/testastutils.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testastutils.o test/testastutils.cpp
|
||||||
|
|
||||||
test/testautovariables.o: test/testautovariables.cpp lib/check.h lib/checkautovariables.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testautovariables.o: test/testautovariables.cpp lib/check.h lib/checkautovariables.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testautovariables.o test/testautovariables.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testautovariables.o test/testautovariables.cpp
|
||||||
|
|
||||||
test/testbool.o: test/testbool.cpp lib/check.h lib/checkbool.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testbool.o: test/testbool.cpp lib/check.h lib/checkbool.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testbool.o test/testbool.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testbool.o test/testbool.cpp
|
||||||
|
|
||||||
test/testboost.o: test/testboost.cpp lib/check.h lib/checkboost.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testboost.o: test/testboost.cpp lib/check.h lib/checkboost.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testboost.o test/testboost.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testboost.o test/testboost.cpp
|
||||||
|
|
||||||
test/testbufferoverrun.o: test/testbufferoverrun.cpp externals/tinyxml/tinyxml2.h lib/check.h lib/checkbufferoverrun.h lib/config.h lib/ctu.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testbufferoverrun.o: test/testbufferoverrun.cpp externals/tinyxml/tinyxml2.h lib/check.h lib/checkbufferoverrun.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testbufferoverrun.o test/testbufferoverrun.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testbufferoverrun.o test/testbufferoverrun.cpp
|
||||||
|
|
||||||
test/testcharvar.o: test/testcharvar.cpp lib/check.h lib/checkother.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testcharvar.o: test/testcharvar.cpp lib/check.h lib/checkother.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testcharvar.o test/testcharvar.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testcharvar.o test/testcharvar.cpp
|
||||||
|
|
||||||
test/testclangimport.o: test/testclangimport.cpp lib/clangimport.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testclangimport.o: test/testclangimport.cpp lib/clangimport.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testclangimport.o test/testclangimport.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testclangimport.o test/testclangimport.cpp
|
||||||
|
|
||||||
test/testclass.o: test/testclass.cpp externals/tinyxml/tinyxml2.h lib/check.h lib/checkclass.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testclass.o: test/testclass.cpp externals/tinyxml/tinyxml2.h lib/check.h lib/checkclass.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testclass.o test/testclass.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testclass.o test/testclass.cpp
|
||||||
|
|
||||||
test/testcmdlineparser.o: test/testcmdlineparser.cpp cli/cmdlineparser.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/redirect.h test/testsuite.h
|
test/testcmdlineparser.o: test/testcmdlineparser.cpp cli/cmdlineparser.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/redirect.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testcmdlineparser.o test/testcmdlineparser.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testcmdlineparser.o test/testcmdlineparser.cpp
|
||||||
|
|
||||||
test/testcondition.o: test/testcondition.cpp externals/simplecpp/simplecpp.h externals/tinyxml/tinyxml2.h lib/check.h lib/checkcondition.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testcondition.o: test/testcondition.cpp externals/simplecpp/simplecpp.h externals/tinyxml/tinyxml2.h lib/check.h lib/checkcondition.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testcondition.o test/testcondition.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testcondition.o test/testcondition.cpp
|
||||||
|
|
||||||
test/testconstructors.o: test/testconstructors.cpp lib/check.h lib/checkclass.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testconstructors.o: test/testconstructors.cpp lib/check.h lib/checkclass.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testconstructors.o test/testconstructors.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testconstructors.o test/testconstructors.cpp
|
||||||
|
|
||||||
test/testcppcheck.o: test/testcppcheck.cpp lib/analyzerinfo.h lib/check.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testcppcheck.o: test/testcppcheck.cpp lib/analyzerinfo.h lib/check.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testcppcheck.o test/testcppcheck.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testcppcheck.o test/testcppcheck.cpp
|
||||||
|
|
||||||
test/testerrorlogger.o: test/testerrorlogger.cpp lib/analyzerinfo.h lib/check.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testerrorlogger.o: test/testerrorlogger.cpp lib/analyzerinfo.h lib/check.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testerrorlogger.o test/testerrorlogger.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testerrorlogger.o test/testerrorlogger.cpp
|
||||||
|
|
||||||
test/testexceptionsafety.o: test/testexceptionsafety.cpp lib/check.h lib/checkexceptionsafety.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testexceptionsafety.o: test/testexceptionsafety.cpp lib/check.h lib/checkexceptionsafety.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testexceptionsafety.o test/testexceptionsafety.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testexceptionsafety.o test/testexceptionsafety.cpp
|
||||||
|
|
||||||
test/testexprengine.o: test/testexprengine.cpp lib/config.h lib/errorlogger.h lib/exprengine.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testexprengine.o: test/testexprengine.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/exprengine.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testexprengine.o test/testexprengine.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testexprengine.o test/testexprengine.cpp
|
||||||
|
|
||||||
test/testfilelister.o: test/testfilelister.cpp cli/filelister.h lib/config.h lib/errorlogger.h lib/pathmatch.h lib/suppressions.h test/testsuite.h
|
test/testfilelister.o: test/testfilelister.cpp cli/filelister.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/pathmatch.h lib/suppressions.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testfilelister.o test/testfilelister.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testfilelister.o test/testfilelister.cpp
|
||||||
|
|
||||||
test/testfunctions.o: test/testfunctions.cpp externals/tinyxml/tinyxml2.h lib/check.h lib/checkfunctions.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testfunctions.o: test/testfunctions.cpp externals/tinyxml/tinyxml2.h lib/check.h lib/checkfunctions.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testfunctions.o test/testfunctions.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testfunctions.o test/testfunctions.cpp
|
||||||
|
|
||||||
test/testgarbage.o: test/testgarbage.cpp lib/check.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testgarbage.o: test/testgarbage.cpp lib/check.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testgarbage.o test/testgarbage.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testgarbage.o test/testgarbage.cpp
|
||||||
|
|
||||||
test/testimportproject.o: test/testimportproject.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/testsuite.h
|
test/testimportproject.o: test/testimportproject.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testimportproject.o test/testimportproject.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testimportproject.o test/testimportproject.cpp
|
||||||
|
|
||||||
test/testincompletestatement.o: test/testincompletestatement.cpp externals/simplecpp/simplecpp.h lib/check.h lib/checkother.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testincompletestatement.o: test/testincompletestatement.cpp externals/simplecpp/simplecpp.h lib/check.h lib/checkother.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testincompletestatement.o test/testincompletestatement.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testincompletestatement.o test/testincompletestatement.cpp
|
||||||
|
|
||||||
test/testinternal.o: test/testinternal.cpp lib/check.h lib/checkinternal.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testinternal.o: test/testinternal.cpp lib/check.h lib/checkinternal.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testinternal.o test/testinternal.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testinternal.o test/testinternal.cpp
|
||||||
|
|
||||||
test/testio.o: test/testio.cpp lib/check.h lib/checkio.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testio.o: test/testio.cpp lib/check.h lib/checkio.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testio.o test/testio.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testio.o test/testio.cpp
|
||||||
|
|
||||||
test/testleakautovar.o: test/testleakautovar.cpp externals/simplecpp/simplecpp.h externals/tinyxml/tinyxml2.h lib/check.h lib/checkleakautovar.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testleakautovar.o: test/testleakautovar.cpp externals/simplecpp/simplecpp.h externals/tinyxml/tinyxml2.h lib/check.h lib/checkleakautovar.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testleakautovar.o test/testleakautovar.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testleakautovar.o test/testleakautovar.cpp
|
||||||
|
|
||||||
test/testlibrary.o: test/testlibrary.cpp externals/tinyxml/tinyxml2.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testlibrary.o: test/testlibrary.cpp externals/tinyxml/tinyxml2.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testlibrary.o test/testlibrary.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testlibrary.o test/testlibrary.cpp
|
||||||
|
|
||||||
test/testmathlib.o: test/testmathlib.cpp lib/config.h lib/errorlogger.h lib/mathlib.h lib/suppressions.h test/testsuite.h
|
test/testmathlib.o: test/testmathlib.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/mathlib.h lib/suppressions.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testmathlib.o test/testmathlib.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testmathlib.o test/testmathlib.cpp
|
||||||
|
|
||||||
test/testmemleak.o: test/testmemleak.cpp lib/check.h lib/checkmemoryleak.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testmemleak.o: test/testmemleak.cpp lib/check.h lib/checkmemoryleak.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testmemleak.o test/testmemleak.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testmemleak.o test/testmemleak.cpp
|
||||||
|
|
||||||
test/testnullpointer.o: test/testnullpointer.cpp externals/simplecpp/simplecpp.h lib/check.h lib/checknullpointer.h lib/config.h lib/ctu.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testnullpointer.o: test/testnullpointer.cpp externals/simplecpp/simplecpp.h lib/check.h lib/checknullpointer.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testnullpointer.o test/testnullpointer.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testnullpointer.o test/testnullpointer.cpp
|
||||||
|
|
||||||
test/testoptions.o: test/testoptions.cpp lib/config.h lib/errorlogger.h lib/suppressions.h test/options.h test/testsuite.h
|
test/testoptions.o: test/testoptions.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/suppressions.h test/options.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testoptions.o test/testoptions.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testoptions.o test/testoptions.cpp
|
||||||
|
|
||||||
test/testother.o: test/testother.cpp externals/simplecpp/simplecpp.h externals/tinyxml/tinyxml2.h lib/check.h lib/checkother.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testother.o: test/testother.cpp externals/simplecpp/simplecpp.h externals/tinyxml/tinyxml2.h lib/check.h lib/checkother.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testother.o test/testother.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testother.o test/testother.cpp
|
||||||
|
|
||||||
test/testpath.o: test/testpath.cpp lib/config.h lib/errorlogger.h lib/path.h lib/suppressions.h test/testsuite.h
|
test/testpath.o: test/testpath.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/path.h lib/suppressions.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testpath.o test/testpath.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testpath.o test/testpath.cpp
|
||||||
|
|
||||||
test/testpathmatch.o: test/testpathmatch.cpp lib/config.h lib/errorlogger.h lib/pathmatch.h lib/suppressions.h test/testsuite.h
|
test/testpathmatch.o: test/testpathmatch.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/pathmatch.h lib/suppressions.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testpathmatch.o test/testpathmatch.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testpathmatch.o test/testpathmatch.cpp
|
||||||
|
|
||||||
test/testplatform.o: test/testplatform.cpp externals/tinyxml/tinyxml2.h lib/config.h lib/errorlogger.h lib/platform.h lib/suppressions.h lib/utils.h test/testsuite.h
|
test/testplatform.o: test/testplatform.cpp externals/tinyxml/tinyxml2.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/platform.h lib/suppressions.h lib/utils.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testplatform.o test/testplatform.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testplatform.o test/testplatform.cpp
|
||||||
|
|
||||||
test/testpostfixoperator.o: test/testpostfixoperator.cpp lib/check.h lib/checkpostfixoperator.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testpostfixoperator.o: test/testpostfixoperator.cpp lib/check.h lib/checkpostfixoperator.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testpostfixoperator.o test/testpostfixoperator.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testpostfixoperator.o test/testpostfixoperator.cpp
|
||||||
|
|
||||||
test/testpreprocessor.o: test/testpreprocessor.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/testsuite.h
|
test/testpreprocessor.o: test/testpreprocessor.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testpreprocessor.o test/testpreprocessor.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testpreprocessor.o test/testpreprocessor.cpp
|
||||||
|
|
||||||
test/testrunner.o: test/testrunner.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/preprocessor.h lib/suppressions.h test/options.h test/testsuite.h
|
test/testrunner.o: test/testrunner.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/preprocessor.h lib/suppressions.h test/options.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testrunner.o test/testrunner.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testrunner.o test/testrunner.cpp
|
||||||
|
|
||||||
test/testsamples.o: test/testsamples.cpp cli/cppcheckexecutor.h cli/filelister.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/redirect.h test/testsuite.h
|
test/testsamples.o: test/testsamples.cpp cli/cppcheckexecutor.h cli/filelister.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/redirect.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsamples.o test/testsamples.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsamples.o test/testsamples.cpp
|
||||||
|
|
||||||
test/testsimplifytemplate.o: test/testsimplifytemplate.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testsimplifytemplate.o: test/testsimplifytemplate.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsimplifytemplate.o test/testsimplifytemplate.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsimplifytemplate.o test/testsimplifytemplate.cpp
|
||||||
|
|
||||||
test/testsimplifytokens.o: test/testsimplifytokens.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testsimplifytokens.o: test/testsimplifytokens.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsimplifytokens.o test/testsimplifytokens.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsimplifytokens.o test/testsimplifytokens.cpp
|
||||||
|
|
||||||
test/testsimplifytypedef.o: test/testsimplifytypedef.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testsimplifytypedef.o: test/testsimplifytypedef.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsimplifytypedef.o test/testsimplifytypedef.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsimplifytypedef.o test/testsimplifytypedef.cpp
|
||||||
|
|
||||||
test/testsimplifyusing.o: test/testsimplifyusing.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testsimplifyusing.o: test/testsimplifyusing.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsimplifyusing.o test/testsimplifyusing.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsimplifyusing.o test/testsimplifyusing.cpp
|
||||||
|
|
||||||
test/testsizeof.o: test/testsizeof.cpp externals/simplecpp/simplecpp.h lib/check.h lib/checksizeof.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testsizeof.o: test/testsizeof.cpp externals/simplecpp/simplecpp.h lib/check.h lib/checksizeof.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsizeof.o test/testsizeof.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsizeof.o test/testsizeof.cpp
|
||||||
|
|
||||||
test/teststl.o: test/teststl.cpp lib/check.h lib/checkstl.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/teststl.o: test/teststl.cpp lib/check.h lib/checkstl.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/teststl.o test/teststl.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/teststl.o test/teststl.cpp
|
||||||
|
|
||||||
test/teststring.o: test/teststring.cpp lib/check.h lib/checkstring.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/teststring.o: test/teststring.cpp lib/check.h lib/checkstring.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/teststring.o test/teststring.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/teststring.o test/teststring.cpp
|
||||||
|
|
||||||
test/testsuite.o: test/testsuite.cpp lib/config.h lib/errorlogger.h lib/suppressions.h test/options.h test/redirect.h test/testsuite.h
|
test/testsuite.o: test/testsuite.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/suppressions.h test/options.h test/redirect.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsuite.o test/testsuite.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsuite.o test/testsuite.cpp
|
||||||
|
|
||||||
test/testsuppressions.o: test/testsuppressions.cpp cli/threadexecutor.h lib/analyzerinfo.h lib/check.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testsuppressions.o: test/testsuppressions.cpp cli/threadexecutor.h lib/analyzerinfo.h lib/check.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsuppressions.o test/testsuppressions.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsuppressions.o test/testsuppressions.cpp
|
||||||
|
|
||||||
test/testsymboldatabase.o: test/testsymboldatabase.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h test/testutils.h
|
test/testsymboldatabase.o: test/testsymboldatabase.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h test/testutils.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsymboldatabase.o test/testsymboldatabase.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testsymboldatabase.o test/testsymboldatabase.cpp
|
||||||
|
|
||||||
test/testthreadexecutor.o: test/testthreadexecutor.cpp cli/threadexecutor.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/testsuite.h
|
test/testthreadexecutor.o: test/testthreadexecutor.cpp cli/threadexecutor.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testthreadexecutor.o test/testthreadexecutor.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testthreadexecutor.o test/testthreadexecutor.cpp
|
||||||
|
|
||||||
test/testtimer.o: test/testtimer.cpp lib/config.h lib/errorlogger.h lib/suppressions.h lib/timer.h test/testsuite.h
|
test/testtimer.o: test/testtimer.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/suppressions.h lib/timer.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testtimer.o test/testtimer.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testtimer.o test/testtimer.cpp
|
||||||
|
|
||||||
test/testtoken.o: test/testtoken.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h test/testutils.h
|
test/testtoken.o: test/testtoken.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h test/testutils.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testtoken.o test/testtoken.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testtoken.o test/testtoken.cpp
|
||||||
|
|
||||||
test/testtokenize.o: test/testtokenize.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testtokenize.o: test/testtokenize.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testtokenize.o test/testtokenize.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testtokenize.o test/testtokenize.cpp
|
||||||
|
|
||||||
test/testtokenlist.o: test/testtokenlist.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testtokenlist.o: test/testtokenlist.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testtokenlist.o test/testtokenlist.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testtokenlist.o test/testtokenlist.cpp
|
||||||
|
|
||||||
test/testtype.o: test/testtype.cpp lib/check.h lib/checktype.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testtype.o: test/testtype.cpp lib/check.h lib/checktype.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testtype.o test/testtype.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testtype.o test/testtype.cpp
|
||||||
|
|
||||||
test/testuninitvar.o: test/testuninitvar.cpp lib/check.h lib/checkuninitvar.h lib/config.h lib/ctu.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testuninitvar.o: test/testuninitvar.cpp lib/check.h lib/checkuninitvar.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testuninitvar.o test/testuninitvar.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testuninitvar.o test/testuninitvar.cpp
|
||||||
|
|
||||||
test/testunusedfunctions.o: test/testunusedfunctions.cpp lib/check.h lib/checkunusedfunctions.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testunusedfunctions.o: test/testunusedfunctions.cpp lib/check.h lib/checkunusedfunctions.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testunusedfunctions.o test/testunusedfunctions.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testunusedfunctions.o test/testunusedfunctions.cpp
|
||||||
|
|
||||||
test/testunusedprivfunc.o: test/testunusedprivfunc.cpp externals/simplecpp/simplecpp.h lib/check.h lib/checkclass.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testunusedprivfunc.o: test/testunusedprivfunc.cpp externals/simplecpp/simplecpp.h lib/check.h lib/checkclass.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testunusedprivfunc.o test/testunusedprivfunc.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testunusedprivfunc.o test/testunusedprivfunc.cpp
|
||||||
|
|
||||||
test/testunusedvar.o: test/testunusedvar.cpp lib/check.h lib/checkunusedvar.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testunusedvar.o: test/testunusedvar.cpp lib/check.h lib/checkunusedvar.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testunusedvar.o test/testunusedvar.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testunusedvar.o test/testunusedvar.cpp
|
||||||
|
|
||||||
test/testutils.o: test/testutils.cpp lib/config.h lib/errorlogger.h lib/suppressions.h lib/utils.h test/testsuite.h
|
test/testutils.o: test/testutils.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/suppressions.h lib/utils.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testutils.o test/testutils.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testutils.o test/testutils.cpp
|
||||||
|
|
||||||
test/testvaarg.o: test/testvaarg.cpp lib/check.h lib/checkvaarg.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testvaarg.o: test/testvaarg.cpp lib/check.h lib/checkvaarg.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testvaarg.o test/testvaarg.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testvaarg.o test/testvaarg.cpp
|
||||||
|
|
||||||
test/testvalueflow.o: test/testvalueflow.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testvalueflow.o: test/testvalueflow.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testvalueflow.o test/testvalueflow.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testvalueflow.o test/testvalueflow.cpp
|
||||||
|
|
||||||
test/testvarid.o: test/testvarid.cpp lib/config.h lib/errorlogger.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
test/testvarid.o: test/testvarid.cpp lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h test/testsuite.h
|
||||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testvarid.o test/testvarid.cpp
|
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CPPFILESDIR) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o test/testvarid.o test/testvarid.cpp
|
||||||
|
|
||||||
externals/simplecpp/simplecpp.o: externals/simplecpp/simplecpp.cpp externals/simplecpp/simplecpp.h
|
externals/simplecpp/simplecpp.o: externals/simplecpp/simplecpp.cpp externals/simplecpp/simplecpp.h
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -106,9 +107,9 @@ bool CppCheckExecutor::parseFromArgs(CppCheck *cppcheck, int argc, const char* c
|
||||||
|
|
||||||
if (parser.getShowErrorMessages()) {
|
if (parser.getShowErrorMessages()) {
|
||||||
mShowAllErrors = true;
|
mShowAllErrors = true;
|
||||||
std::cout << ErrorLogger::ErrorMessage::getXMLHeader();
|
std::cout << ErrorMessage::getXMLHeader();
|
||||||
cppcheck->getErrorMessages();
|
cppcheck->getErrorMessages();
|
||||||
std::cout << ErrorLogger::ErrorMessage::getXMLFooter() << std::endl;
|
std::cout << ErrorMessage::getXMLFooter() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parser.exitAfterPrinting()) {
|
if (parser.exitAfterPrinting()) {
|
||||||
|
@ -851,8 +852,8 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck, int /*argc*/, const cha
|
||||||
for (const std::string &lib : settings.libraries) {
|
for (const std::string &lib : settings.libraries) {
|
||||||
if (!tryLoadLibrary(settings.library, argv[0], lib.c_str())) {
|
if (!tryLoadLibrary(settings.library, argv[0], lib.c_str())) {
|
||||||
const std::string msg("Failed to load the library " + lib);
|
const std::string msg("Failed to load the library " + lib);
|
||||||
const std::list<ErrorLogger::ErrorMessage::FileLocation> callstack;
|
const std::list<ErrorMessage::FileLocation> callstack;
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, emptyString, Severity::information, msg, "failedToLoadCfg", false);
|
ErrorMessage errmsg(callstack, emptyString, Severity::information, msg, "failedToLoadCfg", false);
|
||||||
reportErr(errmsg);
|
reportErr(errmsg);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -866,7 +867,7 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck, int /*argc*/, const cha
|
||||||
windows = tryLoadLibrary(settings.library, argv[0], "windows.cfg");
|
windows = tryLoadLibrary(settings.library, argv[0], "windows.cfg");
|
||||||
|
|
||||||
if (!std || !posix || !windows) {
|
if (!std || !posix || !windows) {
|
||||||
const std::list<ErrorLogger::ErrorMessage::FileLocation> callstack;
|
const std::list<ErrorMessage::FileLocation> callstack;
|
||||||
const std::string msg("Failed to load " + std::string(!std ? "std.cfg" : !posix ? "posix.cfg" : "windows.cfg") + ". Your Cppcheck installation is broken, please re-install.");
|
const std::string msg("Failed to load " + std::string(!std ? "std.cfg" : !posix ? "posix.cfg" : "windows.cfg") + ". Your Cppcheck installation is broken, please re-install.");
|
||||||
#ifdef FILESDIR
|
#ifdef FILESDIR
|
||||||
const std::string details("The Cppcheck binary was compiled with FILESDIR set to \""
|
const std::string details("The Cppcheck binary was compiled with FILESDIR set to \""
|
||||||
|
@ -878,7 +879,7 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck, int /*argc*/, const cha
|
||||||
"std.cfg should be available in " + cfgfolder + " or the FILESDIR "
|
"std.cfg should be available in " + cfgfolder + " or the FILESDIR "
|
||||||
"should be configured.");
|
"should be configured.");
|
||||||
#endif
|
#endif
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, emptyString, Severity::information, msg+" "+details, "failedToLoadCfg", false);
|
ErrorMessage errmsg(callstack, emptyString, Severity::information, msg+" "+details, "failedToLoadCfg", false);
|
||||||
reportErr(errmsg);
|
reportErr(errmsg);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -891,7 +892,7 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck, int /*argc*/, const cha
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.xml) {
|
if (settings.xml) {
|
||||||
reportErr(ErrorLogger::ErrorMessage::getXMLHeader());
|
reportErr(ErrorMessage::getXMLHeader());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!settings.buildDir.empty()) {
|
if (!settings.buildDir.empty()) {
|
||||||
|
@ -980,8 +981,8 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck, int /*argc*/, const cha
|
||||||
cppcheck.tooManyConfigsError("",0U);
|
cppcheck.tooManyConfigsError("",0U);
|
||||||
|
|
||||||
if (settings.isEnabled(Settings::MISSING_INCLUDE) && (Preprocessor::missingIncludeFlag || Preprocessor::missingSystemIncludeFlag)) {
|
if (settings.isEnabled(Settings::MISSING_INCLUDE) && (Preprocessor::missingIncludeFlag || Preprocessor::missingSystemIncludeFlag)) {
|
||||||
const std::list<ErrorLogger::ErrorMessage::FileLocation> callStack;
|
const std::list<ErrorMessage::FileLocation> callStack;
|
||||||
ErrorLogger::ErrorMessage msg(callStack,
|
ErrorMessage msg(callStack,
|
||||||
emptyString,
|
emptyString,
|
||||||
Severity::information,
|
Severity::information,
|
||||||
"Cppcheck cannot find all the include files (use --check-config for details)\n"
|
"Cppcheck cannot find all the include files (use --check-config for details)\n"
|
||||||
|
@ -997,7 +998,7 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck, int /*argc*/, const cha
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.xml) {
|
if (settings.xml) {
|
||||||
reportErr(ErrorLogger::ErrorMessage::getXMLFooter());
|
reportErr(ErrorMessage::getXMLFooter());
|
||||||
}
|
}
|
||||||
|
|
||||||
mSettings = nullptr;
|
mSettings = nullptr;
|
||||||
|
@ -1072,7 +1073,7 @@ void CppCheckExecutor::reportProgress(const std::string &filename, const char st
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppCheckExecutor::reportInfo(const ErrorLogger::ErrorMessage &msg)
|
void CppCheckExecutor::reportInfo(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
reportErr(msg);
|
reportErr(msg);
|
||||||
}
|
}
|
||||||
|
@ -1089,7 +1090,7 @@ void CppCheckExecutor::reportStatus(std::size_t fileindex, std::size_t filecount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppCheckExecutor::reportErr(const ErrorLogger::ErrorMessage &msg)
|
void CppCheckExecutor::reportErr(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
if (mShowAllErrors) {
|
if (mShowAllErrors) {
|
||||||
reportOut(msg.toXML());
|
reportOut(msg.toXML());
|
||||||
|
|
|
@ -72,14 +72,14 @@ public:
|
||||||
void reportOut(const std::string &outmsg) OVERRIDE;
|
void reportOut(const std::string &outmsg) OVERRIDE;
|
||||||
|
|
||||||
/** xml output of errors */
|
/** xml output of errors */
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) OVERRIDE;
|
void reportErr(const ErrorMessage &msg) OVERRIDE;
|
||||||
|
|
||||||
void reportProgress(const std::string &filename, const char stage[], const std::size_t value) OVERRIDE;
|
void reportProgress(const std::string &filename, const char stage[], const std::size_t value) OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output information messages.
|
* Output information messages.
|
||||||
*/
|
*/
|
||||||
void reportInfo(const ErrorLogger::ErrorMessage &msg) OVERRIDE;
|
void reportInfo(const ErrorMessage &msg) OVERRIDE;
|
||||||
|
|
||||||
void bughuntingReport(const std::string &str) OVERRIDE;
|
void bughuntingReport(const std::string &str) OVERRIDE;
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ int ThreadExecutor::handleRead(int rpipe, unsigned int &result)
|
||||||
if (type == REPORT_OUT) {
|
if (type == REPORT_OUT) {
|
||||||
mErrorLogger.reportOut(buf);
|
mErrorLogger.reportOut(buf);
|
||||||
} else if (type == REPORT_ERROR || type == REPORT_INFO) {
|
} else if (type == REPORT_ERROR || type == REPORT_INFO) {
|
||||||
ErrorLogger::ErrorMessage msg;
|
ErrorMessage msg;
|
||||||
msg.deserialize(buf);
|
msg.deserialize(buf);
|
||||||
|
|
||||||
if (!mSettings.nomsg.isSuppressed(msg.toSuppressionsErrorMessage())) {
|
if (!mSettings.nomsg.isSuppressed(msg.toSuppressionsErrorMessage())) {
|
||||||
|
@ -299,9 +299,9 @@ unsigned int ThreadExecutor::check()
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << "Internal error: Child process crashed with signal " << WTERMSIG(stat);
|
oss << "Internal error: Child process crashed with signal " << WTERMSIG(stat);
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locations;
|
std::list<ErrorMessage::FileLocation> locations;
|
||||||
locations.emplace_back(childname, 0, 0);
|
locations.emplace_back(childname, 0, 0);
|
||||||
const ErrorLogger::ErrorMessage errmsg(locations,
|
const ErrorMessage errmsg(locations,
|
||||||
emptyString,
|
emptyString,
|
||||||
Severity::error,
|
Severity::error,
|
||||||
oss.str(),
|
oss.str(),
|
||||||
|
@ -344,12 +344,12 @@ void ThreadExecutor::reportOut(const std::string &outmsg)
|
||||||
writeToPipe(REPORT_OUT, outmsg);
|
writeToPipe(REPORT_OUT, outmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadExecutor::reportErr(const ErrorLogger::ErrorMessage &msg)
|
void ThreadExecutor::reportErr(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
writeToPipe(REPORT_ERROR, msg.serialize());
|
writeToPipe(REPORT_ERROR, msg.serialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadExecutor::reportInfo(const ErrorLogger::ErrorMessage &msg)
|
void ThreadExecutor::reportInfo(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
writeToPipe(REPORT_INFO, msg.serialize());
|
writeToPipe(REPORT_INFO, msg.serialize());
|
||||||
}
|
}
|
||||||
|
@ -496,12 +496,12 @@ void ThreadExecutor::reportOut(const std::string &outmsg)
|
||||||
|
|
||||||
LeaveCriticalSection(&mReportSync);
|
LeaveCriticalSection(&mReportSync);
|
||||||
}
|
}
|
||||||
void ThreadExecutor::reportErr(const ErrorLogger::ErrorMessage &msg)
|
void ThreadExecutor::reportErr(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
report(msg, MessageType::REPORT_ERROR);
|
report(msg, MessageType::REPORT_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadExecutor::reportInfo(const ErrorLogger::ErrorMessage &msg)
|
void ThreadExecutor::reportInfo(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -511,7 +511,7 @@ void ThreadExecutor::bughuntingReport(const std::string &/*str*/)
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadExecutor::report(const ErrorLogger::ErrorMessage &msg, MessageType msgType)
|
void ThreadExecutor::report(const ErrorMessage &msg, MessageType msgType)
|
||||||
{
|
{
|
||||||
if (mSettings.nomsg.isSuppressed(msg.toSuppressionsErrorMessage()))
|
if (mSettings.nomsg.isSuppressed(msg.toSuppressionsErrorMessage()))
|
||||||
return;
|
return;
|
||||||
|
@ -559,12 +559,12 @@ void ThreadExecutor::reportOut(const std::string &/*outmsg*/)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
void ThreadExecutor::reportErr(const ErrorLogger::ErrorMessage &/*msg*/)
|
void ThreadExecutor::reportErr(const ErrorMessage &/*msg*/)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadExecutor::reportInfo(const ErrorLogger::ErrorMessage &/*msg*/)
|
void ThreadExecutor::reportInfo(const ErrorMessage &/*msg*/)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,8 @@ public:
|
||||||
unsigned int check();
|
unsigned int check();
|
||||||
|
|
||||||
void reportOut(const std::string &outmsg) OVERRIDE;
|
void reportOut(const std::string &outmsg) OVERRIDE;
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) OVERRIDE;
|
void reportErr(const ErrorMessage &msg) OVERRIDE;
|
||||||
void reportInfo(const ErrorLogger::ErrorMessage &msg) OVERRIDE;
|
void reportInfo(const ErrorMessage &msg) OVERRIDE;
|
||||||
void bughuntingReport(const std::string &str) OVERRIDE;
|
void bughuntingReport(const std::string &str) OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -129,7 +129,7 @@ private:
|
||||||
|
|
||||||
CRITICAL_SECTION mReportSync;
|
CRITICAL_SECTION mReportSync;
|
||||||
|
|
||||||
void report(const ErrorLogger::ErrorMessage &msg, MessageType msgType);
|
void report(const ErrorMessage &msg, MessageType msgType);
|
||||||
|
|
||||||
static unsigned __stdcall threadProc(void*);
|
static unsigned __stdcall threadProc(void*);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void reportOut(const std::string &outmsg) override { }
|
void reportOut(const std::string &outmsg) override { }
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) override {
|
void reportErr(const ErrorMessage &msg) override {
|
||||||
const std::string s = msg.toString(true);
|
const std::string s = msg.toString(true);
|
||||||
|
|
||||||
std::cout << s << std::endl;
|
std::cout << s << std::endl;
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include "application.h"
|
|
||||||
#include "ui_application.h"
|
#include "ui_application.h"
|
||||||
|
|
||||||
class QWidget;
|
class QWidget;
|
||||||
|
class Application;
|
||||||
|
|
||||||
/// @addtogroup GUI
|
/// @addtogroup GUI
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -395,14 +395,14 @@ void CheckThread::parseClangErrors(const QString &tool, const QString &file0, QS
|
||||||
if (isSuppressed(errorMessage))
|
if (isSuppressed(errorMessage))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> callstack;
|
std::list<ErrorMessage::FileLocation> callstack;
|
||||||
foreach (const QErrorPathItem &path, e.errorPath) {
|
foreach (const QErrorPathItem &path, e.errorPath) {
|
||||||
callstack.push_back(ErrorLogger::ErrorMessage::FileLocation(path.file.toStdString(), path.info.toStdString(), path.line, path.column));
|
callstack.push_back(ErrorMessage::FileLocation(path.file.toStdString(), path.info.toStdString(), path.line, path.column));
|
||||||
}
|
}
|
||||||
const std::string f0 = file0.toStdString();
|
const std::string f0 = file0.toStdString();
|
||||||
const std::string msg = e.message.toStdString();
|
const std::string msg = e.message.toStdString();
|
||||||
const std::string id = e.errorId.toStdString();
|
const std::string id = e.errorId.toStdString();
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, f0, e.severity, msg, id, false);
|
ErrorMessage errmsg(callstack, f0, e.severity, msg, id, false);
|
||||||
mResult.reportErr(errmsg);
|
mResult.reportErr(errmsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "erroritem.h"
|
#include "erroritem.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
QErrorPathItem::QErrorPathItem(const ErrorLogger::ErrorMessage::FileLocation &loc)
|
QErrorPathItem::QErrorPathItem(const ErrorMessage::FileLocation &loc)
|
||||||
: file(QString::fromStdString(loc.getfile(false)))
|
: file(QString::fromStdString(loc.getfile(false)))
|
||||||
, line(loc.line)
|
, line(loc.line)
|
||||||
, column(loc.column)
|
, column(loc.column)
|
||||||
|
@ -40,7 +40,7 @@ ErrorItem::ErrorItem()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorItem::ErrorItem(const ErrorLogger::ErrorMessage &errmsg)
|
ErrorItem::ErrorItem(const ErrorMessage &errmsg)
|
||||||
: file0(QString::fromStdString(errmsg.file0))
|
: file0(QString::fromStdString(errmsg.file0))
|
||||||
, function(QString::fromStdString(errmsg.function))
|
, function(QString::fromStdString(errmsg.function))
|
||||||
, errorId(QString::fromStdString(errmsg.id))
|
, errorId(QString::fromStdString(errmsg.id))
|
||||||
|
@ -52,7 +52,7 @@ ErrorItem::ErrorItem(const ErrorLogger::ErrorMessage &errmsg)
|
||||||
, cwe(errmsg.cwe.id)
|
, cwe(errmsg.cwe.id)
|
||||||
, symbolNames(QString::fromStdString(errmsg.symbolNames()))
|
, symbolNames(QString::fromStdString(errmsg.symbolNames()))
|
||||||
{
|
{
|
||||||
for (std::list<ErrorLogger::ErrorMessage::FileLocation>::const_iterator loc = errmsg.callStack.begin();
|
for (std::list<ErrorMessage::FileLocation>::const_iterator loc = errmsg.callStack.begin();
|
||||||
loc != errmsg.callStack.end();
|
loc != errmsg.callStack.end();
|
||||||
++loc) {
|
++loc) {
|
||||||
errorPath << QErrorPathItem(*loc);
|
errorPath << QErrorPathItem(*loc);
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
class QErrorPathItem {
|
class QErrorPathItem {
|
||||||
public:
|
public:
|
||||||
QErrorPathItem() : line(0), column(-1) {}
|
QErrorPathItem() : line(0), column(-1) {}
|
||||||
explicit QErrorPathItem(const ErrorLogger::ErrorMessage::FileLocation &loc);
|
explicit QErrorPathItem(const ErrorMessage::FileLocation &loc);
|
||||||
QString file;
|
QString file;
|
||||||
int line;
|
int line;
|
||||||
int column;
|
int column;
|
||||||
|
@ -70,7 +70,7 @@ bool operator==(const QErrorPathItem &i1, const QErrorPathItem &i2);
|
||||||
class ErrorItem {
|
class ErrorItem {
|
||||||
public:
|
public:
|
||||||
ErrorItem();
|
ErrorItem();
|
||||||
explicit ErrorItem(const ErrorLogger::ErrorMessage &errmsg);
|
explicit ErrorItem(const ErrorMessage &errmsg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert error item to string.
|
* @brief Convert error item to string.
|
||||||
|
|
|
@ -13,7 +13,7 @@ NewSuppressionDialog::NewSuppressionDialog(QWidget *parent) :
|
||||||
class QErrorLogger : public ErrorLogger {
|
class QErrorLogger : public ErrorLogger {
|
||||||
public:
|
public:
|
||||||
void reportOut(const std::string &/*outmsg*/) override {}
|
void reportOut(const std::string &/*outmsg*/) override {}
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) override {
|
void reportErr(const ErrorMessage &msg) override {
|
||||||
errorIds << QString::fromStdString(msg.id);
|
errorIds << QString::fromStdString(msg.id);
|
||||||
}
|
}
|
||||||
void bughuntingReport(const std::string &/*str*/) override {}
|
void bughuntingReport(const std::string &/*str*/) override {}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <QStandardItem>
|
#include <QStandardItem>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
#include "errorlogger.h" // Severity
|
#include "errortypes.h"
|
||||||
#include "showtypes.h"
|
#include "showtypes.h"
|
||||||
|
|
||||||
class ApplicationList;
|
class ApplicationList;
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "showtypes.h"
|
#include "showtypes.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
|
|
||||||
ShowTypes::ShowTypes()
|
ShowTypes::ShowTypes()
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,8 +19,9 @@
|
||||||
#ifndef SHOWTYPES_H
|
#ifndef SHOWTYPES_H
|
||||||
#define SHOWTYPES_H
|
#define SHOWTYPES_H
|
||||||
|
|
||||||
|
#include "errortypes.h"
|
||||||
|
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include "errorlogger.h"
|
|
||||||
|
|
||||||
/// @addtogroup GUI
|
/// @addtogroup GUI
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
|
|
||||||
void BenchmarkSimple::tokenize()
|
void BenchmarkSimple::tokenize()
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,6 +33,6 @@ private:
|
||||||
// We don't care about the output in the benchmark tests.
|
// We don't care about the output in the benchmark tests.
|
||||||
void reportOut(const std::string & outmsg) override {
|
void reportOut(const std::string & outmsg) override {
|
||||||
}
|
}
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) override {
|
void reportErr(const ErrorMessage &msg) override {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include "testxmlreportv2.h"
|
#include "testxmlreportv2.h"
|
||||||
#include "xmlreportv2.h"
|
#include "xmlreportv2.h"
|
||||||
#include "erroritem.h"
|
#include "erroritem.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
|
|
||||||
void TestXmlReportV2::readXml()
|
void TestXmlReportV2::readXml()
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,7 +57,7 @@ void ThreadResult::fileChecked(const QString &file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadResult::reportErr(const ErrorLogger::ErrorMessage &msg)
|
void ThreadResult::reportErr(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&mutex);
|
QMutexLocker locker(&mutex);
|
||||||
const ErrorItem item(msg);
|
const ErrorItem item(msg);
|
||||||
|
|
|
@ -73,7 +73,7 @@ public:
|
||||||
* ErrorLogger methods
|
* ErrorLogger methods
|
||||||
*/
|
*/
|
||||||
void reportOut(const std::string &outmsg) override;
|
void reportOut(const std::string &outmsg) override;
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) override;
|
void reportErr(const ErrorMessage &msg) override;
|
||||||
void bughuntingReport(const std::string &str) override;
|
void bughuntingReport(const std::string &str) override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include "analyzerinfo.h"
|
#include "analyzerinfo.h"
|
||||||
|
|
||||||
|
#include "errorlogger.h"
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
@ -75,7 +76,7 @@ void AnalyzerInformation::close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool skipAnalysis(const std::string &analyzerInfoFile, unsigned long long checksum, std::list<ErrorLogger::ErrorMessage> *errors)
|
static bool skipAnalysis(const std::string &analyzerInfoFile, unsigned long long checksum, std::list<ErrorMessage> *errors)
|
||||||
{
|
{
|
||||||
tinyxml2::XMLDocument doc;
|
tinyxml2::XMLDocument doc;
|
||||||
const tinyxml2::XMLError error = doc.LoadFile(analyzerInfoFile.c_str());
|
const tinyxml2::XMLError error = doc.LoadFile(analyzerInfoFile.c_str());
|
||||||
|
@ -128,7 +129,7 @@ std::string AnalyzerInformation::getAnalyzerInfoFile(const std::string &buildDir
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AnalyzerInformation::analyzeFile(const std::string &buildDir, const std::string &sourcefile, const std::string &cfg, unsigned long long checksum, std::list<ErrorLogger::ErrorMessage> *errors)
|
bool AnalyzerInformation::analyzeFile(const std::string &buildDir, const std::string &sourcefile, const std::string &cfg, unsigned long long checksum, std::list<ErrorMessage> *errors)
|
||||||
{
|
{
|
||||||
if (buildDir.empty() || sourcefile.empty())
|
if (buildDir.empty() || sourcefile.empty())
|
||||||
return true;
|
return true;
|
||||||
|
@ -150,7 +151,7 @@ bool AnalyzerInformation::analyzeFile(const std::string &buildDir, const std::st
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnalyzerInformation::reportErr(const ErrorLogger::ErrorMessage &msg, bool /*verbose*/)
|
void AnalyzerInformation::reportErr(const ErrorMessage &msg, bool /*verbose*/)
|
||||||
{
|
{
|
||||||
if (mOutputStream.is_open())
|
if (mOutputStream.is_open())
|
||||||
mOutputStream << msg.toXML() << '\n';
|
mOutputStream << msg.toXML() << '\n';
|
||||||
|
|
|
@ -22,13 +22,14 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "importproject.h"
|
#include "importproject.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
class ErrorMessage;
|
||||||
|
|
||||||
/// @addtogroup Core
|
/// @addtogroup Core
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
|
@ -53,8 +54,8 @@ public:
|
||||||
|
|
||||||
/** Close current TU.analyzerinfo file */
|
/** Close current TU.analyzerinfo file */
|
||||||
void close();
|
void close();
|
||||||
bool analyzeFile(const std::string &buildDir, const std::string &sourcefile, const std::string &cfg, unsigned long long checksum, std::list<ErrorLogger::ErrorMessage> *errors);
|
bool analyzeFile(const std::string &buildDir, const std::string &sourcefile, const std::string &cfg, unsigned long long checksum, std::list<ErrorMessage> *errors);
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg, bool verbose);
|
void reportErr(const ErrorMessage &msg, bool verbose);
|
||||||
void setFileInfo(const std::string &check, const std::string &fileInfo);
|
void setFileInfo(const std::string &check, const std::string &fileInfo);
|
||||||
static std::string getAnalyzerInfoFile(const std::string &buildDir, const std::string &sourcefile, const std::string &cfg);
|
static std::string getAnalyzerInfoFile(const std::string &buildDir, const std::string &sourcefile, const std::string &cfg);
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "errorlogger.h"
|
#include "errortypes.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
class Library;
|
class Library;
|
||||||
|
|
|
@ -19,7 +19,10 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
|
#include "errorlogger.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#include "tokenize.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -37,11 +40,30 @@ Check::Check(const std::string &aname)
|
||||||
instances().push_back(this);
|
instances().push_back(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Check::reportError(const ErrorLogger::ErrorMessage &errmsg)
|
void Check::reportError(const ErrorMessage &errmsg)
|
||||||
{
|
{
|
||||||
std::cout << errmsg.toXML() << std::endl;
|
std::cout << errmsg.toXML() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Check::reportError(const std::list<const Token *> &callstack, Severity::SeverityType severity, const std::string &id, const std::string &msg, const CWE &cwe, bool inconclusive)
|
||||||
|
{
|
||||||
|
const ErrorMessage errmsg(callstack, mTokenizer ? &mTokenizer->list : nullptr, severity, id, msg, cwe, inconclusive);
|
||||||
|
if (mErrorLogger)
|
||||||
|
mErrorLogger->reportErr(errmsg);
|
||||||
|
else
|
||||||
|
reportError(errmsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Check::reportError(const ErrorPath &errorPath, Severity::SeverityType severity, const char id[], const std::string &msg, const CWE &cwe, bool inconclusive)
|
||||||
|
{
|
||||||
|
const ErrorMessage errmsg(errorPath, mTokenizer ? &mTokenizer->list : nullptr, severity, id, msg, cwe, inconclusive);
|
||||||
|
if (mErrorLogger)
|
||||||
|
mErrorLogger->reportErr(errmsg);
|
||||||
|
else
|
||||||
|
reportError(errmsg);
|
||||||
|
}
|
||||||
|
|
||||||
bool Check::wrongData(const Token *tok, bool condition, const char *str)
|
bool Check::wrongData(const Token *tok, bool condition, const char *str)
|
||||||
{
|
{
|
||||||
#if defined(DACA2) || defined(UNSTABLE)
|
#if defined(DACA2) || defined(UNSTABLE)
|
||||||
|
|
27
lib/check.h
27
lib/check.h
|
@ -22,8 +22,7 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h" // for Severity::SeverityType
|
#include "errortypes.h"
|
||||||
#include "tokenize.h"
|
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -43,6 +42,8 @@ namespace ValueFlow {
|
||||||
class Settings;
|
class Settings;
|
||||||
class Token;
|
class Token;
|
||||||
class ErrorLogger;
|
class ErrorLogger;
|
||||||
|
class ErrorMessage;
|
||||||
|
class Tokenizer;
|
||||||
|
|
||||||
/** Use WRONG_DATA in checkers to mark conditions that check that data is correct */
|
/** Use WRONG_DATA in checkers to mark conditions that check that data is correct */
|
||||||
#define WRONG_DATA(COND, TOK) (wrongData((TOK), (COND), #COND))
|
#define WRONG_DATA(COND, TOK) (wrongData((TOK), (COND), #COND))
|
||||||
|
@ -91,7 +92,7 @@ public:
|
||||||
* This is for for printout out the error list with --errorlist
|
* This is for for printout out the error list with --errorlist
|
||||||
* @param errmsg Error message to write
|
* @param errmsg Error message to write
|
||||||
*/
|
*/
|
||||||
static void reportError(const ErrorLogger::ErrorMessage &errmsg);
|
static void reportError(const ErrorMessage &errmsg);
|
||||||
|
|
||||||
/** Base class used for whole-program analysis */
|
/** Base class used for whole-program analysis */
|
||||||
class CPPCHECKLIB FileInfo {
|
class CPPCHECKLIB FileInfo {
|
||||||
|
@ -115,11 +116,11 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return true if an error is reported.
|
// Return true if an error is reported.
|
||||||
virtual bool analyseWholeProgram(const CTU::FileInfo *ctu, const std::list<FileInfo*> &fileInfo, const Settings& /*settings*/, ErrorLogger &errorLogger) {
|
virtual bool analyseWholeProgram(const CTU::FileInfo *ctu, const std::list<FileInfo*> &fileInfo, const Settings& /*settings*/, ErrorLogger &/*errorLogger*/) {
|
||||||
(void)ctu;
|
(void)ctu;
|
||||||
(void)fileInfo;
|
(void)fileInfo;
|
||||||
//(void)settings;
|
//(void)settings;
|
||||||
(void)errorLogger;
|
//(void)errorLogger;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,21 +148,9 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
/** report an error */
|
/** report an error */
|
||||||
void reportError(const std::list<const Token *> &callstack, Severity::SeverityType severity, const std::string &id, const std::string &msg, const CWE &cwe, bool inconclusive) {
|
void reportError(const std::list<const Token *> &callstack, Severity::SeverityType severity, const std::string &id, const std::string &msg, const CWE &cwe, bool inconclusive);
|
||||||
const ErrorLogger::ErrorMessage errmsg(callstack, mTokenizer ? &mTokenizer->list : nullptr, severity, id, msg, cwe, inconclusive);
|
|
||||||
if (mErrorLogger)
|
|
||||||
mErrorLogger->reportErr(errmsg);
|
|
||||||
else
|
|
||||||
reportError(errmsg);
|
|
||||||
}
|
|
||||||
|
|
||||||
void reportError(const ErrorPath &errorPath, Severity::SeverityType severity, const char id[], const std::string &msg, const CWE &cwe, bool inconclusive) {
|
void reportError(const ErrorPath &errorPath, Severity::SeverityType severity, const char id[], const std::string &msg, const CWE &cwe, bool inconclusive);
|
||||||
const ErrorLogger::ErrorMessage errmsg(errorPath, mTokenizer ? &mTokenizer->list : nullptr, severity, id, msg, cwe, inconclusive);
|
|
||||||
if (mErrorLogger)
|
|
||||||
mErrorLogger->reportErr(errmsg);
|
|
||||||
else
|
|
||||||
reportError(errmsg);
|
|
||||||
}
|
|
||||||
|
|
||||||
ErrorPath getErrorPath(const Token* errtok, const ValueFlow::Value* value, const std::string& bug) const;
|
ErrorPath getErrorPath(const Token* errtok, const ValueFlow::Value* value, const std::string& bug) const;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
#include "check64bit.h"
|
#include "check64bit.h"
|
||||||
|
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
#include "checkassert.h"
|
#include "checkassert.h"
|
||||||
|
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "checkautovariables.h"
|
#include "checkautovariables.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
|
|
|
@ -24,13 +24,15 @@
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
#include "errortypes.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class Settings;
|
class Settings;
|
||||||
class Token;
|
class Token;
|
||||||
class Tokenizer;
|
class Tokenizer;
|
||||||
|
class ErrorLogger;
|
||||||
|
class Variable;
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/** @brief Various small checks for automatic variables */
|
/** @brief Various small checks for automatic variables */
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "checkbool.h"
|
#include "checkbool.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
#include "checkboost.h"
|
#include "checkboost.h"
|
||||||
|
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "checkbufferoverrun.h"
|
#include "checkbufferoverrun.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
|
#include "errorlogger.h"
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
@ -847,7 +848,7 @@ bool CheckBufferOverrun::analyseWholeProgram1(const CTU::FileInfo *ctu, const st
|
||||||
{
|
{
|
||||||
const CTU::FileInfo::FunctionCall *functionCall = nullptr;
|
const CTU::FileInfo::FunctionCall *functionCall = nullptr;
|
||||||
|
|
||||||
const std::list<ErrorLogger::ErrorMessage::FileLocation> &locationList =
|
const std::list<ErrorMessage::FileLocation> &locationList =
|
||||||
ctu->getErrorPath(CTU::FileInfo::InvalidValueType::bufferOverflow,
|
ctu->getErrorPath(CTU::FileInfo::InvalidValueType::bufferOverflow,
|
||||||
unsafeUsage,
|
unsafeUsage,
|
||||||
callsMap,
|
callsMap,
|
||||||
|
@ -874,7 +875,7 @@ bool CheckBufferOverrun::analyseWholeProgram1(const CTU::FileInfo *ctu, const st
|
||||||
cwe = CWE_POINTER_ARITHMETIC_OVERFLOW;
|
cwe = CWE_POINTER_ARITHMETIC_OVERFLOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ErrorLogger::ErrorMessage errorMessage(locationList,
|
const ErrorMessage errorMessage(locationList,
|
||||||
emptyString,
|
emptyString,
|
||||||
Severity::error,
|
Severity::error,
|
||||||
errmsg,
|
errmsg,
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
#include "checkclass.h"
|
#include "checkclass.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "standards.h"
|
#include "standards.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
|
#include "errortypes.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "checkcondition.h"
|
#include "checkcondition.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
|
@ -24,14 +24,17 @@
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
|
#include "errortypes.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class Settings;
|
class Settings;
|
||||||
class Token;
|
class Token;
|
||||||
class Tokenizer;
|
class Tokenizer;
|
||||||
|
class ErrorLogger;
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
#include "errortypes.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class Settings;
|
class Settings;
|
||||||
|
class ErrorLogger;
|
||||||
|
|
||||||
// CWE ID used:
|
// CWE ID used:
|
||||||
static const struct CWE CWE398(398U); // Indicator of Poor Code Quality
|
static const struct CWE CWE398(398U); // Indicator of Poor Code Quality
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#include "errortypes.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -34,6 +34,8 @@
|
||||||
|
|
||||||
class Token;
|
class Token;
|
||||||
class Tokenizer;
|
class Tokenizer;
|
||||||
|
class ErrorLogger;
|
||||||
|
|
||||||
namespace ValueFlow {
|
namespace ValueFlow {
|
||||||
class Value;
|
class Value;
|
||||||
} // namespace ValueFlow
|
} // namespace ValueFlow
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "checkinternal.h"
|
#include "checkinternal.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
#include "errortypes.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -33,6 +34,7 @@ class Settings;
|
||||||
class Token;
|
class Token;
|
||||||
class Tokenizer;
|
class Tokenizer;
|
||||||
class Variable;
|
class Variable;
|
||||||
|
class ErrorLogger;
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "checkmemoryleak.h" // <- CheckMemoryLeak::memoryLeak
|
#include "checkmemoryleak.h" // <- CheckMemoryLeak::memoryLeak
|
||||||
#include "checknullpointer.h" // <- CheckNullPointer::isPointerDeRef
|
#include "checknullpointer.h" // <- CheckNullPointer::isPointerDeRef
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#include "errortypes.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "checkmemoryleak.h"
|
#include "checkmemoryleak.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
|
#include "errorlogger.h"
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
|
@ -296,7 +297,7 @@ void CheckMemoryLeak::reportErr(const Token *tok, Severity::SeverityType severit
|
||||||
|
|
||||||
void CheckMemoryLeak::reportErr(const std::list<const Token *> &callstack, Severity::SeverityType severity, const std::string &id, const std::string &msg, const CWE &cwe) const
|
void CheckMemoryLeak::reportErr(const std::list<const Token *> &callstack, Severity::SeverityType severity, const std::string &id, const std::string &msg, const CWE &cwe) const
|
||||||
{
|
{
|
||||||
const ErrorLogger::ErrorMessage errmsg(callstack, mTokenizer_ ? &mTokenizer_->list : nullptr, severity, id, msg, cwe, false);
|
const ErrorMessage errmsg(callstack, mTokenizer_ ? &mTokenizer_->list : nullptr, severity, id, msg, cwe, false);
|
||||||
if (mErrorLogger_)
|
if (mErrorLogger_)
|
||||||
mErrorLogger_->reportErr(errmsg);
|
mErrorLogger_->reportErr(errmsg);
|
||||||
else
|
else
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
#include "errortypes.h"
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
@ -45,6 +45,7 @@ class Scope;
|
||||||
class Settings;
|
class Settings;
|
||||||
class Token;
|
class Token;
|
||||||
class Variable;
|
class Variable;
|
||||||
|
class ErrorLogger;
|
||||||
|
|
||||||
/// @addtogroup Core
|
/// @addtogroup Core
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -590,7 +590,7 @@ bool CheckNullPointer::analyseWholeProgram(const CTU::FileInfo *ctu, const std::
|
||||||
if (warning == 1 && !settings.isEnabled(Settings::WARNING))
|
if (warning == 1 && !settings.isEnabled(Settings::WARNING))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
const std::list<ErrorLogger::ErrorMessage::FileLocation> &locationList =
|
const std::list<ErrorMessage::FileLocation> &locationList =
|
||||||
ctu->getErrorPath(CTU::FileInfo::InvalidValueType::null,
|
ctu->getErrorPath(CTU::FileInfo::InvalidValueType::null,
|
||||||
unsafeUsage,
|
unsafeUsage,
|
||||||
callsMap,
|
callsMap,
|
||||||
|
@ -600,7 +600,7 @@ bool CheckNullPointer::analyseWholeProgram(const CTU::FileInfo *ctu, const std::
|
||||||
if (locationList.empty())
|
if (locationList.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const ErrorLogger::ErrorMessage errmsg(locationList,
|
const ErrorMessage errmsg(locationList,
|
||||||
emptyString,
|
emptyString,
|
||||||
warning ? Severity::warning : Severity::error,
|
warning ? Severity::warning : Severity::error,
|
||||||
"Null pointer dereference: " + unsafeUsage.myArgumentName,
|
"Null pointer dereference: " + unsafeUsage.myArgumentName,
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include "checkother.h"
|
#include "checkother.h"
|
||||||
|
|
||||||
#include "checkuninitvar.h" // CheckUninitVar::isVariableUsage
|
#include "checkuninitvar.h" // CheckUninitVar::isVariableUsage
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
#include "errortypes.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
@ -39,6 +39,7 @@ class Settings;
|
||||||
class Token;
|
class Token;
|
||||||
class Tokenizer;
|
class Tokenizer;
|
||||||
class Variable;
|
class Variable;
|
||||||
|
class ErrorLogger;
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
#include "checkpostfixoperator.h"
|
#include "checkpostfixoperator.h"
|
||||||
|
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include "checksizeof.h"
|
#include "checksizeof.h"
|
||||||
|
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
#include "checkstl.h"
|
#include "checkstl.h"
|
||||||
|
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
#include "errortypes.h"
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "valueflow.h"
|
#include "valueflow.h"
|
||||||
|
@ -35,6 +35,7 @@ class Scope;
|
||||||
class Settings;
|
class Settings;
|
||||||
class Token;
|
class Token;
|
||||||
class Variable;
|
class Variable;
|
||||||
|
class ErrorLogger;
|
||||||
|
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "checkstring.h"
|
#include "checkstring.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include "checktype.h"
|
#include "checktype.h"
|
||||||
|
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
|
@ -1440,7 +1440,7 @@ bool CheckUninitVar::analyseWholeProgram(const CTU::FileInfo *ctu, const std::li
|
||||||
for (const CTU::FileInfo::UnsafeUsage &unsafeUsage : fi->unsafeUsage) {
|
for (const CTU::FileInfo::UnsafeUsage &unsafeUsage : fi->unsafeUsage) {
|
||||||
const CTU::FileInfo::FunctionCall *functionCall = nullptr;
|
const CTU::FileInfo::FunctionCall *functionCall = nullptr;
|
||||||
|
|
||||||
const std::list<ErrorLogger::ErrorMessage::FileLocation> &locationList =
|
const std::list<ErrorMessage::FileLocation> &locationList =
|
||||||
ctu->getErrorPath(CTU::FileInfo::InvalidValueType::uninit,
|
ctu->getErrorPath(CTU::FileInfo::InvalidValueType::uninit,
|
||||||
unsafeUsage,
|
unsafeUsage,
|
||||||
callsMap,
|
callsMap,
|
||||||
|
@ -1450,7 +1450,7 @@ bool CheckUninitVar::analyseWholeProgram(const CTU::FileInfo *ctu, const std::li
|
||||||
if (locationList.empty())
|
if (locationList.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const ErrorLogger::ErrorMessage errmsg(locationList,
|
const ErrorMessage errmsg(locationList,
|
||||||
emptyString,
|
emptyString,
|
||||||
Severity::error,
|
Severity::error,
|
||||||
"Using argument " + unsafeUsage.myArgumentName + " that points at uninitialized variable " + functionCall->callArgumentExpression,
|
"Using argument " + unsafeUsage.myArgumentName + " that points at uninitialized variable " + functionCall->callArgumentExpression,
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "ctu.h"
|
#include "ctu.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#include "errortypes.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
@ -37,6 +37,7 @@ class Scope;
|
||||||
class Token;
|
class Token;
|
||||||
class Tokenizer;
|
class Tokenizer;
|
||||||
class Variable;
|
class Variable;
|
||||||
|
class ErrorLogger;
|
||||||
|
|
||||||
|
|
||||||
struct VariableValue {
|
struct VariableValue {
|
||||||
|
|
|
@ -328,15 +328,15 @@ void CheckUnusedFunctions::unusedFunctionError(ErrorLogger * const errorLogger,
|
||||||
const std::string &filename, unsigned int lineNumber,
|
const std::string &filename, unsigned int lineNumber,
|
||||||
const std::string &funcname)
|
const std::string &funcname)
|
||||||
{
|
{
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
std::list<ErrorMessage::FileLocation> locationList;
|
||||||
if (!filename.empty()) {
|
if (!filename.empty()) {
|
||||||
ErrorLogger::ErrorMessage::FileLocation fileLoc;
|
ErrorMessage::FileLocation fileLoc;
|
||||||
fileLoc.setfile(filename);
|
fileLoc.setfile(filename);
|
||||||
fileLoc.line = lineNumber;
|
fileLoc.line = lineNumber;
|
||||||
locationList.push_back(fileLoc);
|
locationList.push_back(fileLoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ErrorLogger::ErrorMessage errmsg(locationList, emptyString, Severity::style, "$symbol:" + funcname + "\nThe function '$symbol' is never used.", "unusedFunction", CWE561, false);
|
const ErrorMessage errmsg(locationList, emptyString, Severity::style, "$symbol:" + funcname + "\nThe function '$symbol' is never used.", "unusedFunction", CWE561, false);
|
||||||
if (errorLogger)
|
if (errorLogger)
|
||||||
errorLogger->reportErr(errmsg);
|
errorLogger->reportErr(errmsg);
|
||||||
else
|
else
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "checkunusedvar.h"
|
#include "checkunusedvar.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#include "checkvaarg.h"
|
#include "checkvaarg.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
|
@ -273,7 +273,7 @@ const char * CppCheck::extraVersion()
|
||||||
return ExtraVersion;
|
return ExtraVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool reportClangErrors(std::istream &is, std::function<void(const ErrorLogger::ErrorMessage&)> reportErr)
|
static bool reportClangErrors(std::istream &is, std::function<void(const ErrorMessage&)> reportErr)
|
||||||
{
|
{
|
||||||
std::string line;
|
std::string line;
|
||||||
while (std::getline(is, line)) {
|
while (std::getline(is, line)) {
|
||||||
|
@ -298,13 +298,13 @@ static bool reportClangErrors(std::istream &is, std::function<void(const ErrorLo
|
||||||
const std::string colnr = line.substr(pos2+1, pos3-pos2-1);
|
const std::string colnr = line.substr(pos2+1, pos3-pos2-1);
|
||||||
const std::string msg = line.substr(line.find(":", pos3+1) + 2);
|
const std::string msg = line.substr(line.find(":", pos3+1) + 2);
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
std::list<ErrorMessage::FileLocation> locationList;
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
ErrorMessage::FileLocation loc;
|
||||||
loc.setfile(Path::toNativeSeparators(filename));
|
loc.setfile(Path::toNativeSeparators(filename));
|
||||||
loc.line = std::atoi(linenr.c_str());
|
loc.line = std::atoi(linenr.c_str());
|
||||||
loc.column = std::atoi(colnr.c_str());
|
loc.column = std::atoi(colnr.c_str());
|
||||||
locationList.push_back(loc);
|
locationList.push_back(loc);
|
||||||
ErrorLogger::ErrorMessage errmsg(locationList,
|
ErrorMessage errmsg(locationList,
|
||||||
loc.getfile(),
|
loc.getfile(),
|
||||||
Severity::error,
|
Severity::error,
|
||||||
msg,
|
msg,
|
||||||
|
@ -377,14 +377,14 @@ unsigned int CppCheck::check(const std::string &path)
|
||||||
// Ensure there are not syntax errors...
|
// Ensure there are not syntax errors...
|
||||||
if (!mSettings.buildDir.empty()) {
|
if (!mSettings.buildDir.empty()) {
|
||||||
std::ifstream fin(clangStderr);
|
std::ifstream fin(clangStderr);
|
||||||
auto reportError = [this](const ErrorLogger::ErrorMessage& errorMessage) {
|
auto reportError = [this](const ErrorMessage& errorMessage) {
|
||||||
reportErr(errorMessage);
|
reportErr(errorMessage);
|
||||||
};
|
};
|
||||||
if (reportClangErrors(fin, reportError))
|
if (reportClangErrors(fin, reportError))
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
std::istringstream istr(output2);
|
std::istringstream istr(output2);
|
||||||
auto reportError = [this](const ErrorLogger::ErrorMessage& errorMessage) {
|
auto reportError = [this](const ErrorMessage& errorMessage) {
|
||||||
reportErr(errorMessage);
|
reportErr(errorMessage);
|
||||||
};
|
};
|
||||||
if (reportClangErrors(istr, reportError))
|
if (reportClangErrors(istr, reportError))
|
||||||
|
@ -500,10 +500,10 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
const ErrorLogger::ErrorMessage::FileLocation loc1(output.location.file(), output.location.line, output.location.col);
|
const ErrorMessage::FileLocation loc1(output.location.file(), output.location.line, output.location.col);
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> callstack(1, loc1);
|
std::list<ErrorMessage::FileLocation> callstack(1, loc1);
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack,
|
ErrorMessage errmsg(callstack,
|
||||||
"",
|
"",
|
||||||
Severity::error,
|
Severity::error,
|
||||||
output.msg,
|
output.msg,
|
||||||
|
@ -589,7 +589,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
|
||||||
|
|
||||||
// Calculate checksum so it can be compared with old checksum / future checksums
|
// Calculate checksum so it can be compared with old checksum / future checksums
|
||||||
const unsigned int checksum = preprocessor.calculateChecksum(tokens1, toolinfo.str());
|
const unsigned int checksum = preprocessor.calculateChecksum(tokens1, toolinfo.str());
|
||||||
std::list<ErrorLogger::ErrorMessage> errors;
|
std::list<ErrorMessage> errors;
|
||||||
if (!mAnalyzerInformation.analyzeFile(mSettings.buildDir, filename, cfgname, checksum, &errors)) {
|
if (!mAnalyzerInformation.analyzeFile(mSettings.buildDir, filename, cfgname, checksum, &errors)) {
|
||||||
while (!errors.empty()) {
|
while (!errors.empty()) {
|
||||||
reportErr(errors.front());
|
reportErr(errors.front());
|
||||||
|
@ -779,17 +779,17 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
} catch (const InternalError &e) {
|
} catch (const InternalError &e) {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
std::list<ErrorMessage::FileLocation> locationList;
|
||||||
if (e.token) {
|
if (e.token) {
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc(e.token, &mTokenizer.list);
|
ErrorMessage::FileLocation loc(e.token, &mTokenizer.list);
|
||||||
locationList.push_back(loc);
|
locationList.push_back(loc);
|
||||||
} else {
|
} else {
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc(mTokenizer.list.getSourceFilePath(), 0, 0);
|
ErrorMessage::FileLocation loc(mTokenizer.list.getSourceFilePath(), 0, 0);
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc2(filename, 0, 0);
|
ErrorMessage::FileLocation loc2(filename, 0, 0);
|
||||||
locationList.push_back(loc2);
|
locationList.push_back(loc2);
|
||||||
locationList.push_back(loc);
|
locationList.push_back(loc);
|
||||||
}
|
}
|
||||||
ErrorLogger::ErrorMessage errmsg(locationList,
|
ErrorMessage errmsg(locationList,
|
||||||
mTokenizer.list.getSourceFilePath(),
|
mTokenizer.list.getSourceFilePath(),
|
||||||
Severity::error,
|
Severity::error,
|
||||||
e.errorMessage,
|
e.errorMessage,
|
||||||
|
@ -808,11 +808,11 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
|
||||||
for (const std::string &s : configurationError)
|
for (const std::string &s : configurationError)
|
||||||
msg += '\n' + s;
|
msg += '\n' + s;
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
std::list<ErrorMessage::FileLocation> locationList;
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
ErrorMessage::FileLocation loc;
|
||||||
loc.setfile(Path::toNativeSeparators(filename));
|
loc.setfile(Path::toNativeSeparators(filename));
|
||||||
locationList.push_back(loc);
|
locationList.push_back(loc);
|
||||||
ErrorLogger::ErrorMessage errmsg(locationList,
|
ErrorMessage errmsg(locationList,
|
||||||
loc.getfile(),
|
loc.getfile(),
|
||||||
Severity::information,
|
Severity::information,
|
||||||
msg,
|
msg,
|
||||||
|
@ -857,9 +857,9 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
|
||||||
const int64_t lineNumber = obj["linenr"].get<int64_t>();
|
const int64_t lineNumber = obj["linenr"].get<int64_t>();
|
||||||
const int64_t column = obj["column"].get<int64_t>();
|
const int64_t column = obj["column"].get<int64_t>();
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage errmsg;
|
ErrorMessage errmsg;
|
||||||
|
|
||||||
errmsg.callStack.emplace_back(ErrorLogger::ErrorMessage::FileLocation(fileName, lineNumber, column));
|
errmsg.callStack.emplace_back(ErrorMessage::FileLocation(fileName, lineNumber, column));
|
||||||
|
|
||||||
errmsg.id = obj["addon"].get<std::string>() + "-" + obj["errorId"].get<std::string>();
|
errmsg.id = obj["addon"].get<std::string>() + "-" + obj["errorId"].get<std::string>();
|
||||||
const std::string text = obj["message"].get<std::string>();
|
const std::string text = obj["message"].get<std::string>();
|
||||||
|
@ -905,10 +905,10 @@ void CppCheck::internalError(const std::string &filename, const std::string &msg
|
||||||
const std::string fullmsg("Bailing out from checking " + fixedpath + " since there was an internal error: " + msg);
|
const std::string fullmsg("Bailing out from checking " + fixedpath + " since there was an internal error: " + msg);
|
||||||
|
|
||||||
if (mSettings.isEnabled(Settings::INFORMATION)) {
|
if (mSettings.isEnabled(Settings::INFORMATION)) {
|
||||||
const ErrorLogger::ErrorMessage::FileLocation loc1(filename, 0, 0);
|
const ErrorMessage::FileLocation loc1(filename, 0, 0);
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> callstack(1, loc1);
|
std::list<ErrorMessage::FileLocation> callstack(1, loc1);
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack,
|
ErrorMessage errmsg(callstack,
|
||||||
emptyString,
|
emptyString,
|
||||||
Severity::information,
|
Severity::information,
|
||||||
fullmsg,
|
fullmsg,
|
||||||
|
@ -1152,7 +1152,7 @@ void CppCheck::executeRules(const std::string &tokenlist, const Tokenizer &token
|
||||||
if (!re) {
|
if (!re) {
|
||||||
if (pcreCompileErrorStr) {
|
if (pcreCompileErrorStr) {
|
||||||
const std::string msg = "pcre_compile failed: " + std::string(pcreCompileErrorStr);
|
const std::string msg = "pcre_compile failed: " + std::string(pcreCompileErrorStr);
|
||||||
const ErrorLogger::ErrorMessage errmsg(std::list<ErrorLogger::ErrorMessage::FileLocation>(),
|
const ErrorMessage errmsg(std::list<ErrorMessage::FileLocation>(),
|
||||||
emptyString,
|
emptyString,
|
||||||
Severity::error,
|
Severity::error,
|
||||||
msg,
|
msg,
|
||||||
|
@ -1173,7 +1173,7 @@ void CppCheck::executeRules(const std::string &tokenlist, const Tokenizer &token
|
||||||
// It is NULL if everything works, and points to an error string otherwise.
|
// It is NULL if everything works, and points to an error string otherwise.
|
||||||
if (pcreStudyErrorStr) {
|
if (pcreStudyErrorStr) {
|
||||||
const std::string msg = "pcre_study failed: " + std::string(pcreStudyErrorStr);
|
const std::string msg = "pcre_study failed: " + std::string(pcreStudyErrorStr);
|
||||||
const ErrorLogger::ErrorMessage errmsg(std::list<ErrorLogger::ErrorMessage::FileLocation>(),
|
const ErrorMessage errmsg(std::list<ErrorMessage::FileLocation>(),
|
||||||
emptyString,
|
emptyString,
|
||||||
Severity::error,
|
Severity::error,
|
||||||
msg,
|
msg,
|
||||||
|
@ -1196,7 +1196,7 @@ void CppCheck::executeRules(const std::string &tokenlist, const Tokenizer &token
|
||||||
if (pcreExecRet < 0) {
|
if (pcreExecRet < 0) {
|
||||||
const std::string errorMessage = pcreErrorCodeToString(pcreExecRet);
|
const std::string errorMessage = pcreErrorCodeToString(pcreExecRet);
|
||||||
if (!errorMessage.empty()) {
|
if (!errorMessage.empty()) {
|
||||||
const ErrorLogger::ErrorMessage errmsg(std::list<ErrorLogger::ErrorMessage::FileLocation>(),
|
const ErrorMessage errmsg(std::list<ErrorMessage::FileLocation>(),
|
||||||
emptyString,
|
emptyString,
|
||||||
Severity::error,
|
Severity::error,
|
||||||
std::string("pcre_exec failed: ") + errorMessage,
|
std::string("pcre_exec failed: ") + errorMessage,
|
||||||
|
@ -1214,7 +1214,7 @@ void CppCheck::executeRules(const std::string &tokenlist, const Tokenizer &token
|
||||||
pos = (int)pos2;
|
pos = (int)pos2;
|
||||||
|
|
||||||
// determine location..
|
// determine location..
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
ErrorMessage::FileLocation loc;
|
||||||
loc.setfile(tokenizer.list.getSourceFilePath());
|
loc.setfile(tokenizer.list.getSourceFilePath());
|
||||||
loc.line = 0;
|
loc.line = 0;
|
||||||
|
|
||||||
|
@ -1228,7 +1228,7 @@ void CppCheck::executeRules(const std::string &tokenlist, const Tokenizer &token
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::list<ErrorLogger::ErrorMessage::FileLocation> callStack(1, loc);
|
const std::list<ErrorMessage::FileLocation> callStack(1, loc);
|
||||||
|
|
||||||
// Create error message
|
// Create error message
|
||||||
std::string summary;
|
std::string summary;
|
||||||
|
@ -1236,7 +1236,7 @@ void CppCheck::executeRules(const std::string &tokenlist, const Tokenizer &token
|
||||||
summary = "found '" + str.substr(pos1, pos2 - pos1) + "'";
|
summary = "found '" + str.substr(pos1, pos2 - pos1) + "'";
|
||||||
else
|
else
|
||||||
summary = rule.summary;
|
summary = rule.summary;
|
||||||
const ErrorLogger::ErrorMessage errmsg(callStack, tokenizer.list.getSourceFilePath(), rule.severity, summary, rule.id, false);
|
const ErrorMessage errmsg(callStack, tokenizer.list.getSourceFilePath(), rule.severity, summary, rule.id, false);
|
||||||
|
|
||||||
// Report error
|
// Report error
|
||||||
reportErr(errmsg);
|
reportErr(errmsg);
|
||||||
|
@ -1268,9 +1268,9 @@ void CppCheck::tooManyConfigsError(const std::string &file, const std::size_t nu
|
||||||
if (mSettings.isEnabled(Settings::INFORMATION) && file.empty())
|
if (mSettings.isEnabled(Settings::INFORMATION) && file.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> loclist;
|
std::list<ErrorMessage::FileLocation> loclist;
|
||||||
if (!file.empty()) {
|
if (!file.empty()) {
|
||||||
ErrorLogger::ErrorMessage::FileLocation location;
|
ErrorMessage::FileLocation location;
|
||||||
location.setfile(file);
|
location.setfile(file);
|
||||||
loclist.push_back(location);
|
loclist.push_back(location);
|
||||||
}
|
}
|
||||||
|
@ -1289,7 +1289,7 @@ void CppCheck::tooManyConfigsError(const std::string &file, const std::size_t nu
|
||||||
msg << " For more details, use --enable=information.";
|
msg << " For more details, use --enable=information.";
|
||||||
|
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage errmsg(loclist,
|
ErrorMessage errmsg(loclist,
|
||||||
emptyString,
|
emptyString,
|
||||||
Severity::information,
|
Severity::information,
|
||||||
msg.str(),
|
msg.str(),
|
||||||
|
@ -1306,14 +1306,14 @@ void CppCheck::purgedConfigurationMessage(const std::string &file, const std::st
|
||||||
if (mSettings.isEnabled(Settings::INFORMATION) && file.empty())
|
if (mSettings.isEnabled(Settings::INFORMATION) && file.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> loclist;
|
std::list<ErrorMessage::FileLocation> loclist;
|
||||||
if (!file.empty()) {
|
if (!file.empty()) {
|
||||||
ErrorLogger::ErrorMessage::FileLocation location;
|
ErrorMessage::FileLocation location;
|
||||||
location.setfile(file);
|
location.setfile(file);
|
||||||
loclist.push_back(location);
|
loclist.push_back(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage errmsg(loclist,
|
ErrorMessage errmsg(loclist,
|
||||||
emptyString,
|
emptyString,
|
||||||
Severity::information,
|
Severity::information,
|
||||||
"The configuration '" + configuration + "' was not checked because its code equals another one.",
|
"The configuration '" + configuration + "' was not checked because its code equals another one.",
|
||||||
|
@ -1325,7 +1325,7 @@ void CppCheck::purgedConfigurationMessage(const std::string &file, const std::st
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void CppCheck::reportErr(const ErrorLogger::ErrorMessage &msg)
|
void CppCheck::reportErr(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
mSuppressInternalErrorFound = false;
|
mSuppressInternalErrorFound = false;
|
||||||
|
|
||||||
|
@ -1377,7 +1377,7 @@ void CppCheck::reportProgress(const std::string &filename, const char stage[], c
|
||||||
mErrorLogger.reportProgress(filename, stage, value);
|
mErrorLogger.reportProgress(filename, stage, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppCheck::reportInfo(const ErrorLogger::ErrorMessage &msg)
|
void CppCheck::reportInfo(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
const Suppressions::ErrorMessage &errorMessage = msg.toSuppressionsErrorMessage();
|
const Suppressions::ErrorMessage &errorMessage = msg.toSuppressionsErrorMessage();
|
||||||
if (!mSettings.nomsg.isSuppressed(errorMessage))
|
if (!mSettings.nomsg.isSuppressed(errorMessage))
|
||||||
|
@ -1474,8 +1474,8 @@ void CppCheck::analyseClangTidy(const ImportProject::FileSettings &fileSettings)
|
||||||
const int64_t column = std::atol(columnNumString.c_str());
|
const int64_t column = std::atol(columnNumString.c_str());
|
||||||
fixedpath = Path::toNativeSeparators(fixedpath);
|
fixedpath = Path::toNativeSeparators(fixedpath);
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage errmsg;
|
ErrorMessage errmsg;
|
||||||
errmsg.callStack.emplace_back(ErrorLogger::ErrorMessage::FileLocation(fixedpath, lineNumber, column));
|
errmsg.callStack.emplace_back(ErrorMessage::FileLocation(fixedpath, lineNumber, column));
|
||||||
|
|
||||||
errmsg.id = "clang-tidy-" + errorString.substr(1, errorString.length() - 2);
|
errmsg.id = "clang-tidy-" + errorString.substr(1, errorString.length() - 2);
|
||||||
if (errmsg.id.find("performance") != std::string::npos)
|
if (errmsg.id.find("performance") != std::string::npos)
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <functional>
|
||||||
#include <istream>
|
#include <istream>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -191,7 +192,7 @@ private:
|
||||||
* "[filepath:line number] Message", e.g.
|
* "[filepath:line number] Message", e.g.
|
||||||
* "[main.cpp:4] Uninitialized member variable"
|
* "[main.cpp:4] Uninitialized member variable"
|
||||||
*/
|
*/
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) OVERRIDE;
|
void reportErr(const ErrorMessage &msg) OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Information about progress is directed here.
|
* @brief Information about progress is directed here.
|
||||||
|
@ -210,7 +211,7 @@ private:
|
||||||
/**
|
/**
|
||||||
* Output information messages.
|
* Output information messages.
|
||||||
*/
|
*/
|
||||||
void reportInfo(const ErrorLogger::ErrorMessage &msg) OVERRIDE;
|
void reportInfo(const ErrorMessage &msg) OVERRIDE;
|
||||||
|
|
||||||
ErrorLogger &mErrorLogger;
|
ErrorLogger &mErrorLogger;
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@
|
||||||
<ClCompile Include="cppcheck.cpp" />
|
<ClCompile Include="cppcheck.cpp" />
|
||||||
<ClCompile Include="ctu.cpp" />
|
<ClCompile Include="ctu.cpp" />
|
||||||
<ClCompile Include="errorlogger.cpp" />
|
<ClCompile Include="errorlogger.cpp" />
|
||||||
|
<ClCompile Include="errortypes.cpp" />
|
||||||
<ClCompile Include="exprengine.cpp" />
|
<ClCompile Include="exprengine.cpp" />
|
||||||
<ClCompile Include="library.cpp" />
|
<ClCompile Include="library.cpp" />
|
||||||
<ClCompile Include="mathlib.cpp" />
|
<ClCompile Include="mathlib.cpp" />
|
||||||
|
|
|
@ -59,6 +59,9 @@
|
||||||
<ClCompile Include="errorlogger.cpp">
|
<ClCompile Include="errorlogger.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="errortypes.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="mathlib.cpp">
|
<ClCompile Include="mathlib.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
16
lib/ctu.cpp
16
lib/ctu.cpp
|
@ -22,6 +22,8 @@
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
|
#include "tokenize.h"
|
||||||
|
|
||||||
#include <tinyxml2.h>
|
#include <tinyxml2.h>
|
||||||
#include <iterator> // back_inserter
|
#include <iterator> // back_inserter
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -99,7 +101,7 @@ std::string CTU::FileInfo::FunctionCall::toXmlString() const
|
||||||
out << "/>";
|
out << "/>";
|
||||||
else {
|
else {
|
||||||
out << ">\n";
|
out << ">\n";
|
||||||
for (const ErrorLogger::ErrorMessage::FileLocation &loc : callValuePath)
|
for (const ErrorMessage::FileLocation &loc : callValuePath)
|
||||||
out << " <path"
|
out << " <path"
|
||||||
<< " " << ATTR_LOC_FILENAME << "=\"" << loc.getfile() << "\""
|
<< " " << ATTR_LOC_FILENAME << "=\"" << loc.getfile() << "\""
|
||||||
<< " " << ATTR_LOC_LINENR << "=\"" << loc.line << "\""
|
<< " " << ATTR_LOC_LINENR << "=\"" << loc.line << "\""
|
||||||
|
@ -200,7 +202,7 @@ bool CTU::FileInfo::FunctionCall::loadFromXml(const tinyxml2::XMLElement *xmlEle
|
||||||
for (const tinyxml2::XMLElement *e2 = xmlElement->FirstChildElement(); !error && e2; e2 = e2->NextSiblingElement()) {
|
for (const tinyxml2::XMLElement *e2 = xmlElement->FirstChildElement(); !error && e2; e2 = e2->NextSiblingElement()) {
|
||||||
if (std::strcmp(e2->Name(), "path") != 0)
|
if (std::strcmp(e2->Name(), "path") != 0)
|
||||||
continue;
|
continue;
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
ErrorMessage::FileLocation loc;
|
||||||
loc.setfile(readAttrString(e2, ATTR_LOC_FILENAME, &error));
|
loc.setfile(readAttrString(e2, ATTR_LOC_FILENAME, &error));
|
||||||
loc.line = readAttrInt(e2, ATTR_LOC_LINENR, &error);
|
loc.line = readAttrInt(e2, ATTR_LOC_LINENR, &error);
|
||||||
loc.column = readAttrInt(e2, ATTR_LOC_COLUMN, &error);
|
loc.column = readAttrInt(e2, ATTR_LOC_COLUMN, &error);
|
||||||
|
@ -335,7 +337,7 @@ CTU::FileInfo *CTU::getFileInfo(const Tokenizer *tokenizer)
|
||||||
functionCall.callArgValue = value.intvalue;
|
functionCall.callArgValue = value.intvalue;
|
||||||
functionCall.warning = !value.errorSeverity();
|
functionCall.warning = !value.errorSeverity();
|
||||||
for (const ErrorPathItem &i : value.errorPath) {
|
for (const ErrorPathItem &i : value.errorPath) {
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
ErrorMessage::FileLocation loc;
|
||||||
loc.setfile(tokenizer->list.file(i.first));
|
loc.setfile(tokenizer->list.file(i.first));
|
||||||
loc.line = i.first->linenr();
|
loc.line = i.first->linenr();
|
||||||
loc.column = i.first->column();
|
loc.column = i.first->column();
|
||||||
|
@ -522,14 +524,14 @@ static bool findPath(const std::string &callId,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> CTU::FileInfo::getErrorPath(InvalidValueType invalidValue,
|
std::list<ErrorMessage::FileLocation> CTU::FileInfo::getErrorPath(InvalidValueType invalidValue,
|
||||||
const CTU::FileInfo::UnsafeUsage &unsafeUsage,
|
const CTU::FileInfo::UnsafeUsage &unsafeUsage,
|
||||||
const std::map<std::string, std::list<const CTU::FileInfo::CallBase *>> &callsMap,
|
const std::map<std::string, std::list<const CTU::FileInfo::CallBase *>> &callsMap,
|
||||||
const char info[],
|
const char info[],
|
||||||
const FunctionCall * * const functionCallPtr,
|
const FunctionCall * * const functionCallPtr,
|
||||||
bool warning) const
|
bool warning) const
|
||||||
{
|
{
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
std::list<ErrorMessage::FileLocation> locationList;
|
||||||
|
|
||||||
const CTU::FileInfo::CallBase *path[10] = {nullptr};
|
const CTU::FileInfo::CallBase *path[10] = {nullptr};
|
||||||
|
|
||||||
|
@ -550,12 +552,12 @@ std::list<ErrorLogger::ErrorMessage::FileLocation> CTU::FileInfo::getErrorPath(I
|
||||||
std::copy(functionCall->callValuePath.cbegin(), functionCall->callValuePath.cend(), std::back_inserter(locationList));
|
std::copy(functionCall->callValuePath.cbegin(), functionCall->callValuePath.cend(), std::back_inserter(locationList));
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::FileLocation fileLoc(path[index]->location.fileName, path[index]->location.lineNumber, path[index]->location.column);
|
ErrorMessage::FileLocation fileLoc(path[index]->location.fileName, path[index]->location.lineNumber, path[index]->location.column);
|
||||||
fileLoc.setinfo("Calling function " + path[index]->callFunctionName + ", " + MathLib::toString(path[index]->callArgNr) + getOrdinalText(path[index]->callArgNr) + " argument is " + value1);
|
fileLoc.setinfo("Calling function " + path[index]->callFunctionName + ", " + MathLib::toString(path[index]->callArgNr) + getOrdinalText(path[index]->callArgNr) + " argument is " + value1);
|
||||||
locationList.push_back(fileLoc);
|
locationList.push_back(fileLoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::FileLocation fileLoc2(unsafeUsage.location.fileName, unsafeUsage.location.lineNumber, unsafeUsage.location.column);
|
ErrorMessage::FileLocation fileLoc2(unsafeUsage.location.fileName, unsafeUsage.location.lineNumber, unsafeUsage.location.column);
|
||||||
fileLoc2.setinfo(replaceStr(info, "ARG", unsafeUsage.myArgumentName));
|
fileLoc2.setinfo(replaceStr(info, "ARG", unsafeUsage.myArgumentName));
|
||||||
locationList.push_back(fileLoc2);
|
locationList.push_back(fileLoc2);
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,13 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
#include "errorlogger.h"
|
||||||
#include "valueflow.h"
|
#include "valueflow.h"
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
class Function;
|
||||||
|
|
||||||
/// @addtogroup Core
|
/// @addtogroup Core
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
|
@ -79,7 +84,7 @@ namespace CTU {
|
||||||
std::string callArgumentExpression;
|
std::string callArgumentExpression;
|
||||||
MathLib::bigint callArgValue;
|
MathLib::bigint callArgValue;
|
||||||
ValueFlow::Value::ValueType callValueType;
|
ValueFlow::Value::ValueType callValueType;
|
||||||
std::vector<ErrorLogger::ErrorMessage::FileLocation> callValuePath;
|
std::vector<ErrorMessage::FileLocation> callValuePath;
|
||||||
bool warning;
|
bool warning;
|
||||||
|
|
||||||
std::string toXmlString() const;
|
std::string toXmlString() const;
|
||||||
|
@ -111,7 +116,7 @@ namespace CTU {
|
||||||
void loadFromXml(const tinyxml2::XMLElement *xmlElement);
|
void loadFromXml(const tinyxml2::XMLElement *xmlElement);
|
||||||
std::map<std::string, std::list<const CallBase *>> getCallsMap() const;
|
std::map<std::string, std::list<const CallBase *>> getCallsMap() const;
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> getErrorPath(InvalidValueType invalidValue,
|
std::list<ErrorMessage::FileLocation> getErrorPath(InvalidValueType invalidValue,
|
||||||
const UnsafeUsage &unsafeUsage,
|
const UnsafeUsage &unsafeUsage,
|
||||||
const std::map<std::string, std::list<const CallBase *>> &callsMap,
|
const std::map<std::string, std::list<const CallBase *>> &callsMap,
|
||||||
const char info[],
|
const char info[],
|
||||||
|
|
|
@ -58,57 +58,12 @@ InternalError::InternalError(const Token *tok, const std::string &errorMsg, Type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Severity::toString(Severity::SeverityType severity)
|
ErrorMessage::ErrorMessage()
|
||||||
{
|
|
||||||
switch (severity) {
|
|
||||||
case none:
|
|
||||||
return "";
|
|
||||||
case error:
|
|
||||||
return "error";
|
|
||||||
case warning:
|
|
||||||
return "warning";
|
|
||||||
case style:
|
|
||||||
return "style";
|
|
||||||
case performance:
|
|
||||||
return "performance";
|
|
||||||
case portability:
|
|
||||||
return "portability";
|
|
||||||
case information:
|
|
||||||
return "information";
|
|
||||||
case debug:
|
|
||||||
return "debug";
|
|
||||||
}
|
|
||||||
throw InternalError(nullptr, "Unknown severity");
|
|
||||||
}
|
|
||||||
Severity::SeverityType Severity::fromString(const std::string& severity)
|
|
||||||
{
|
|
||||||
if (severity.empty())
|
|
||||||
return none;
|
|
||||||
if (severity == "none")
|
|
||||||
return none;
|
|
||||||
if (severity == "error")
|
|
||||||
return error;
|
|
||||||
if (severity == "warning")
|
|
||||||
return warning;
|
|
||||||
if (severity == "style")
|
|
||||||
return style;
|
|
||||||
if (severity == "performance")
|
|
||||||
return performance;
|
|
||||||
if (severity == "portability")
|
|
||||||
return portability;
|
|
||||||
if (severity == "information")
|
|
||||||
return information;
|
|
||||||
if (severity == "debug")
|
|
||||||
return debug;
|
|
||||||
return none;
|
|
||||||
}
|
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::ErrorMessage()
|
|
||||||
: incomplete(false), severity(Severity::none), cwe(0U), inconclusive(false)
|
: incomplete(false), severity(Severity::none), cwe(0U), inconclusive(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::ErrorMessage(const std::list<FileLocation> &callStack, const std::string& file1, Severity::SeverityType severity, const std::string &msg, const std::string &id, bool inconclusive) :
|
ErrorMessage::ErrorMessage(const std::list<FileLocation> &callStack, const std::string& file1, Severity::SeverityType severity, const std::string &msg, const std::string &id, bool inconclusive) :
|
||||||
callStack(callStack), // locations for this error message
|
callStack(callStack), // locations for this error message
|
||||||
id(id), // set the message id
|
id(id), // set the message id
|
||||||
file0(file1),
|
file0(file1),
|
||||||
|
@ -123,7 +78,7 @@ ErrorLogger::ErrorMessage::ErrorMessage(const std::list<FileLocation> &callStack
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::ErrorMessage(const std::list<FileLocation> &callStack, const std::string& file1, Severity::SeverityType severity, const std::string &msg, const std::string &id, const CWE &cwe, bool inconclusive) :
|
ErrorMessage::ErrorMessage(const std::list<FileLocation> &callStack, const std::string& file1, Severity::SeverityType severity, const std::string &msg, const std::string &id, const CWE &cwe, bool inconclusive) :
|
||||||
callStack(callStack), // locations for this error message
|
callStack(callStack), // locations for this error message
|
||||||
id(id), // set the message id
|
id(id), // set the message id
|
||||||
file0(file1),
|
file0(file1),
|
||||||
|
@ -136,7 +91,7 @@ ErrorLogger::ErrorMessage::ErrorMessage(const std::list<FileLocation> &callStack
|
||||||
setmsg(msg);
|
setmsg(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::ErrorMessage(const std::list<const Token*>& callstack, const TokenList* list, Severity::SeverityType severity, const std::string& id, const std::string& msg, bool inconclusive)
|
ErrorMessage::ErrorMessage(const std::list<const Token*>& callstack, const TokenList* list, Severity::SeverityType severity, const std::string& id, const std::string& msg, bool inconclusive)
|
||||||
: id(id), incomplete(false), severity(severity), cwe(0U), inconclusive(inconclusive)
|
: id(id), incomplete(false), severity(severity), cwe(0U), inconclusive(inconclusive)
|
||||||
{
|
{
|
||||||
// Format callstack
|
// Format callstack
|
||||||
|
@ -155,7 +110,7 @@ ErrorLogger::ErrorMessage::ErrorMessage(const std::list<const Token*>& callstack
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::ErrorMessage(const std::list<const Token*>& callstack, const TokenList* list, Severity::SeverityType severity, const std::string& id, const std::string& msg, const CWE &cwe, bool inconclusive)
|
ErrorMessage::ErrorMessage(const std::list<const Token*>& callstack, const TokenList* list, Severity::SeverityType severity, const std::string& id, const std::string& msg, const CWE &cwe, bool inconclusive)
|
||||||
: id(id), incomplete(false), severity(severity), cwe(cwe.id), inconclusive(inconclusive)
|
: id(id), incomplete(false), severity(severity), cwe(cwe.id), inconclusive(inconclusive)
|
||||||
{
|
{
|
||||||
// Format callstack
|
// Format callstack
|
||||||
|
@ -173,7 +128,7 @@ ErrorLogger::ErrorMessage::ErrorMessage(const std::list<const Token*>& callstack
|
||||||
setmsg(msg);
|
setmsg(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::ErrorMessage(const ErrorPath &errorPath, const TokenList *tokenList, Severity::SeverityType severity, const char id[], const std::string &msg, const CWE &cwe, bool inconclusive)
|
ErrorMessage::ErrorMessage(const ErrorPath &errorPath, const TokenList *tokenList, Severity::SeverityType severity, const char id[], const std::string &msg, const CWE &cwe, bool inconclusive)
|
||||||
: id(id), incomplete(false), severity(severity), cwe(cwe.id), inconclusive(inconclusive)
|
: id(id), incomplete(false), severity(severity), cwe(cwe.id), inconclusive(inconclusive)
|
||||||
{
|
{
|
||||||
// Format callstack
|
// Format callstack
|
||||||
|
@ -192,7 +147,7 @@ ErrorLogger::ErrorMessage::ErrorMessage(const ErrorPath &errorPath, const TokenL
|
||||||
setmsg(msg);
|
setmsg(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::ErrorMessage(const tinyxml2::XMLElement * const errmsg)
|
ErrorMessage::ErrorMessage(const tinyxml2::XMLElement * const errmsg)
|
||||||
: incomplete(false),
|
: incomplete(false),
|
||||||
severity(Severity::none),
|
severity(Severity::none),
|
||||||
cwe(0U),
|
cwe(0U),
|
||||||
|
@ -234,7 +189,7 @@ ErrorLogger::ErrorMessage::ErrorMessage(const tinyxml2::XMLElement * const errms
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorLogger::ErrorMessage::setmsg(const std::string &msg)
|
void ErrorMessage::setmsg(const std::string &msg)
|
||||||
{
|
{
|
||||||
// If a message ends to a '\n' and contains only a one '\n'
|
// If a message ends to a '\n' and contains only a one '\n'
|
||||||
// it will cause the mVerboseMessage to be empty which will show
|
// it will cause the mVerboseMessage to be empty which will show
|
||||||
|
@ -260,7 +215,7 @@ void ErrorLogger::ErrorMessage::setmsg(const std::string &msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Suppressions::ErrorMessage ErrorLogger::ErrorMessage::toSuppressionsErrorMessage() const
|
Suppressions::ErrorMessage ErrorMessage::toSuppressionsErrorMessage() const
|
||||||
{
|
{
|
||||||
Suppressions::ErrorMessage ret;
|
Suppressions::ErrorMessage ret;
|
||||||
ret.errorId = id;
|
ret.errorId = id;
|
||||||
|
@ -274,7 +229,7 @@ Suppressions::ErrorMessage ErrorLogger::ErrorMessage::toSuppressionsErrorMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string ErrorLogger::ErrorMessage::serialize() const
|
std::string ErrorMessage::serialize() const
|
||||||
{
|
{
|
||||||
// Serialize this message into a simple string
|
// Serialize this message into a simple string
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
|
@ -293,7 +248,7 @@ std::string ErrorLogger::ErrorMessage::serialize() const
|
||||||
oss << saneVerboseMessage.length() << " " << saneVerboseMessage;
|
oss << saneVerboseMessage.length() << " " << saneVerboseMessage;
|
||||||
oss << callStack.size() << " ";
|
oss << callStack.size() << " ";
|
||||||
|
|
||||||
for (std::list<ErrorLogger::ErrorMessage::FileLocation>::const_iterator loc = callStack.begin(); loc != callStack.end(); ++loc) {
|
for (std::list<ErrorMessage::FileLocation>::const_iterator loc = callStack.begin(); loc != callStack.end(); ++loc) {
|
||||||
std::ostringstream smallStream;
|
std::ostringstream smallStream;
|
||||||
smallStream << (*loc).line << '\t' << (*loc).column << '\t' << (*loc).getfile(false) << '\t' << loc->getOrigFile(false) << '\t' << loc->getinfo();
|
smallStream << (*loc).line << '\t' << (*loc).column << '\t' << (*loc).getfile(false) << '\t' << loc->getOrigFile(false) << '\t' << loc->getinfo();
|
||||||
oss << smallStream.str().length() << " " << smallStream.str();
|
oss << smallStream.str().length() << " " << smallStream.str();
|
||||||
|
@ -302,7 +257,7 @@ std::string ErrorLogger::ErrorMessage::serialize() const
|
||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ErrorLogger::ErrorMessage::deserialize(const std::string &data)
|
bool ErrorMessage::deserialize(const std::string &data)
|
||||||
{
|
{
|
||||||
inconclusive = false;
|
inconclusive = false;
|
||||||
callStack.clear();
|
callStack.clear();
|
||||||
|
@ -376,7 +331,7 @@ bool ErrorLogger::ErrorMessage::deserialize(const std::string &data)
|
||||||
|
|
||||||
// (*loc).line << '\t' << (*loc).column << '\t' << (*loc).getfile(false) << '\t' << loc->getOrigFile(false) << '\t' << loc->getinfo();
|
// (*loc).line << '\t' << (*loc).column << '\t' << (*loc).getfile(false) << '\t' << loc->getOrigFile(false) << '\t' << loc->getinfo();
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc(substrings[3], MathLib::toLongNumber(substrings[0]), MathLib::toLongNumber(substrings[1]));
|
ErrorMessage::FileLocation loc(substrings[3], MathLib::toLongNumber(substrings[0]), MathLib::toLongNumber(substrings[1]));
|
||||||
loc.setfile(substrings[2]);
|
loc.setfile(substrings[2]);
|
||||||
if (substrings.size() == 5)
|
if (substrings.size() == 5)
|
||||||
loc.setinfo(substrings[4]);
|
loc.setinfo(substrings[4]);
|
||||||
|
@ -390,7 +345,7 @@ bool ErrorLogger::ErrorMessage::deserialize(const std::string &data)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ErrorLogger::ErrorMessage::getXMLHeader()
|
std::string ErrorMessage::getXMLHeader()
|
||||||
{
|
{
|
||||||
// xml_version 1 is the default xml format
|
// xml_version 1 is the default xml format
|
||||||
|
|
||||||
|
@ -411,14 +366,14 @@ std::string ErrorLogger::ErrorMessage::getXMLHeader()
|
||||||
return std::string(printer.CStr()) + '>';
|
return std::string(printer.CStr()) + '>';
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ErrorLogger::ErrorMessage::getXMLFooter()
|
std::string ErrorMessage::getXMLFooter()
|
||||||
{
|
{
|
||||||
return " </errors>\n</results>";
|
return " </errors>\n</results>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// There is no utf-8 support around but the strings should at least be safe for to tinyxml2.
|
// There is no utf-8 support around but the strings should at least be safe for to tinyxml2.
|
||||||
// See #5300 "Invalid encoding in XML output" and #6431 "Invalid XML created - Invalid encoding of string literal "
|
// See #5300 "Invalid encoding in XML output" and #6431 "Invalid XML created - Invalid encoding of string literal "
|
||||||
std::string ErrorLogger::ErrorMessage::fixInvalidChars(const std::string& raw)
|
std::string ErrorMessage::fixInvalidChars(const std::string& raw)
|
||||||
{
|
{
|
||||||
std::string result;
|
std::string result;
|
||||||
result.reserve(raw.length());
|
result.reserve(raw.length());
|
||||||
|
@ -438,7 +393,7 @@ std::string ErrorLogger::ErrorMessage::fixInvalidChars(const std::string& raw)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ErrorLogger::ErrorMessage::toXML() const
|
std::string ErrorMessage::toXML() const
|
||||||
{
|
{
|
||||||
tinyxml2::XMLPrinter printer(nullptr, false, 2);
|
tinyxml2::XMLPrinter printer(nullptr, false, 2);
|
||||||
printer.OpenElement("error", false);
|
printer.OpenElement("error", false);
|
||||||
|
@ -480,7 +435,7 @@ std::string ErrorLogger::ErrorMessage::toXML() const
|
||||||
return printer.CStr();
|
return printer.CStr();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorLogger::ErrorMessage::findAndReplace(std::string &source, const std::string &searchFor, const std::string &replaceWith)
|
void ErrorMessage::findAndReplace(std::string &source, const std::string &searchFor, const std::string &replaceWith)
|
||||||
{
|
{
|
||||||
std::string::size_type index = 0;
|
std::string::size_type index = 0;
|
||||||
while ((index = source.find(searchFor, index)) != std::string::npos) {
|
while ((index = source.find(searchFor, index)) != std::string::npos) {
|
||||||
|
@ -506,7 +461,7 @@ static std::string readCode(const std::string &file, int linenr, int column, con
|
||||||
return line + endl + std::string((column>0 ? column-1 : column), ' ') + '^';
|
return line + endl + std::string((column>0 ? column-1 : column), ' ') + '^';
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ErrorLogger::ErrorMessage::toString(bool verbose, const std::string &templateFormat, const std::string &templateLocation) const
|
std::string ErrorMessage::toString(bool verbose, const std::string &templateFormat, const std::string &templateLocation) const
|
||||||
{
|
{
|
||||||
// Save this ErrorMessage in plain text.
|
// Save this ErrorMessage in plain text.
|
||||||
|
|
||||||
|
@ -514,7 +469,7 @@ std::string ErrorLogger::ErrorMessage::toString(bool verbose, const std::string
|
||||||
if (templateFormat.empty()) {
|
if (templateFormat.empty()) {
|
||||||
std::ostringstream text;
|
std::ostringstream text;
|
||||||
if (!callStack.empty())
|
if (!callStack.empty())
|
||||||
text << callStackToString(callStack) << ": ";
|
text << ErrorLogger::callStackToString(callStack) << ": ";
|
||||||
if (severity != Severity::none) {
|
if (severity != Severity::none) {
|
||||||
text << '(' << Severity::toString(severity);
|
text << '(' << Severity::toString(severity);
|
||||||
if (inconclusive)
|
if (inconclusive)
|
||||||
|
@ -545,7 +500,7 @@ std::string ErrorLogger::ErrorMessage::toString(bool verbose, const std::string
|
||||||
findAndReplace(result, "{severity}", Severity::toString(severity));
|
findAndReplace(result, "{severity}", Severity::toString(severity));
|
||||||
findAndReplace(result, "{cwe}", MathLib::toString(cwe.id));
|
findAndReplace(result, "{cwe}", MathLib::toString(cwe.id));
|
||||||
findAndReplace(result, "{message}", verbose ? mVerboseMessage : mShortMessage);
|
findAndReplace(result, "{message}", verbose ? mVerboseMessage : mShortMessage);
|
||||||
findAndReplace(result, "{callstack}", callStack.empty() ? emptyString : callStackToString(callStack));
|
findAndReplace(result, "{callstack}", callStack.empty() ? emptyString : ErrorLogger::callStackToString(callStack));
|
||||||
if (!callStack.empty()) {
|
if (!callStack.empty()) {
|
||||||
findAndReplace(result, "{file}", callStack.back().getfile());
|
findAndReplace(result, "{file}", callStack.back().getfile());
|
||||||
findAndReplace(result, "{line}", MathLib::toString(callStack.back().line));
|
findAndReplace(result, "{line}", MathLib::toString(callStack.back().line));
|
||||||
|
@ -623,57 +578,57 @@ bool ErrorLogger::reportUnmatchedSuppressions(const std::list<Suppressions::Supp
|
||||||
if (suppressed)
|
if (suppressed)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> callStack;
|
std::list<ErrorMessage::FileLocation> callStack;
|
||||||
if (!s.fileName.empty())
|
if (!s.fileName.empty())
|
||||||
callStack.emplace_back(s.fileName, s.lineNumber, 0);
|
callStack.emplace_back(s.fileName, s.lineNumber, 0);
|
||||||
reportErr(ErrorLogger::ErrorMessage(callStack, emptyString, Severity::information, "Unmatched suppression: " + s.errorId, "unmatchedSuppression", false));
|
reportErr(ErrorMessage(callStack, emptyString, Severity::information, "Unmatched suppression: " + s.errorId, "unmatchedSuppression", false));
|
||||||
err = true;
|
err = true;
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ErrorLogger::callStackToString(const std::list<ErrorLogger::ErrorMessage::FileLocation> &callStack)
|
std::string ErrorLogger::callStackToString(const std::list<ErrorMessage::FileLocation> &callStack)
|
||||||
{
|
{
|
||||||
std::ostringstream ostr;
|
std::ostringstream ostr;
|
||||||
for (std::list<ErrorLogger::ErrorMessage::FileLocation>::const_iterator tok = callStack.begin(); tok != callStack.end(); ++tok) {
|
for (std::list<ErrorMessage::FileLocation>::const_iterator tok = callStack.begin(); tok != callStack.end(); ++tok) {
|
||||||
ostr << (tok == callStack.begin() ? "" : " -> ") << tok->stringify();
|
ostr << (tok == callStack.begin() ? "" : " -> ") << tok->stringify();
|
||||||
}
|
}
|
||||||
return ostr.str();
|
return ostr.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::FileLocation::FileLocation(const Token* tok, const TokenList* tokenList)
|
ErrorMessage::FileLocation::FileLocation(const Token* tok, const TokenList* tokenList)
|
||||||
: fileIndex(tok->fileIndex()), line(tok->linenr()), column(tok->column()), mOrigFileName(tokenList->getOrigFile(tok)), mFileName(tokenList->file(tok))
|
: fileIndex(tok->fileIndex()), line(tok->linenr()), column(tok->column()), mOrigFileName(tokenList->getOrigFile(tok)), mFileName(tokenList->file(tok))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::FileLocation::FileLocation(const Token* tok, const std::string &info, const TokenList* tokenList)
|
ErrorMessage::FileLocation::FileLocation(const Token* tok, const std::string &info, const TokenList* tokenList)
|
||||||
: fileIndex(tok->fileIndex()), line(tok->linenr()), column(tok->column()), mOrigFileName(tokenList->getOrigFile(tok)), mFileName(tokenList->file(tok)), mInfo(info)
|
: fileIndex(tok->fileIndex()), line(tok->linenr()), column(tok->column()), mOrigFileName(tokenList->getOrigFile(tok)), mFileName(tokenList->file(tok)), mInfo(info)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ErrorLogger::ErrorMessage::FileLocation::getfile(bool convert) const
|
std::string ErrorMessage::FileLocation::getfile(bool convert) const
|
||||||
{
|
{
|
||||||
if (convert)
|
if (convert)
|
||||||
return Path::toNativeSeparators(mFileName);
|
return Path::toNativeSeparators(mFileName);
|
||||||
return mFileName;
|
return mFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ErrorLogger::ErrorMessage::FileLocation::getOrigFile(bool convert) const
|
std::string ErrorMessage::FileLocation::getOrigFile(bool convert) const
|
||||||
{
|
{
|
||||||
if (convert)
|
if (convert)
|
||||||
return Path::toNativeSeparators(mOrigFileName);
|
return Path::toNativeSeparators(mOrigFileName);
|
||||||
return mOrigFileName;
|
return mOrigFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorLogger::ErrorMessage::FileLocation::setfile(const std::string &file)
|
void ErrorMessage::FileLocation::setfile(const std::string &file)
|
||||||
{
|
{
|
||||||
mFileName = file;
|
mFileName = file;
|
||||||
mFileName = Path::fromNativeSeparators(mFileName);
|
mFileName = Path::fromNativeSeparators(mFileName);
|
||||||
mFileName = Path::simplifyPath(mFileName);
|
mFileName = Path::simplifyPath(mFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ErrorLogger::ErrorMessage::FileLocation::stringify() const
|
std::string ErrorMessage::FileLocation::stringify() const
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << '[' << Path::toNativeSeparators(mFileName);
|
oss << '[' << Path::toNativeSeparators(mFileName);
|
||||||
|
@ -733,7 +688,7 @@ std::string ErrorLogger::plistHeader(const std::string &version, const std::vect
|
||||||
return ostr.str();
|
return ostr.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string plistLoc(const char indent[], const ErrorLogger::ErrorMessage::FileLocation &loc)
|
static std::string plistLoc(const char indent[], const ErrorMessage::FileLocation &loc)
|
||||||
{
|
{
|
||||||
std::ostringstream ostr;
|
std::ostringstream ostr;
|
||||||
ostr << indent << "<dict>\r\n"
|
ostr << indent << "<dict>\r\n"
|
||||||
|
@ -744,16 +699,16 @@ static std::string plistLoc(const char indent[], const ErrorLogger::ErrorMessage
|
||||||
return ostr.str();
|
return ostr.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ErrorLogger::plistData(const ErrorLogger::ErrorMessage &msg)
|
std::string ErrorLogger::plistData(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
std::ostringstream plist;
|
std::ostringstream plist;
|
||||||
plist << " <dict>\r\n"
|
plist << " <dict>\r\n"
|
||||||
<< " <key>path</key>\r\n"
|
<< " <key>path</key>\r\n"
|
||||||
<< " <array>\r\n";
|
<< " <array>\r\n";
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation>::const_iterator prev = msg.callStack.begin();
|
std::list<ErrorMessage::FileLocation>::const_iterator prev = msg.callStack.begin();
|
||||||
|
|
||||||
for (std::list<ErrorLogger::ErrorMessage::FileLocation>::const_iterator it = msg.callStack.begin(); it != msg.callStack.end(); ++it) {
|
for (std::list<ErrorMessage::FileLocation>::const_iterator it = msg.callStack.begin(); it != msg.callStack.end(); ++it) {
|
||||||
if (prev != it) {
|
if (prev != it) {
|
||||||
plist << " <dict>\r\n"
|
plist << " <dict>\r\n"
|
||||||
<< " <key>kind</key><string>control</string>\r\n"
|
<< " <key>kind</key><string>control</string>\r\n"
|
||||||
|
@ -776,7 +731,7 @@ std::string ErrorLogger::plistData(const ErrorLogger::ErrorMessage &msg)
|
||||||
prev = it;
|
prev = it;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation>::const_iterator next = it;
|
std::list<ErrorMessage::FileLocation>::const_iterator next = it;
|
||||||
++next;
|
++next;
|
||||||
const std::string message = (it->getinfo().empty() && next == msg.callStack.end() ? msg.shortMessage() : it->getinfo());
|
const std::string message = (it->getinfo().empty() && next == msg.callStack.end() ? msg.shortMessage() : it->getinfo());
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "errortypes.h"
|
||||||
#include "suppressions.h"
|
#include "suppressions.h"
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
@ -35,11 +36,6 @@
|
||||||
* CWE id (Common Weakness Enumeration)
|
* CWE id (Common Weakness Enumeration)
|
||||||
* See https://cwe.mitre.org/ for further reference.
|
* See https://cwe.mitre.org/ for further reference.
|
||||||
* */
|
* */
|
||||||
struct CWE {
|
|
||||||
explicit CWE(unsigned short cweId) : id(cweId) {}
|
|
||||||
unsigned short id;
|
|
||||||
};
|
|
||||||
|
|
||||||
// CWE list: https://cwe.mitre.org/data/published/cwe_v3.4.1.pdf
|
// CWE list: https://cwe.mitre.org/data/published/cwe_v3.4.1.pdf
|
||||||
static const struct CWE CWE_USE_OF_UNINITIALIZED_VARIABLE(457U);
|
static const struct CWE CWE_USE_OF_UNINITIALIZED_VARIABLE(457U);
|
||||||
static const struct CWE CWE_NULL_POINTER_DEREFERENCE(476U);
|
static const struct CWE CWE_NULL_POINTER_DEREFERENCE(476U);
|
||||||
|
@ -58,91 +54,6 @@ namespace tinyxml2 {
|
||||||
/// @addtogroup Core
|
/// @addtogroup Core
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/** @brief Simple container to be thrown when internal error is detected. */
|
|
||||||
struct InternalError {
|
|
||||||
enum Type {AST, SYNTAX, UNKNOWN_MACRO, INTERNAL, LIMIT, INSTANTIATION};
|
|
||||||
InternalError(const Token *tok, const std::string &errorMsg, Type type = INTERNAL);
|
|
||||||
const Token *token;
|
|
||||||
std::string errorMessage;
|
|
||||||
Type type;
|
|
||||||
std::string id;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** @brief enum class for severity. Used when reporting errors. */
|
|
||||||
class CPPCHECKLIB Severity {
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* Message severities.
|
|
||||||
*/
|
|
||||||
enum SeverityType {
|
|
||||||
/**
|
|
||||||
* No severity (default value).
|
|
||||||
*/
|
|
||||||
none,
|
|
||||||
/**
|
|
||||||
* Programming error.
|
|
||||||
* This indicates severe error like memory leak etc.
|
|
||||||
* The error is certain.
|
|
||||||
*/
|
|
||||||
error,
|
|
||||||
/**
|
|
||||||
* Warning.
|
|
||||||
* Used for dangerous coding style that can cause severe runtime errors.
|
|
||||||
* For example: forgetting to initialize a member variable in a constructor.
|
|
||||||
*/
|
|
||||||
warning,
|
|
||||||
/**
|
|
||||||
* Style warning.
|
|
||||||
* Used for general code cleanup recommendations. Fixing these
|
|
||||||
* will not fix any bugs but will make the code easier to maintain.
|
|
||||||
* For example: redundant code, unreachable code, etc.
|
|
||||||
*/
|
|
||||||
style,
|
|
||||||
/**
|
|
||||||
* Performance warning.
|
|
||||||
* Not an error as is but suboptimal code and fixing it probably leads
|
|
||||||
* to faster performance of the compiled code.
|
|
||||||
*/
|
|
||||||
performance,
|
|
||||||
/**
|
|
||||||
* Portability warning.
|
|
||||||
* This warning indicates the code is not properly portable for
|
|
||||||
* different platforms and bitnesses (32/64 bit). If the code is meant
|
|
||||||
* to compile in different platforms and bitnesses these warnings
|
|
||||||
* should be fixed.
|
|
||||||
*/
|
|
||||||
portability,
|
|
||||||
/**
|
|
||||||
* Checking information.
|
|
||||||
* Information message about the checking (process) itself. These
|
|
||||||
* messages inform about header files not found etc issues that are
|
|
||||||
* not errors in the code but something user needs to know.
|
|
||||||
*/
|
|
||||||
information,
|
|
||||||
/**
|
|
||||||
* Debug message.
|
|
||||||
* Debug-mode message useful for the developers.
|
|
||||||
*/
|
|
||||||
debug
|
|
||||||
};
|
|
||||||
|
|
||||||
static std::string toString(SeverityType severity);
|
|
||||||
static SeverityType fromString(const std::string& severity);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
typedef std::pair<const Token *, std::string> ErrorPathItem;
|
|
||||||
typedef std::list<ErrorPathItem> ErrorPath;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is an interface, which the class responsible of error logging
|
|
||||||
* should implement.
|
|
||||||
*/
|
|
||||||
class CPPCHECKLIB ErrorLogger {
|
|
||||||
protected:
|
|
||||||
std::ofstream plistFile;
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for error messages, provided by reportErr()
|
* Wrapper for error messages, provided by reportErr()
|
||||||
*/
|
*/
|
||||||
|
@ -327,6 +238,14 @@ public:
|
||||||
std::string mSymbolNames;
|
std::string mSymbolNames;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is an interface, which the class responsible of error logging
|
||||||
|
* should implement.
|
||||||
|
*/
|
||||||
|
class CPPCHECKLIB ErrorLogger {
|
||||||
|
protected:
|
||||||
|
std::ofstream plistFile;
|
||||||
|
public:
|
||||||
ErrorLogger() { }
|
ErrorLogger() { }
|
||||||
virtual ~ErrorLogger() {
|
virtual ~ErrorLogger() {
|
||||||
if (plistFile.is_open()) {
|
if (plistFile.is_open()) {
|
||||||
|
@ -349,7 +268,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param msg Location and other information about the found error.
|
* @param msg Location and other information about the found error.
|
||||||
*/
|
*/
|
||||||
virtual void reportErr(const ErrorLogger::ErrorMessage &msg) = 0;
|
virtual void reportErr(const ErrorMessage &msg) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report progress to client
|
* Report progress to client
|
||||||
|
@ -367,7 +286,7 @@ public:
|
||||||
* Output information messages.
|
* Output information messages.
|
||||||
* @param msg Location and other information about the found error.
|
* @param msg Location and other information about the found error.
|
||||||
*/
|
*/
|
||||||
virtual void reportInfo(const ErrorLogger::ErrorMessage &msg) {
|
virtual void reportInfo(const ErrorMessage &msg) {
|
||||||
reportErr(msg);
|
reportErr(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,7 +299,7 @@ public:
|
||||||
*/
|
*/
|
||||||
bool reportUnmatchedSuppressions(const std::list<Suppressions::Suppression> &unmatched);
|
bool reportUnmatchedSuppressions(const std::list<Suppressions::Suppression> &unmatched);
|
||||||
|
|
||||||
static std::string callStackToString(const std::list<ErrorLogger::ErrorMessage::FileLocation> &callStack);
|
static std::string callStackToString(const std::list<ErrorMessage::FileLocation> &callStack);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert XML-sensitive characters into XML entities
|
* Convert XML-sensitive characters into XML entities
|
||||||
|
@ -390,7 +309,7 @@ public:
|
||||||
static std::string toxml(const std::string &str);
|
static std::string toxml(const std::string &str);
|
||||||
|
|
||||||
static std::string plistHeader(const std::string &version, const std::vector<std::string> &files);
|
static std::string plistHeader(const std::string &version, const std::vector<std::string> &files);
|
||||||
static std::string plistData(const ErrorLogger::ErrorMessage &msg);
|
static std::string plistData(const ErrorMessage &msg);
|
||||||
static const char *plistFooter() {
|
static const char *plistFooter() {
|
||||||
return " </array>\r\n"
|
return " </array>\r\n"
|
||||||
"</dict>\r\n"
|
"</dict>\r\n"
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
/*
|
||||||
|
* Cppcheck - A tool for static C/C++ code analysis
|
||||||
|
* Copyright (C) 2007-2020 Cppcheck team.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "errortypes.h"
|
||||||
|
|
||||||
|
std::string Severity::toString(Severity::SeverityType severity)
|
||||||
|
{
|
||||||
|
switch (severity) {
|
||||||
|
case none:
|
||||||
|
return "";
|
||||||
|
case error:
|
||||||
|
return "error";
|
||||||
|
case warning:
|
||||||
|
return "warning";
|
||||||
|
case style:
|
||||||
|
return "style";
|
||||||
|
case performance:
|
||||||
|
return "performance";
|
||||||
|
case portability:
|
||||||
|
return "portability";
|
||||||
|
case information:
|
||||||
|
return "information";
|
||||||
|
case debug:
|
||||||
|
return "debug";
|
||||||
|
}
|
||||||
|
throw InternalError(nullptr, "Unknown severity");
|
||||||
|
}
|
||||||
|
Severity::SeverityType Severity::fromString(const std::string& severity)
|
||||||
|
{
|
||||||
|
if (severity.empty())
|
||||||
|
return none;
|
||||||
|
if (severity == "none")
|
||||||
|
return none;
|
||||||
|
if (severity == "error")
|
||||||
|
return error;
|
||||||
|
if (severity == "warning")
|
||||||
|
return warning;
|
||||||
|
if (severity == "style")
|
||||||
|
return style;
|
||||||
|
if (severity == "performance")
|
||||||
|
return performance;
|
||||||
|
if (severity == "portability")
|
||||||
|
return portability;
|
||||||
|
if (severity == "information")
|
||||||
|
return information;
|
||||||
|
if (severity == "debug")
|
||||||
|
return debug;
|
||||||
|
return none;
|
||||||
|
}
|
|
@ -0,0 +1,115 @@
|
||||||
|
/*
|
||||||
|
* Cppcheck - A tool for static C/C++ code analysis
|
||||||
|
* Copyright (C) 2007-2020 Cppcheck team.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#ifndef errortypesH
|
||||||
|
#define errortypesH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <list>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
/// @addtogroup Core
|
||||||
|
/// @{
|
||||||
|
class Token;
|
||||||
|
|
||||||
|
/** @brief Simple container to be thrown when internal error is detected. */
|
||||||
|
struct InternalError {
|
||||||
|
enum Type {AST, SYNTAX, UNKNOWN_MACRO, INTERNAL, LIMIT, INSTANTIATION};
|
||||||
|
InternalError(const Token *tok, const std::string &errorMsg, Type type = INTERNAL);
|
||||||
|
const Token *token;
|
||||||
|
std::string errorMessage;
|
||||||
|
Type type;
|
||||||
|
std::string id;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** @brief enum class for severity. Used when reporting errors. */
|
||||||
|
class CPPCHECKLIB Severity {
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Message severities.
|
||||||
|
*/
|
||||||
|
enum SeverityType {
|
||||||
|
/**
|
||||||
|
* No severity (default value).
|
||||||
|
*/
|
||||||
|
none,
|
||||||
|
/**
|
||||||
|
* Programming error.
|
||||||
|
* This indicates severe error like memory leak etc.
|
||||||
|
* The error is certain.
|
||||||
|
*/
|
||||||
|
error,
|
||||||
|
/**
|
||||||
|
* Warning.
|
||||||
|
* Used for dangerous coding style that can cause severe runtime errors.
|
||||||
|
* For example: forgetting to initialize a member variable in a constructor.
|
||||||
|
*/
|
||||||
|
warning,
|
||||||
|
/**
|
||||||
|
* Style warning.
|
||||||
|
* Used for general code cleanup recommendations. Fixing these
|
||||||
|
* will not fix any bugs but will make the code easier to maintain.
|
||||||
|
* For example: redundant code, unreachable code, etc.
|
||||||
|
*/
|
||||||
|
style,
|
||||||
|
/**
|
||||||
|
* Performance warning.
|
||||||
|
* Not an error as is but suboptimal code and fixing it probably leads
|
||||||
|
* to faster performance of the compiled code.
|
||||||
|
*/
|
||||||
|
performance,
|
||||||
|
/**
|
||||||
|
* Portability warning.
|
||||||
|
* This warning indicates the code is not properly portable for
|
||||||
|
* different platforms and bitnesses (32/64 bit). If the code is meant
|
||||||
|
* to compile in different platforms and bitnesses these warnings
|
||||||
|
* should be fixed.
|
||||||
|
*/
|
||||||
|
portability,
|
||||||
|
/**
|
||||||
|
* Checking information.
|
||||||
|
* Information message about the checking (process) itself. These
|
||||||
|
* messages inform about header files not found etc issues that are
|
||||||
|
* not errors in the code but something user needs to know.
|
||||||
|
*/
|
||||||
|
information,
|
||||||
|
/**
|
||||||
|
* Debug message.
|
||||||
|
* Debug-mode message useful for the developers.
|
||||||
|
*/
|
||||||
|
debug
|
||||||
|
};
|
||||||
|
|
||||||
|
static std::string toString(SeverityType severity);
|
||||||
|
static SeverityType fromString(const std::string &severity);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CWE {
|
||||||
|
explicit CWE(unsigned short cweId) : id(cweId) {}
|
||||||
|
unsigned short id;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::pair<const Token *, std::string> ErrorPathItem;
|
||||||
|
typedef std::list<ErrorPathItem> ErrorPath;
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif // errortypesH
|
|
@ -130,7 +130,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "exprengine.h"
|
#include "exprengine.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
|
#include "errorlogger.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
|
@ -1421,7 +1423,7 @@ static void checkContract(Data &data, const Token *tok, const Function *function
|
||||||
const auto contractIt = data.settings->functionContracts.find(function->fullName());
|
const auto contractIt = data.settings->functionContracts.find(function->fullName());
|
||||||
const std::string functionName = contractIt->first;
|
const std::string functionName = contractIt->first;
|
||||||
const std::string functionExpects = contractIt->second;
|
const std::string functionExpects = contractIt->second;
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack,
|
ErrorMessage errmsg(callstack,
|
||||||
&data.tokenizer->list,
|
&data.tokenizer->list,
|
||||||
Severity::SeverityType::error,
|
Severity::SeverityType::error,
|
||||||
id,
|
id,
|
||||||
|
@ -1439,7 +1441,7 @@ static void checkContract(Data &data, const Token *tok, const Function *function
|
||||||
const char * const id = "internalErrorInExprEngine";
|
const char * const id = "internalErrorInExprEngine";
|
||||||
const auto contractIt = data.settings->functionContracts.find(function->fullName());
|
const auto contractIt = data.settings->functionContracts.find(function->fullName());
|
||||||
const std::string functionExpects = contractIt->second;
|
const std::string functionExpects = contractIt->second;
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack,
|
ErrorMessage errmsg(callstack,
|
||||||
&data.tokenizer->list,
|
&data.tokenizer->list,
|
||||||
Severity::SeverityType::error,
|
Severity::SeverityType::error,
|
||||||
id,
|
id,
|
||||||
|
@ -2163,7 +2165,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
|
||||||
std::list<const Token*> callstack{settings->clang ? tok : tok->astParent()};
|
std::list<const Token*> callstack{settings->clang ? tok : tok->astParent()};
|
||||||
const char * const id = (tok->valueType() && tok->valueType()->isFloat()) ? "bughuntingDivByZeroFloat" : "bughuntingDivByZero";
|
const char * const id = (tok->valueType() && tok->valueType()->isFloat()) ? "bughuntingDivByZeroFloat" : "bughuntingDivByZero";
|
||||||
const bool bailout = (value.type == ExprEngine::ValueType::BailoutValue);
|
const bool bailout = (value.type == ExprEngine::ValueType::BailoutValue);
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, id, "There is division, cannot determine that there can't be a division by zero.", CWE(369), false);
|
ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, id, "There is division, cannot determine that there can't be a division by zero.", CWE(369), false);
|
||||||
if (!bailout)
|
if (!bailout)
|
||||||
errmsg.function = dataBase->currentFunction;
|
errmsg.function = dataBase->currentFunction;
|
||||||
else
|
else
|
||||||
|
@ -2216,7 +2218,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
|
||||||
errorMessage += " Note that unsigned integer overflow is defined and will wrap around.";
|
errorMessage += " Note that unsigned integer overflow is defined and will wrap around.";
|
||||||
|
|
||||||
std::list<const Token*> callstack{tok};
|
std::list<const Token*> callstack{tok};
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingIntegerOverflow", errorMessage, false);
|
ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingIntegerOverflow", errorMessage, false);
|
||||||
errorLogger->reportErr(errmsg);
|
errorLogger->reportErr(errmsg);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -2281,7 +2283,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
|
||||||
|
|
||||||
dataBase->addError(tok->linenr());
|
dataBase->addError(tok->linenr());
|
||||||
std::list<const Token*> callstack{tok};
|
std::list<const Token*> callstack{tok};
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingUninit", "Cannot determine that '" + tok->expressionString() + "' is initialized", CWE_USE_OF_UNINITIALIZED_VARIABLE, false);
|
ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingUninit", "Cannot determine that '" + tok->expressionString() + "' is initialized", CWE_USE_OF_UNINITIALIZED_VARIABLE, false);
|
||||||
errorLogger->reportErr(errmsg);
|
errorLogger->reportErr(errmsg);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2325,7 +2327,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
|
||||||
if (!bad.empty()) {
|
if (!bad.empty()) {
|
||||||
dataBase->addError(tok->linenr());
|
dataBase->addError(tok->linenr());
|
||||||
std::list<const Token*> callstack{tok};
|
std::list<const Token*> callstack{tok};
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack,
|
ErrorMessage errmsg(callstack,
|
||||||
&tokenizer->list,
|
&tokenizer->list,
|
||||||
Severity::SeverityType::error,
|
Severity::SeverityType::error,
|
||||||
"bughuntingInvalidArgValue",
|
"bughuntingInvalidArgValue",
|
||||||
|
@ -2377,7 +2379,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
|
||||||
if (err) {
|
if (err) {
|
||||||
dataBase->addError(tok->linenr());
|
dataBase->addError(tok->linenr());
|
||||||
std::list<const Token*> callstack{tok};
|
std::list<const Token*> callstack{tok};
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingInvalidArgValue", "There is function call, cannot determine that " + std::to_string(num) + getOrdinalText(num) + " argument value is valid. Bad value: " + bad, CWE(0), false);
|
ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingInvalidArgValue", "There is function call, cannot determine that " + std::to_string(num) + getOrdinalText(num) + " argument value is valid. Bad value: " + bad, CWE(0), false);
|
||||||
errorLogger->reportErr(errmsg);
|
errorLogger->reportErr(errmsg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2391,7 +2393,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
|
||||||
if (v.second->isUninit()) {
|
if (v.second->isUninit()) {
|
||||||
dataBase->addError(tok->linenr());
|
dataBase->addError(tok->linenr());
|
||||||
std::list<const Token*> callstack{tok};
|
std::list<const Token*> callstack{tok};
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingUninitArg", "There is function call, cannot determine that " + std::to_string(num) + getOrdinalText(num) + " argument is initialized.", CWE_USE_OF_UNINITIALIZED_VARIABLE, false);
|
ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingUninitArg", "There is function call, cannot determine that " + std::to_string(num) + getOrdinalText(num) + " argument is initialized.", CWE_USE_OF_UNINITIALIZED_VARIABLE, false);
|
||||||
errorLogger->reportErr(errmsg);
|
errorLogger->reportErr(errmsg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2415,7 +2417,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
|
||||||
if (value.isLessThan(dataBase, low)) {
|
if (value.isLessThan(dataBase, low)) {
|
||||||
dataBase->addError(tok->linenr());
|
dataBase->addError(tok->linenr());
|
||||||
std::list<const Token*> callstack{tok};
|
std::list<const Token*> callstack{tok};
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingAssign", "There is assignment, cannot determine that value is greater or equal with " + std::to_string(low), CWE_INCORRECT_CALCULATION, false);
|
ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingAssign", "There is assignment, cannot determine that value is greater or equal with " + std::to_string(low), CWE_INCORRECT_CALCULATION, false);
|
||||||
errorLogger->reportErr(errmsg);
|
errorLogger->reportErr(errmsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2425,7 +2427,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
|
||||||
if (value.isGreaterThan(dataBase, high)) {
|
if (value.isGreaterThan(dataBase, high)) {
|
||||||
dataBase->addError(tok->linenr());
|
dataBase->addError(tok->linenr());
|
||||||
std::list<const Token*> callstack{tok};
|
std::list<const Token*> callstack{tok};
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingAssign", "There is assignment, cannot determine that value is lower or equal with " + std::to_string(high), CWE_INCORRECT_CALCULATION, false);
|
ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingAssign", "There is assignment, cannot determine that value is lower or equal with " + std::to_string(high), CWE_INCORRECT_CALCULATION, false);
|
||||||
errorLogger->reportErr(errmsg);
|
errorLogger->reportErr(errmsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ HEADERS += $${PWD}/analyzerinfo.h \
|
||||||
$${PWD}/cppcheck.h \
|
$${PWD}/cppcheck.h \
|
||||||
$${PWD}/ctu.h \
|
$${PWD}/ctu.h \
|
||||||
$${PWD}/errorlogger.h \
|
$${PWD}/errorlogger.h \
|
||||||
|
$${PWD}/errortypes.h \
|
||||||
$${PWD}/exprengine.h \
|
$${PWD}/exprengine.h \
|
||||||
$${PWD}/forwardanalyzer.h \
|
$${PWD}/forwardanalyzer.h \
|
||||||
$${PWD}/importproject.h \
|
$${PWD}/importproject.h \
|
||||||
|
@ -89,6 +90,7 @@ SOURCES += $${PWD}/analyzerinfo.cpp \
|
||||||
$${PWD}/cppcheck.cpp \
|
$${PWD}/cppcheck.cpp \
|
||||||
$${PWD}/ctu.cpp \
|
$${PWD}/ctu.cpp \
|
||||||
$${PWD}/errorlogger.cpp \
|
$${PWD}/errorlogger.cpp \
|
||||||
|
$${PWD}/errortypes.cpp \
|
||||||
$${PWD}/exprengine.cpp \
|
$${PWD}/exprengine.cpp \
|
||||||
$${PWD}/forwardanalyzer.cpp \
|
$${PWD}/forwardanalyzer.cpp \
|
||||||
$${PWD}/importproject.cpp \
|
$${PWD}/importproject.cpp \
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
|
#include "errortypes.h"
|
||||||
#include "standards.h"
|
#include "standards.h"
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "errorlogger.h"
|
#include "errortypes.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#ifndef GUARD_PATHANALYSIS_H
|
#ifndef GUARD_PATHANALYSIS_H
|
||||||
#define GUARD_PATHANALYSIS_H
|
#define GUARD_PATHANALYSIS_H
|
||||||
|
|
||||||
#include <functional>
|
#include "errortypes.h"
|
||||||
|
|
||||||
#include "errorlogger.h"
|
#include <functional>
|
||||||
|
|
||||||
class Library;
|
class Library;
|
||||||
class Scope;
|
class Scope;
|
||||||
|
|
|
@ -786,12 +786,12 @@ void Preprocessor::reportOutput(const simplecpp::OutputList &outputList, bool sh
|
||||||
|
|
||||||
void Preprocessor::error(const std::string &filename, unsigned int linenr, const std::string &msg)
|
void Preprocessor::error(const std::string &filename, unsigned int linenr, const std::string &msg)
|
||||||
{
|
{
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
std::list<ErrorMessage::FileLocation> locationList;
|
||||||
if (!filename.empty()) {
|
if (!filename.empty()) {
|
||||||
const ErrorLogger::ErrorMessage::FileLocation loc(filename, linenr, 0);
|
const ErrorMessage::FileLocation loc(filename, linenr, 0);
|
||||||
locationList.push_back(loc);
|
locationList.push_back(loc);
|
||||||
}
|
}
|
||||||
mErrorLogger->reportErr(ErrorLogger::ErrorMessage(locationList,
|
mErrorLogger->reportErr(ErrorMessage(locationList,
|
||||||
mFile0,
|
mFile0,
|
||||||
Severity::error,
|
Severity::error,
|
||||||
msg,
|
msg,
|
||||||
|
@ -819,14 +819,14 @@ void Preprocessor::missingInclude(const std::string &filename, unsigned int line
|
||||||
missingIncludeFlag = true;
|
missingIncludeFlag = true;
|
||||||
if (mErrorLogger && mSettings.checkConfiguration) {
|
if (mErrorLogger && mSettings.checkConfiguration) {
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
std::list<ErrorMessage::FileLocation> locationList;
|
||||||
if (!filename.empty()) {
|
if (!filename.empty()) {
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
ErrorMessage::FileLocation loc;
|
||||||
loc.line = linenr;
|
loc.line = linenr;
|
||||||
loc.setfile(Path::toNativeSeparators(filename));
|
loc.setfile(Path::toNativeSeparators(filename));
|
||||||
locationList.push_back(loc);
|
locationList.push_back(loc);
|
||||||
}
|
}
|
||||||
ErrorLogger::ErrorMessage errmsg(locationList, mFile0, Severity::information,
|
ErrorMessage errmsg(locationList, mFile0, Severity::information,
|
||||||
(headerType==SystemHeader) ?
|
(headerType==SystemHeader) ?
|
||||||
"Include file: <" + header + "> not found. Please note: Cppcheck does not need standard library headers to get proper results." :
|
"Include file: <" + header + "> not found. Please note: Cppcheck does not need standard library headers to get proper results." :
|
||||||
"Include file: \"" + header + "\" not found.",
|
"Include file: \"" + header + "\" not found.",
|
||||||
|
@ -869,10 +869,10 @@ bool Preprocessor::validateCfg(const std::string &cfg, const std::list<simplecpp
|
||||||
void Preprocessor::validateCfgError(const std::string &file, const unsigned int line, const std::string &cfg, const std::string ¯o)
|
void Preprocessor::validateCfgError(const std::string &file, const unsigned int line, const std::string &cfg, const std::string ¯o)
|
||||||
{
|
{
|
||||||
const std::string id = "ConfigurationNotChecked";
|
const std::string id = "ConfigurationNotChecked";
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
std::list<ErrorMessage::FileLocation> locationList;
|
||||||
const ErrorLogger::ErrorMessage::FileLocation loc(file, line, 0);
|
const ErrorMessage::FileLocation loc(file, line, 0);
|
||||||
locationList.push_back(loc);
|
locationList.push_back(loc);
|
||||||
const ErrorLogger::ErrorMessage errmsg(locationList, mFile0, Severity::information, "Skipping configuration '" + cfg + "' since the value of '" + macro + "' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.", id, false);
|
const ErrorMessage errmsg(locationList, mFile0, Severity::information, "Skipping configuration '" + cfg + "' since the value of '" + macro + "' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.", id, false);
|
||||||
mErrorLogger->reportInfo(errmsg);
|
mErrorLogger->reportInfo(errmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "valueflow.h"
|
#include "valueflow.h" // needed for alias
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "importproject.h"
|
#include "importproject.h"
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
|
@ -1731,7 +1731,7 @@ void SymbolDatabase::validateExecutableScopes() const
|
||||||
if (scope->isExecutable() && !function) {
|
if (scope->isExecutable() && !function) {
|
||||||
const std::list<const Token*> callstack(1, scope->classDef);
|
const std::list<const Token*> callstack(1, scope->classDef);
|
||||||
const std::string msg = std::string("Executable scope '") + scope->classDef->str() + "' with unknown function.";
|
const std::string msg = std::string("Executable scope '") + scope->classDef->str() + "' with unknown function.";
|
||||||
const ErrorLogger::ErrorMessage errmsg(callstack, &mTokenizer->list, Severity::debug,
|
const ErrorMessage errmsg(callstack, &mTokenizer->list, Severity::debug,
|
||||||
"symbolDatabaseWarning",
|
"symbolDatabaseWarning",
|
||||||
msg,
|
msg,
|
||||||
false);
|
false);
|
||||||
|
@ -2818,7 +2818,7 @@ void SymbolDatabase::debugMessage(const Token *tok, const std::string &msg) cons
|
||||||
{
|
{
|
||||||
if (tok && mSettings->debugwarnings) {
|
if (tok && mSettings->debugwarnings) {
|
||||||
const std::list<const Token*> locationList(1, tok);
|
const std::list<const Token*> locationList(1, tok);
|
||||||
const ErrorLogger::ErrorMessage errmsg(locationList, &mTokenizer->list,
|
const ErrorMessage errmsg(locationList, &mTokenizer->list,
|
||||||
Severity::debug,
|
Severity::debug,
|
||||||
"debug",
|
"debug",
|
||||||
msg,
|
msg,
|
||||||
|
|
|
@ -2993,7 +2993,7 @@ bool TemplateSimplifier::simplifyTemplateInstantiations(
|
||||||
(!typeParametersInDeclaration.empty() && typeParametersInDeclaration.size() != mTypesUsedInTemplateInstantiation.size())) {
|
(!typeParametersInDeclaration.empty() && typeParametersInDeclaration.size() != mTypesUsedInTemplateInstantiation.size())) {
|
||||||
if (printDebug && mErrorLogger) {
|
if (printDebug && mErrorLogger) {
|
||||||
std::list<const Token *> callstack(1, tok2);
|
std::list<const Token *> callstack(1, tok2);
|
||||||
mErrorLogger->reportErr(ErrorLogger::ErrorMessage(callstack, &mTokenList, Severity::debug, "debug",
|
mErrorLogger->reportErr(ErrorMessage(callstack, &mTokenList, Severity::debug, "debug",
|
||||||
"Failed to instantiate template \"" + instantiation.name() + "\". The checking continues anyway.", false));
|
"Failed to instantiate template \"" + instantiation.name() + "\". The checking continues anyway.", false));
|
||||||
}
|
}
|
||||||
if (typeForNewName.empty())
|
if (typeForNewName.empty())
|
||||||
|
@ -3061,7 +3061,7 @@ bool TemplateSimplifier::simplifyTemplateInstantiations(
|
||||||
if (typeForNewName.empty()) {
|
if (typeForNewName.empty()) {
|
||||||
if (printDebug && mErrorLogger) {
|
if (printDebug && mErrorLogger) {
|
||||||
std::list<const Token *> callstack(1, tok2);
|
std::list<const Token *> callstack(1, tok2);
|
||||||
mErrorLogger->reportErr(ErrorLogger::ErrorMessage(callstack, &mTokenList, Severity::debug, "debug",
|
mErrorLogger->reportErr(ErrorMessage(callstack, &mTokenList, Severity::debug, "debug",
|
||||||
"Failed to instantiate template \"" + templateDeclaration.name() + "\". The checking continues anyway.", false));
|
"Failed to instantiate template \"" + templateDeclaration.name() + "\". The checking continues anyway.", false));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -3678,7 +3678,7 @@ void TemplateSimplifier::simplifyTemplates(
|
||||||
if (passCount == passCountMax) {
|
if (passCount == passCountMax) {
|
||||||
if (mSettings->debugwarnings) {
|
if (mSettings->debugwarnings) {
|
||||||
const std::list<const Token*> locationList(1, mTokenList.front());
|
const std::list<const Token*> locationList(1, mTokenList.front());
|
||||||
const ErrorLogger::ErrorMessage errmsg(locationList, &mTokenizer->list,
|
const ErrorMessage errmsg(locationList, &mTokenizer->list,
|
||||||
Severity::debug,
|
Severity::debug,
|
||||||
"debug",
|
"debug",
|
||||||
"TemplateSimplifier: pass count limit hit before simplifications were finished.",
|
"TemplateSimplifier: pass count limit hit before simplifications were finished.",
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
||||||
#include "astutils.h"
|
#include "astutils.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
#include "errorlogger.h"
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
@ -2195,7 +2196,7 @@ bool Tokenizer::simplifyUsing()
|
||||||
}
|
}
|
||||||
str += " ;";
|
str += " ;";
|
||||||
std::list<const Token *> callstack(1, usingStart);
|
std::list<const Token *> callstack(1, usingStart);
|
||||||
mErrorLogger->reportErr(ErrorLogger::ErrorMessage(callstack, &list, Severity::debug, "debug",
|
mErrorLogger->reportErr(ErrorMessage(callstack, &list, Severity::debug, "debug",
|
||||||
"Failed to parse \'" + str + "\'. The checking continues anyway.", false));
|
"Failed to parse \'" + str + "\'. The checking continues anyway.", false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11470,7 +11471,7 @@ void Tokenizer::reportError(const Token* tok, const Severity::SeverityType sever
|
||||||
|
|
||||||
void Tokenizer::reportError(const std::list<const Token*>& callstack, Severity::SeverityType severity, const std::string& id, const std::string& msg, bool inconclusive) const
|
void Tokenizer::reportError(const std::list<const Token*>& callstack, Severity::SeverityType severity, const std::string& id, const std::string& msg, bool inconclusive) const
|
||||||
{
|
{
|
||||||
const ErrorLogger::ErrorMessage errmsg(callstack, &list, severity, id, msg, inconclusive);
|
const ErrorMessage errmsg(callstack, &list, severity, id, msg, inconclusive);
|
||||||
if (mErrorLogger)
|
if (mErrorLogger)
|
||||||
mErrorLogger->reportErr(errmsg);
|
mErrorLogger->reportErr(errmsg);
|
||||||
else
|
else
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "errorlogger.h"
|
#include "errortypes.h"
|
||||||
#include "tokenlist.h"
|
#include "tokenlist.h"
|
||||||
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
@ -36,6 +36,7 @@ class SymbolDatabase;
|
||||||
class TimerResults;
|
class TimerResults;
|
||||||
class Token;
|
class Token;
|
||||||
class TemplateSimplifier;
|
class TemplateSimplifier;
|
||||||
|
class ErrorLogger;
|
||||||
|
|
||||||
namespace simplecpp {
|
namespace simplecpp {
|
||||||
class TokenList;
|
class TokenList;
|
||||||
|
|
|
@ -1614,7 +1614,7 @@ const std::string& TokenList::file(const Token *tok) const
|
||||||
|
|
||||||
std::string TokenList::fileLine(const Token *tok) const
|
std::string TokenList::fileLine(const Token *tok) const
|
||||||
{
|
{
|
||||||
return ErrorLogger::ErrorMessage::FileLocation(tok, this).stringify();
|
return ErrorMessage::FileLocation(tok, this).stringify();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TokenList::validateToken(const Token* tok) const
|
bool TokenList::validateToken(const Token* tok) const
|
||||||
|
|
|
@ -107,8 +107,8 @@
|
||||||
|
|
||||||
static void bailoutInternal(TokenList *tokenlist, ErrorLogger *errorLogger, const Token *tok, const std::string &what, const std::string &file, int line, const std::string &function)
|
static void bailoutInternal(TokenList *tokenlist, ErrorLogger *errorLogger, const Token *tok, const std::string &what, const std::string &file, int line, const std::string &function)
|
||||||
{
|
{
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> callstack(1, ErrorLogger::ErrorMessage::FileLocation(tok, tokenlist));
|
std::list<ErrorMessage::FileLocation> callstack(1, ErrorMessage::FileLocation(tok, tokenlist));
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, tokenlist->getSourceFilePath(), Severity::debug,
|
ErrorMessage errmsg(callstack, tokenlist->getSourceFilePath(), Severity::debug,
|
||||||
Path::stripDirectoryPart(file) + ":" + MathLib::toString(line) + ":" + function + " bailout: " + what, "valueFlowBailout", false);
|
Path::stripDirectoryPart(file) + ":" + MathLib::toString(line) + ":" + function + " bailout: " + what, "valueFlowBailout", false);
|
||||||
errorLogger->reportErr(errmsg);
|
errorLogger->reportErr(errmsg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ public:
|
||||||
void reportOut(const std::string &outmsg) OVERRIDE {
|
void reportOut(const std::string &outmsg) OVERRIDE {
|
||||||
(void)outmsg;
|
(void)outmsg;
|
||||||
}
|
}
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) OVERRIDE {
|
void reportErr(const ErrorMessage &msg) OVERRIDE {
|
||||||
(void)msg;
|
(void)msg;
|
||||||
}
|
}
|
||||||
void reportProgress(const std::string& filename,
|
void reportProgress(const std::string& filename,
|
||||||
|
|
|
@ -40,7 +40,7 @@ private:
|
||||||
void reportOut(const std::string & /*outmsg*/) OVERRIDE {}
|
void reportOut(const std::string & /*outmsg*/) OVERRIDE {}
|
||||||
void bughuntingReport(const std::string & /*str*/) OVERRIDE {}
|
void bughuntingReport(const std::string & /*str*/) OVERRIDE {}
|
||||||
|
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) OVERRIDE {
|
void reportErr(const ErrorMessage &msg) OVERRIDE {
|
||||||
id.push_back(msg.id);
|
id.push_back(msg.id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,8 +32,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const ErrorLogger::ErrorMessage::FileLocation fooCpp5;
|
const ErrorMessage::FileLocation fooCpp5;
|
||||||
const ErrorLogger::ErrorMessage::FileLocation barCpp8;
|
const ErrorMessage::FileLocation barCpp8;
|
||||||
|
|
||||||
void run() OVERRIDE {
|
void run() OVERRIDE {
|
||||||
TEST_CASE(PatternSearchReplace);
|
TEST_CASE(PatternSearchReplace);
|
||||||
|
@ -65,7 +65,7 @@ private:
|
||||||
void TestPatternSearchReplace(const std::string& idPlaceholder, const std::string& id) const {
|
void TestPatternSearchReplace(const std::string& idPlaceholder, const std::string& id) const {
|
||||||
const std::string plainText = "text";
|
const std::string plainText = "text";
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage message;
|
ErrorMessage message;
|
||||||
message.id = id;
|
message.id = id;
|
||||||
|
|
||||||
std::string serialized = message.toString(true, idPlaceholder + plainText + idPlaceholder);
|
std::string serialized = message.toString(true, idPlaceholder + plainText + idPlaceholder);
|
||||||
|
@ -98,20 +98,20 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileLocationDefaults() const {
|
void FileLocationDefaults() const {
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
ErrorMessage::FileLocation loc;
|
||||||
ASSERT_EQUALS("", loc.getfile());
|
ASSERT_EQUALS("", loc.getfile());
|
||||||
ASSERT_EQUALS(0, loc.line);
|
ASSERT_EQUALS(0, loc.line);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileLocationSetFile() const {
|
void FileLocationSetFile() const {
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
ErrorMessage::FileLocation loc;
|
||||||
loc.setfile("foo.cpp");
|
loc.setfile("foo.cpp");
|
||||||
ASSERT_EQUALS("foo.cpp", loc.getfile());
|
ASSERT_EQUALS("foo.cpp", loc.getfile());
|
||||||
ASSERT_EQUALS(0, loc.line);
|
ASSERT_EQUALS(0, loc.line);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorMessageConstruct() const {
|
void ErrorMessageConstruct() const {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs(1, fooCpp5);
|
std::list<ErrorMessage::FileLocation> locs(1, fooCpp5);
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.", "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.", "errorId", false);
|
||||||
ASSERT_EQUALS(1, msg.callStack.size());
|
ASSERT_EQUALS(1, msg.callStack.size());
|
||||||
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
||||||
|
@ -121,7 +121,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorMessageConstructLocations() const {
|
void ErrorMessageConstructLocations() const {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs = { fooCpp5, barCpp8 };
|
std::list<ErrorMessage::FileLocation> locs = { fooCpp5, barCpp8 };
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.", "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.", "errorId", false);
|
||||||
ASSERT_EQUALS(2, msg.callStack.size());
|
ASSERT_EQUALS(2, msg.callStack.size());
|
||||||
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
||||||
|
@ -131,7 +131,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorMessageVerbose() const {
|
void ErrorMessageVerbose() const {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs(1, fooCpp5);
|
std::list<ErrorMessage::FileLocation> locs(1, fooCpp5);
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
||||||
ASSERT_EQUALS(1, msg.callStack.size());
|
ASSERT_EQUALS(1, msg.callStack.size());
|
||||||
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
||||||
|
@ -141,7 +141,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorMessageVerboseLocations() const {
|
void ErrorMessageVerboseLocations() const {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs = { fooCpp5, barCpp8 };
|
std::list<ErrorMessage::FileLocation> locs = { fooCpp5, barCpp8 };
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
||||||
ASSERT_EQUALS(2, msg.callStack.size());
|
ASSERT_EQUALS(2, msg.callStack.size());
|
||||||
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
||||||
|
@ -151,7 +151,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void CustomFormat() const {
|
void CustomFormat() const {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs(1, fooCpp5);
|
std::list<ErrorMessage::FileLocation> locs(1, fooCpp5);
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
||||||
ASSERT_EQUALS(1, msg.callStack.size());
|
ASSERT_EQUALS(1, msg.callStack.size());
|
||||||
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
||||||
|
@ -161,7 +161,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void CustomFormat2() const {
|
void CustomFormat2() const {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs(1, fooCpp5);
|
std::list<ErrorMessage::FileLocation> locs(1, fooCpp5);
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
||||||
ASSERT_EQUALS(1, msg.callStack.size());
|
ASSERT_EQUALS(1, msg.callStack.size());
|
||||||
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
||||||
|
@ -172,7 +172,7 @@ private:
|
||||||
|
|
||||||
void CustomFormatLocations() const {
|
void CustomFormatLocations() const {
|
||||||
// Check that first location from location stack is used in template
|
// Check that first location from location stack is used in template
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs = { fooCpp5, barCpp8 };
|
std::list<ErrorMessage::FileLocation> locs = { fooCpp5, barCpp8 };
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
||||||
ASSERT_EQUALS(2, msg.callStack.size());
|
ASSERT_EQUALS(2, msg.callStack.size());
|
||||||
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
ASSERT_EQUALS("Programming error.", msg.shortMessage());
|
||||||
|
@ -182,14 +182,14 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToXmlV2() const {
|
void ToXmlV2() const {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs(1, fooCpp5);
|
std::list<ErrorMessage::FileLocation> locs(1, fooCpp5);
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
||||||
std::string header("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<results version=\"2\">\n");
|
std::string header("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<results version=\"2\">\n");
|
||||||
header += " <cppcheck version=\"";
|
header += " <cppcheck version=\"";
|
||||||
header += CppCheck::version();
|
header += CppCheck::version();
|
||||||
header += "\"/>\n <errors>";
|
header += "\"/>\n <errors>";
|
||||||
ASSERT_EQUALS(header, ErrorLogger::ErrorMessage::getXMLHeader());
|
ASSERT_EQUALS(header, ErrorMessage::getXMLHeader());
|
||||||
ASSERT_EQUALS(" </errors>\n</results>", ErrorLogger::ErrorMessage::getXMLFooter());
|
ASSERT_EQUALS(" </errors>\n</results>", ErrorMessage::getXMLFooter());
|
||||||
std::string message(" <error id=\"errorId\" severity=\"error\"");
|
std::string message(" <error id=\"errorId\" severity=\"error\"");
|
||||||
message += " msg=\"Programming error.\" verbose=\"Verbose error\">\n";
|
message += " msg=\"Programming error.\" verbose=\"Verbose error\">\n";
|
||||||
message += " <location file=\"foo.cpp\" line=\"5\" column=\"1\"/>\n </error>";
|
message += " <location file=\"foo.cpp\" line=\"5\" column=\"1\"/>\n </error>";
|
||||||
|
@ -197,15 +197,15 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToXmlV2Locations() const {
|
void ToXmlV2Locations() const {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs = { fooCpp5, barCpp8 };
|
std::list<ErrorMessage::FileLocation> locs = { fooCpp5, barCpp8 };
|
||||||
locs.back().setinfo("ä");
|
locs.back().setinfo("ä");
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", false);
|
||||||
std::string header("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<results version=\"2\">\n");
|
std::string header("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<results version=\"2\">\n");
|
||||||
header += " <cppcheck version=\"";
|
header += " <cppcheck version=\"";
|
||||||
header += CppCheck::version();
|
header += CppCheck::version();
|
||||||
header += "\"/>\n <errors>";
|
header += "\"/>\n <errors>";
|
||||||
ASSERT_EQUALS(header, ErrorLogger::ErrorMessage::getXMLHeader());
|
ASSERT_EQUALS(header, ErrorMessage::getXMLHeader());
|
||||||
ASSERT_EQUALS(" </errors>\n</results>", ErrorLogger::ErrorMessage::getXMLFooter());
|
ASSERT_EQUALS(" </errors>\n</results>", ErrorMessage::getXMLFooter());
|
||||||
std::string message(" <error id=\"errorId\" severity=\"error\"");
|
std::string message(" <error id=\"errorId\" severity=\"error\"");
|
||||||
message += " msg=\"Programming error.\" verbose=\"Verbose error\">\n";
|
message += " msg=\"Programming error.\" verbose=\"Verbose error\">\n";
|
||||||
message += " <location file=\"bar.cpp\" line=\"8\" column=\"1\" info=\"\\303\\244\"/>\n";
|
message += " <location file=\"bar.cpp\" line=\"8\" column=\"1\" info=\"\\303\\244\"/>\n";
|
||||||
|
@ -215,7 +215,7 @@ private:
|
||||||
|
|
||||||
void ToXmlV2Encoding() const {
|
void ToXmlV2Encoding() const {
|
||||||
{
|
{
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs;
|
std::list<ErrorMessage::FileLocation> locs;
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nComparing \"\203\" with \"\003\"", "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error.\nComparing \"\203\" with \"\003\"", "errorId", false);
|
||||||
const std::string expected(" <error id=\"errorId\" severity=\"error\" msg=\"Programming error.\" verbose=\"Comparing "\\203" with "\\003"\"/>");
|
const std::string expected(" <error id=\"errorId\" severity=\"error\" msg=\"Programming error.\" verbose=\"Comparing "\\203" with "\\003"\"/>");
|
||||||
ASSERT_EQUALS(expected, msg.toXML());
|
ASSERT_EQUALS(expected, msg.toXML());
|
||||||
|
@ -223,7 +223,7 @@ private:
|
||||||
{
|
{
|
||||||
const char code1[]="äöü";
|
const char code1[]="äöü";
|
||||||
const char code2[]="\x12\x00\x00\x01";
|
const char code2[]="\x12\x00\x00\x01";
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs;
|
std::list<ErrorMessage::FileLocation> locs;
|
||||||
ErrorMessage msg1(locs, emptyString, Severity::error, std::string("Programming error.\nReading \"")+code1+"\"", "errorId", false);
|
ErrorMessage msg1(locs, emptyString, Severity::error, std::string("Programming error.\nReading \"")+code1+"\"", "errorId", false);
|
||||||
ASSERT_EQUALS(" <error id=\"errorId\" severity=\"error\" msg=\"Programming error.\" verbose=\"Reading "\\303\\244\\303\\266\\303\\274"\"/>", msg1.toXML());
|
ASSERT_EQUALS(" <error id=\"errorId\" severity=\"error\" msg=\"Programming error.\" verbose=\"Reading "\\303\\244\\303\\266\\303\\274"\"/>", msg1.toXML());
|
||||||
ErrorMessage msg2(locs, emptyString, Severity::error, std::string("Programming error.\nReading \"")+code2+"\"", "errorId", false);
|
ErrorMessage msg2(locs, emptyString, Severity::error, std::string("Programming error.\nReading \"")+code2+"\"", "errorId", false);
|
||||||
|
@ -233,7 +233,7 @@ private:
|
||||||
|
|
||||||
void InconclusiveXml() const {
|
void InconclusiveXml() const {
|
||||||
// Location
|
// Location
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs(1, fooCpp5);
|
std::list<ErrorMessage::FileLocation> locs(1, fooCpp5);
|
||||||
|
|
||||||
// Inconclusive error message
|
// Inconclusive error message
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error", "errorId", true);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error", "errorId", true);
|
||||||
|
@ -247,7 +247,7 @@ private:
|
||||||
|
|
||||||
void SerializeInconclusiveMessage() const {
|
void SerializeInconclusiveMessage() const {
|
||||||
// Inconclusive error message
|
// Inconclusive error message
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs;
|
std::list<ErrorMessage::FileLocation> locs;
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error", "errorId", true);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error", "errorId", true);
|
||||||
ASSERT_EQUALS("7 errorId"
|
ASSERT_EQUALS("7 errorId"
|
||||||
"5 error"
|
"5 error"
|
||||||
|
@ -272,7 +272,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerializeSanitize() const {
|
void SerializeSanitize() const {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs;
|
std::list<ErrorMessage::FileLocation> locs;
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, std::string("Illegal character in \"foo\001bar\""), "errorId", false);
|
ErrorMessage msg(locs, emptyString, Severity::error, std::string("Illegal character in \"foo\001bar\""), "errorId", false);
|
||||||
|
|
||||||
ASSERT_EQUALS("7 errorId"
|
ASSERT_EQUALS("7 errorId"
|
||||||
|
@ -291,11 +291,11 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerializeFileLocation() const {
|
void SerializeFileLocation() const {
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc1(":/,;", 654, 33);
|
ErrorMessage::FileLocation loc1(":/,;", 654, 33);
|
||||||
loc1.setfile("[]:;,()");
|
loc1.setfile("[]:;,()");
|
||||||
loc1.setinfo("abcd:/,");
|
loc1.setinfo("abcd:/,");
|
||||||
|
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locs{loc1};
|
std::list<ErrorMessage::FileLocation> locs{loc1};
|
||||||
|
|
||||||
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error", "errorId", true);
|
ErrorMessage msg(locs, emptyString, Severity::error, "Programming error", "errorId", true);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "testsuite.h"
|
#include "testsuite.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "standards.h"
|
#include "standards.h"
|
||||||
|
|
|
@ -131,7 +131,7 @@ private:
|
||||||
|
|
||||||
exec.reportOut(*i);
|
exec.reportOut(*i);
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage errMessage;
|
ErrorMessage errMessage;
|
||||||
errMessage.setmsg(*i);
|
errMessage.setmsg(*i);
|
||||||
|
|
||||||
// no xml option
|
// no xml option
|
||||||
|
@ -154,9 +154,9 @@ private:
|
||||||
|
|
||||||
CLEAR_REDIRECT_ERROUT;
|
CLEAR_REDIRECT_ERROUT;
|
||||||
// possible change of msg for xml option
|
// possible change of msg for xml option
|
||||||
// with ErrorLogger::ErrorMessage::fixInvalidChars(), plus additional XML formatting
|
// with ErrorMessage::fixInvalidChars(), plus additional XML formatting
|
||||||
execXML.reportInfo(errMessage);
|
execXML.reportInfo(errMessage);
|
||||||
// undo the effects of "ErrorLogger::ErrorMessage::fixInvalidChars()"
|
// undo the effects of "ErrorMessage::fixInvalidChars()"
|
||||||
// replacing octal constants with characters
|
// replacing octal constants with characters
|
||||||
std::string myErr;
|
std::string myErr;
|
||||||
std::string myErrOrg = GET_REDIRECT_ERROUT;
|
std::string myErrOrg = GET_REDIRECT_ERROUT;
|
||||||
|
|
|
@ -360,7 +360,7 @@ void TestFixture::reportOut(const std::string & outmsg)
|
||||||
output << outmsg << std::endl;
|
output << outmsg << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestFixture::reportErr(const ErrorLogger::ErrorMessage &msg)
|
void TestFixture::reportErr(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
const std::string errormessage(msg.toString(mVerbose, mTemplateFormat, mTemplateLocation));
|
const std::string errormessage(msg.toString(mVerbose, mTemplateFormat, mTemplateLocation));
|
||||||
if (errout.str().find(errormessage) == std::string::npos)
|
if (errout.str().find(errormessage) == std::string::npos)
|
||||||
|
|
|
@ -84,7 +84,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
void bughuntingReport(const std::string &/*str*/) OVERRIDE {}
|
void bughuntingReport(const std::string &/*str*/) OVERRIDE {}
|
||||||
void reportOut(const std::string &outmsg) OVERRIDE;
|
void reportOut(const std::string &outmsg) OVERRIDE;
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) OVERRIDE;
|
void reportErr(const ErrorMessage &msg) OVERRIDE;
|
||||||
void run(const std::string &str);
|
void run(const std::string &str);
|
||||||
static void printHelp();
|
static void printHelp();
|
||||||
const std::string classname;
|
const std::string classname;
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
void reportOut(const std::string &outmsg) OVERRIDE {
|
void reportOut(const std::string &outmsg) OVERRIDE {
|
||||||
next->reportOut(outmsg);
|
next->reportOut(outmsg);
|
||||||
}
|
}
|
||||||
void reportErr(const ErrorLogger::ErrorMessage &msg) OVERRIDE {
|
void reportErr(const ErrorMessage &msg) OVERRIDE {
|
||||||
if (!msg.callStack.empty() && !settings.nomsg.isSuppressed(msg.toSuppressionsErrorMessage()))
|
if (!msg.callStack.empty() && !settings.nomsg.isSuppressed(msg.toSuppressionsErrorMessage()))
|
||||||
next->reportErr(msg);
|
next->reportErr(msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,13 @@ add_executable(dmake EXCLUDE_FROM_ALL
|
||||||
dmake.cpp
|
dmake.cpp
|
||||||
${CMAKE_SOURCE_DIR}/cli/filelister.cpp
|
${CMAKE_SOURCE_DIR}/cli/filelister.cpp
|
||||||
${srcs_tools}
|
${srcs_tools}
|
||||||
|
${CMAKE_SOURCE_DIR}/lib/utils.cpp
|
||||||
${CMAKE_SOURCE_DIR}/externals/simplecpp/simplecpp
|
${CMAKE_SOURCE_DIR}/externals/simplecpp/simplecpp
|
||||||
)
|
)
|
||||||
target_include_directories(dmake PRIVATE ${CMAKE_SOURCE_DIR}/cli ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp)
|
target_include_directories(dmake PRIVATE ${CMAKE_SOURCE_DIR}/cli ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp)
|
||||||
|
if (WIN32 AND NOT BORLAND)
|
||||||
|
target_link_libraries(dmake Shlwapi.lib)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_custom_target(run-dmake $<TARGET_FILE:dmake>
|
add_custom_target(run-dmake $<TARGET_FILE:dmake>
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
|
Loading…
Reference in New Issue