Daniel Marjamäki
1faca91c1d
Added 'endsWith' utility function. This will make compiling the democlient easier.
2017-04-01 18:14:18 +02:00
PKEuS
2938278f00
Refactorization: Store minsizes in vector instead of list which has less overhead
2017-03-27 17:53:43 +02:00
PKEuS
92414b923a
Library: Support variadic functions which are not a formatstr-function
2017-03-14 17:41:34 +01:00
PKEuS
2f0db369f0
Refactorization: Avoid construction of empty strings by using emptyString
2017-03-01 10:50:50 +01:00
PKEuS
40401534d7
Refactorized Library
2016-12-06 14:50:27 +01:00
PKEuS
2f6350a0d0
Refactorized Library
2016-12-06 14:09:28 +01:00
PKEuS
6e8ac13325
Refactorization:
...
- Optimized std::string usage
- Replaced list by vector
- Moved iterator into loop head
- Ran AStyle
2016-12-05 17:45:34 +01:00
PKEuS
d665641a76
Refactorizations:
...
- use std::string::pop_back() and std::string::back()
- pass argument as const std::string&
- Moved iterator into for loop head
2016-12-05 14:50:01 +01:00
Daniel Marjamäki
0e9810b7f6
CheckStl: validation of iterators returned from functions
2016-11-01 14:08:42 +01:00
Daniel Marjamäki
08a618c476
Library: Add <iterator> element in <function> <arg>. Not used by any checks yet.
2016-10-25 23:07:18 +02:00
Daniel Marjamäki
f973a9a9d5
SymbolDatabase: Refactoring handling of library-function return type
2016-10-23 23:20:36 +02:00
Daniel Marjamäki
c8f831b70d
Library: Allow that type of function return is specified. Fixes #7668 .
2016-10-23 23:04:15 +02:00
Daniel Marjamäki
fae4a4dacf
Fixed #7668 (ValueFlow: return value from abs)
2016-10-17 13:05:19 +02:00
Daniel Marjamäki
03a6282ab3
Fixed #7338 (Library: method in base class)
2016-09-04 14:14:21 +02:00
Daniel Marjamäki
789aef7fde
Fixed #4920 (Microsoft ATL/MFC CString::Format argument checking)
2016-08-19 17:36:27 +02:00
Daniel Marjamäki
095b2f73f7
Library: look for cfg files in more paths, include exepath even if CFGDIR is used.
2016-08-01 12:58:33 +02:00
PKEuS
ded8d80b23
Library: Support arguments with default value. Fixed default value handling for <container> tags broken in last commit.
2016-07-09 12:44:17 +02:00
PKEuS
b5d3ecb942
Updated TinyXML, make use of second argument of XMLElement::Attribute()
2016-07-09 11:56:07 +02:00
PKEuS
64d2fd2f57
Added new attribute "arg" to <alloc> and <dealloc> to specify the argument that is allocated/deallocated.
...
This fixes several issues with allocation functions in windows.cfg, such as HeapAlloc() and VirtualAllocEx() (#7503 )
2016-05-22 17:19:14 +02:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
Alexander Mai
9d8dffbd79
#6269 false positives in case of overloaded standard library functions. Detect memset() with proper argument cound, using new function numberOfArguments()
2015-12-06 12:50:05 +01:00
PKEuS
70767a30c4
Small refactorizations:
...
- Avoid calling c_str() for functions that take std::string
- Avoid copying std::list
2015-12-03 14:19:30 +01:00
PKEuS
e8522c7883
Small refactorizations:
...
- #include cleanup
- Use std::array instead of std::vector
- Do not create a stringstream to concatenate 4 strings
- Use std::cout instead of printf
2015-11-29 10:56:44 +01:00
PKEuS
57d1196386
Replaced CheckNonReentrantFunctions and CheckObsoleteFunctions by generic CheckFunctions which is based on Library ( #6529 )
2015-11-22 09:18:07 +01:00
PKEuS
6590d46013
Added missing functionality to <container> elements in Librarie, completed STL container definitions in std.cfg
2015-11-20 18:22:55 +01:00
PKEuS
53b2eca983
Reimplemented CheckStl::stlBoundaries() based on Libraries; Added support for iterators to libraries
2015-11-20 15:53:14 +01:00
Daniel Marjamäki
0f9d90d2be
Changed Copyrights. Removed my name.
2015-11-18 20:04:50 +01:00
Daniel Marjamäki
2a4cceae9e
Library: Refactor handling of comma-separated names
2015-11-15 15:24:10 +01:00
Daniel Marjamäki
f5bd00f153
Library: return true from Library::isnullargbad() for format string arguments. Related with #7012 .
2015-10-03 20:51:45 +02:00
Daniel Marjamäki
28e3c266b3
Fixed #7012 (False positive uninitvar - first argument to snprintf)
2015-10-03 18:35:16 +02:00
Dmitry-Me
ca75096141
Eliminate duplicate find() calls
2015-08-27 11:19:51 +03:00
Daniel Marjamäki
7bb9d2d2f3
minor tweak. use isNotLibraryFunction in Library to prevent false matches
2015-08-15 16:48:30 +02:00
PKEuS
b77912a0b5
Support namespaces in CheckOther::checkIgnoredReturnValue()
2015-08-15 12:19:14 +02:00
PKEuS
ebfdacb0d3
Introduced .cfg file format version to 2 (to prevent older cppcheck versions from failing silently when reading them), because 5b287fc849
introduced a backward-incompatible feature.
...
Increased format version of std.cfg, which is the only cfg file that makes use of the new backward incompatible feature.
Refactorization: Avoid a redundant std::string::find()-call
2015-08-11 14:05:01 +02:00
Daniel Marjamäki
a70c57daa2
Library: move Library::alloc and Library::dealloc from header to cpp file and use the functionName utility function
2015-08-10 18:36:09 +02:00
Daniel Marjamäki
3a1a34751f
Library: Initial handling of method calls
2015-08-10 09:41:06 +02:00
Daniel Marjamäki
5b287fc849
Library: The <function> name attribute can now have a comma separated list of names
2015-08-09 21:27:57 +02:00
Daniel Marjamäki
06110689a6
Replace Token::Match with Token::simpleMatch
2015-08-09 20:07:38 +02:00
Daniel Marjamäki
b70fe4c609
Fixed #6711 (Add namespace support to library files)
2015-08-09 19:55:33 +02:00
PKEuS
7f2b6881b3
Refactorization: Avoid including path.h in (almost) every source file (via library.h)
2015-03-11 22:54:45 +01:00
PKEuS
3d2e26daeb
Small Refactorizations:
...
- Removed #include "symboldatabase.h" from library.h
- Moved variable to inner scope in tokenize.cpp
- Removed unnecessary variable in tokenize.cpp
2015-03-11 20:52:54 +01:00
Daniel Marjamäki
2d8a6c7b89
Fixed #6571 (Library::isNotLibraryFunction: Return true for methods)
2015-03-08 16:13:32 +01:00
Daniel Marjamäki
830f656a25
Library: variables are not library functions (variable declarations can look like function calls)
2015-03-01 11:46:43 +01:00
PKEuS
9dfb864522
Fixed two nullpointer messages in cppcheck
2015-02-01 15:21:09 +01:00
Daniel Marjamäki
73113c67e7
Fixed #6480 (False positive unreachableCode - member function exit called instead of ::exit())
2015-01-31 16:55:55 +01:00
PKEuS
b2835051df
Refactorization: Renamed Token::Match pattern %var% to %name%, implement new pattern %var% which is true if varId > 0.
2015-01-31 12:32:04 +01:00
Daniel Marjamäki
57ec1aea91
Library: Don't rely on ast in isNotLibraryFunction since it's used in tokenizer
2015-01-31 10:24:10 +01:00
PKEuS
98e33a189f
Enhanced CheckBufferOverrun:
...
- Fixed bug in library: manual and existing libraries use "size", but library.cpp reads "sizeof" as podtype attribute
- Fixed a couple of bugs in handling unknown size in checkbufferoverrun.cpp, get size from library if available.
2015-01-30 20:27:48 +01:00
Daniel Marjamäki
3285f85ebf
Fixed #6460 (Library: better function/type matching)
2015-01-27 17:55:18 +01:00
PKEuS
787cbcb02e
Accept unknown elements in Library files, but print a warning. This fixes backward compatibility of libraries with older cppcheck versions
2015-01-10 22:18:57 +01:00