Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .selfcheck_suppressions
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ funcArgNamesDifferentUnnamed:externals/tinyxml2/tinyxml2.cpp
funcArgNamesDifferentUnnamed:externals/tinyxml2/tinyxml2.h
knownConditionTrueFalse:externals/tinyxml2/tinyxml2.cpp
nullPointerRedundantCheck:externals/tinyxml2/tinyxml2.cpp
useStlAlgorithm:externals/simplecpp/simplecpp.cpp
funcArgNamesDifferentUnnamed:externals/simplecpp/simplecpp.h
missingMemberCopy:externals/simplecpp/simplecpp.h
shadowFunction:externals/simplecpp/simplecpp.h
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ cli/threadexecutor.o: cli/threadexecutor.cpp cli/executor.h cli/threadexecutor.h
test/fixture.o: test/fixture.cpp externals/tinyxml2/tinyxml2.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/refthunk.h lib/settings.h lib/standards.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/xml.h test/fixture.h test/helpers.h test/options.h test/redirect.h
$(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/fixture.cpp

test/helpers.o: test/helpers.cpp cli/filelister.h externals/simplecpp/simplecpp.h externals/tinyxml2/tinyxml2.h lib/checkers.h lib/config.h lib/filesettings.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/tokenize.h lib/tokenlist.h lib/utils.h lib/xml.h test/helpers.h
test/helpers.o: test/helpers.cpp cli/filelister.h externals/simplecpp/simplecpp.h externals/tinyxml2/tinyxml2.h lib/checkers.h lib/config.h lib/errortypes.h lib/filesettings.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/tokenize.h lib/tokenlist.h lib/utils.h lib/xml.h test/helpers.h
$(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/helpers.cpp

test/main.o: test/main.cpp externals/simplecpp/simplecpp.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/refthunk.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h test/options.h
Expand Down
4 changes: 3 additions & 1 deletion addons/cppcheckdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class MacroUsage:
useline
usecolumn
isKnownValue
arg Argument of an integer constant macro call (INTn_C / UINTn_C), empty for other macros
"""
#preprocessor.cpp/Preprocessor::dump

Expand All @@ -168,9 +169,10 @@ def __init__(self, element):
self.useline = element.get('useline')
self.usecolumn = element.get('usecolumn')
self.isKnownValue = element.get('is-known-value', 'false') == 'true'
self.arg = element.get('arg', '')

def __repr__(self):
attrs = ["name", "file", "linenr", "column", "usefile", "useline", "usecolumn", "isKnownValue"]
attrs = ["name", "file", "linenr", "column", "usefile", "useline", "usecolumn", "isKnownValue", "arg"]
return "{}({})".format(
"MacroUsage",
", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs))
Expand Down
2 changes: 1 addition & 1 deletion addons/test/misra/misra-ctu-1-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ void misra_8_7_external(void) {}

// #12362
void misra_8_7_compliant( void ){}
static void misra_8_7_call(void) { misra_8_7_compliant(); }
static void misra_8_7_call(void) { misra_8_7_compliant(); }
2 changes: 1 addition & 1 deletion addons/test/misra/misra-ctu-2-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ static void misra_8_7_caller(void) {

// #12362
typedef void(*misra_8_7_func_ptr)( void );
static const misra_8_7_func_ptr ptrs[] = { misra_8_7_compliant, NULL };
static const misra_8_7_func_ptr ptrs[] = { misra_8_7_compliant, NULL };
2 changes: 1 addition & 1 deletion addons/test/misra/misra-ctu-test.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ void misra_8_7_external(void);
// #12362
extern void misra_8_7_compliant( void );

#define MISRA_2_5_OK_3 This
#define MISRA_2_5_OK_3 This
4 changes: 2 additions & 2 deletions addons/test/misra/misra-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1943,10 +1943,10 @@ struct { int a; } struct_20_7_s; // 8.4
#define MUL(a ,b ) ( a * b ) // 20.7

#if __LINE__ // 20.8
#endif
#if 2-2
#elif 2+5 // 20.8
#elif 2-2
#endif

#if A // 20.9
#elif B || C // 20.9
#endif
Expand Down
Loading
Loading