Daniel Marjamäki
6b1a2dcc5d
Fixed #7788 (Varid missing for member variable in ctor of template class)
2017-11-10 21:03:15 +01:00
Daniel Marjamäki
799f953c00
Fixed #8269 (Tokenizer: wrong varid (using namespace A::B))
2017-11-09 23:15:16 +01:00
Daniel Marjamäki
2408f01cc0
Fixed #8270 (Tokenizer: wrong varid (using namespace std))
2017-11-09 22:08:58 +01:00
Dmitry-Me
432ea03f59
Expect warning for wrong argument sign
2017-11-09 19:07:41 +03:00
Daniel Marjamäki
b67cf0a475
Improved handling of varid in complex scopes
2017-11-09 15:58:08 +01:00
Daniel Marjamäki
ced3f4cde8
astyle formatting
...
[ci skip]
2017-11-09 15:57:03 +01:00
Dmitry-Me
94dd63f196
Fix FN for std::uintmax_t passed as %lx, %lu scanf read targets
2017-11-09 15:38:48 +03:00
Dmitry-Me
b301b44897
Fix FN for unsigned ptrdiff_t passed as %lu into scanf
2017-11-09 14:43:09 +03:00
Dmitry-Me
054444167d
Improve test coverage for %lx used with scanf
2017-11-09 14:15:02 +03:00
Dmitry-Me
78be821431
Fix FN for std::uintmax_t passed as %llx, %llu scanf read targets
2017-11-09 11:28:07 +03:00
Daniel Marjamäki
26b9e1528c
Fixed #7000 (Invalid varid - matching class with same name from other namespace)
2017-11-08 22:52:27 +01:00
Dmitry-Me
74c778c5f0
Fix FN when unsigned ptrdiff_t is passed as %llu into scanf
2017-11-09 00:26:07 +03:00
Dmitry-Me
703d86992d
Fix FN when size_t, uintmax_t are passed as %Lx into scanf
2017-11-08 23:52:49 +03:00
Dmitry-Me
c563917a5d
Improve test coverage for intmax_t, uintmax_t, intptr_t, uintptr_t used as scanf read targets
2017-11-08 18:13:45 +03:00
Dmitry-Me
89b83b2d16
Fix FN for unsigned ptrdiff_t passed as %Ix into scanf
2017-11-08 15:06:51 +03:00
Dmitry-Me
970aee9ce1
Fix FN for ptrdiff_t passed as %zd into scanf
2017-11-08 14:22:03 +03:00
Dmitry-Me
3d2f86cef7
Improve test coverage for %zd used with scanf
2017-11-08 13:43:10 +03:00
Dmitry-Me
4fcef2f0c7
Improve test coverage for %llu, %llx, %Lu, %lx used with scanf
2017-11-08 12:18:35 +03:00
Dmitry-Me
9d53b70a56
Improve test coverage for Iu, Ix used with scanf
2017-11-08 08:06:05 +03:00
Dmitry-Me
1985d75442
Improve test coverage for %llx, %Lx, %I64x used with scanf
2017-11-08 00:05:21 +03:00
Dmitry-Me
d31107451b
Improve test coverage for void* passed as scanf read target
2017-11-07 23:43:30 +03:00
Dmitry-Me
d4a1c0d8bd
Improve test coverage for %lu and %llu used with printf
2017-11-07 21:44:46 +03:00
Dmitry-Me
043a565f5d
Improve test coverage for %jx, %tx, %zx used with scanf
2017-11-07 00:27:47 +03:00
Dmitry-Me
95b37f665d
Improve test coverage for %lx, %hx, %hhx used with scanf
2017-11-06 23:13:48 +03:00
Dmitry-Me
4681c7e4cf
Improve test coverage for unsigned ptrdiff_t used as scanf read target
2017-11-06 22:04:59 +03:00
Dmitry-Me
41cffe40cf
Improve test coverage for ptrdiff_t used as scanf read target with %Id
2017-11-06 21:01:34 +03:00
Daniel Marjamäki
4a9984d73b
Fixed #8233 (FP uninitvar found in bash:lib/readline/display.c)
2017-11-06 10:28:07 +01:00
Daniel Marjamäki
8b384f8ee5
Fixed #4988 (Tokenizer::setVarId: Wrong varid for inline function parameter)
2017-11-05 22:25:46 +01:00
Daniel Marjamäki
324257ef52
Fixed #7823 (No varid for member variable of type std::bitset< static_cast<int>(2) >)
2017-11-05 17:59:34 +01:00
Daniel Marjamäki
511d14a051
astyle
...
[ci skip]
2017-11-05 17:56:24 +01:00
Daniel Marjamäki
4d8f069907
Renamed pro c sql to embedded sql
2017-11-03 21:04:12 +01:00
Daniel Marjamäki
4f6f1e20dd
Hide Pro*C SQL simplification. Use pro_c_sql.cfg library file if this is wanted.
2017-11-03 13:02:29 +01:00
Alexey Eryomenko
02461753f3
Fix for embedded PL/SQL blocks (Oracle Pro*C) ( #985 )
...
* fix for correct parsing of embedded PL/SQL blocks (Oracle Pro*C)
* enforce SQL block end at the end of nearest outer C block, when
appropriate terminator is not found
* added check for ; at the end of END-EXEC and made SQL block detection
more readable
2017-11-03 11:31:33 +01:00
orbitcowboy
5ba5ea3aaf
testsuite: Improved const correctness of arguments.
2017-10-30 10:57:03 +01:00
Dmitry-Me
3089352edb
Improve test coverage for %lld used with printf
2017-10-27 22:25:34 +03:00
Dmitry-Me
f653b36b87
Fix actual type reported for unsigned ptrdiff_t passed into scanf
2017-10-26 23:47:11 +03:00
Dmitry-Me
02e00a970b
Restore test coverage for "x" conversion used with scanf
2017-10-26 23:36:55 +03:00
Björge Dijkstra
94031ef11d
Fix for conditional memory allocation inside if-condition ( #986 )
...
* Add test cases for allocation inside if-condition
* Fix missed memory leak and false positive double free for allocation inside if-condition
2017-10-26 19:11:00 +02:00
Dmitry-Me
a38854451f
Warn for signed values passed as scanf targets with "x" conversion
2017-10-25 21:22:17 +03:00
Dmitry-Me
2b717c6c31
Improve test coverage for %zd used with scanf
2017-10-24 23:47:04 +03:00
Dmitry-Me
eaa12db761
scanf with %zd expects ssize_t, not ptrdiff_t
2017-10-24 22:01:23 +03:00
Dmitry-Me
709ee6e278
Revert "Initial test coverage for %zd used with scanf"
...
This reverts commit a260b5157a
.
2017-10-24 00:20:04 +03:00
Dmitry-Me
a748ced9da
Improve test coverage for %zx, %zu used with printf
2017-10-23 23:44:22 +03:00
Dmitry-Me
a260b5157a
Initial test coverage for %zd used with scanf
2017-10-23 23:42:29 +03:00
Dmitry-Me
481ab0f930
Tests for passing non-pointers as scanf read targets
2017-10-23 23:35:32 +03:00
Daniel Marjamäki
28cfee2d4f
Fixed #8250 (New check: Pointer calculation result cant be NULL unless there is overflow)
2017-10-22 14:32:54 +02:00
Daniel Marjamäki
4cb3548e2b
unsafeClassDivZero: change severity to style
2017-10-21 21:51:58 +02:00
Daniel Marjamäki
5de3c43209
changed id for new checker to unsafeClassDivZero
2017-10-21 21:45:04 +02:00
Daniel Marjamäki
15d814e609
classPublicInterfaceDivZero: Try to make the error message a bit better. Added variable name and what the bad input value is.
2017-10-21 13:00:52 +02:00
Daniel Marjamäki
299835da2f
classPublicInterfaceDivZero: don't warn in overloaded operators. It is normal behaviour that these are not protected.
2017-10-21 08:56:23 +02:00
Daniel Marjamäki
8a7411abdb
CheckClass: Fix wrong 'public interface' warnings
2017-10-20 22:10:55 +02:00
Dmitry-Me
5bf29fae49
Tests for unrecognized conversion specifiers
2017-10-20 21:46:24 +03:00
Dmitry-Me
4e881e98cc
Improve test coverage for %I used with printf
2017-10-20 21:13:14 +03:00
Daniel Marjamäki
1d5e3e4f0c
Fixed #8247 (False positive knownConditionTrueFalse)
2017-10-20 17:31:58 +02:00
Daniel Marjamäki
86c84029e3
New check: Check public interface of classes ( #8248 )
2017-10-20 02:02:51 +02:00
Dmitry-Me
7e2cef4952
Improve test coverage for %z used with printf
2017-10-19 19:05:16 +03:00
Dmitry-Me
f070fa1977
Improve test coverage for passing pointers into printf
2017-10-19 19:03:12 +03:00
Dmitry-Me
975132bc62
Improve test coverage for %td used with printf
2017-10-18 19:00:40 +03:00
Dmitry-Me
b278436069
Improve test coverage for %j used with printf
2017-10-18 18:22:51 +03:00
Dmitry-Me
a7d58a2468
Fix macro parameters list
2017-10-17 23:53:14 +03:00
Dmitry-Me
35a4822b77
Initial test coverage for %td used with scanf
2017-10-17 18:09:10 +03:00
Dmitry-Me
5beea50d3f
Improve test coverage for %ld, %lld, %I64x used with scanf
2017-10-17 18:07:42 +03:00
Daniel Marjamäki
ad1749738e
Fixed #6153 (ValueFlowBeforeCondition: Handle global variables)
2017-10-17 16:55:37 +02:00
Daniel Marjamäki
6d59290858
Fixed #10 (ValueFlow: condition variable has known value in switch case)
2017-10-16 21:51:30 +02:00
Dmitry-Me
f27e98f910
Fix macro parameters list
2017-10-16 18:49:53 +03:00
Daniel Marjamäki
0425f1d46d
Fixed #8241 (FP: Same expression on both sides of operator)
2017-10-16 17:39:50 +02:00
Dmitry-Me
2c61f40c35
Initial test coverage for %hd, %hhd, %jd, %I64d, %I32d used with scanf
2017-10-16 18:07:08 +03:00
Dmitry-Me
0ed8126b15
Tests for missing width specifier for scanf
2017-10-16 17:53:46 +03:00
Dmitry-Me
d6cac72784
Test for %I without width specifier used with printf
2017-10-16 17:51:38 +03:00
Robert Reif
69b75c43b4
SymbolDatabase: fix wrong type in union test.
2017-10-15 09:45:02 -04:00
IOBYTE
352fd7a381
SymbolDatabase: Add support for functions in unions. ( #973 )
2017-10-15 11:49:36 +02:00
Dmitry-Me
cad30446e4
Resolve C4800
2017-10-14 22:50:56 +03:00
Dmitry-Me
2c040096ca
Improve test coverage for va_end() called before va_start()
2017-10-14 19:28:26 +03:00
Dmitry-Me
b678f3c4c4
Improve test coverage for %c used with scanf_s
2017-10-13 19:08:14 +03:00
Dmitry-Me
d32a8884bf
Initial test coverage for %lx, %ld, %llx, %lld, %hx, %hhx, %Lx, %jx, %zx and %tx used with scanf
2017-10-13 18:36:12 +03:00
Dmitry-Me
7a7f34fb11
Improve test coverage for %zx, %zu used with printf
2017-10-13 18:17:33 +03:00
Dmitry-Me
d4a435a520
Tests for %Id, %Ld, %I32x used with scanf
2017-10-12 18:18:38 +03:00
Dmitry-Me
2a6f63d995
Resolve C4305 - double constant truncated to float
2017-10-11 23:36:51 +03:00
Dmitry-Me
d12db51771
Function parameter was not used
2017-10-11 00:43:50 +03:00
Daniel Marjamäki
f9d8dd9f4d
testsuite: don't compare doubles with !=
2017-10-10 22:40:49 +02:00
Dmitry-Me
e59ebed3b0
Remove rather unexpected empty line
2017-10-10 23:18:30 +03:00
Dmitry-Me
bef6d6f446
Improve test coverage for %I used with scanf
2017-10-10 17:27:33 +03:00
Dmitry-Me
fcba5b88c2
Improve test coverage for string literals passed as read target into scanf
2017-10-09 18:50:24 +03:00
Dmitry-Me
9c0e6986da
Passing string literals into printf as %p is fine
2017-10-08 11:14:10 +03:00
Ayaz Salikhov
be2c65eb58
Simplify int vs bool
2017-10-08 07:54:39 +02:00
Daniel Marjamäki
92673afc8f
fixed 'make checkcfg'
2017-10-06 15:16:25 +02:00
Daniel Marjamäki
e4676b70dd
Remove wrong testcase test/cfg/windows.cpp, there is missing configuration for that given code
2017-10-06 14:42:19 +02:00
Daniel Marjamäki
2a6fbe2e3c
astyle formatting
...
[ci skip]
2017-10-05 23:01:42 +02:00
hexcoder
051a18b120
pull request for ticket 8180 (better diagnostic output for bailouts) ( #964 )
...
* sync build instructions from readme.txt
* refactored the patch from ticket 8180. Moved logic from macros to the bailoutInternal function
* adapt to new bailout message format
* adapt to new bailout message format
* adapt to new bailout message format
* compile fix for Microsoft platform
* remove directory part from file locations in bailout message (normalize)
* remove directory part from valueflow message filter
* adapt tests to file format without directory part
* adapt tests to file format without directory part
* new line number agnostic assert_equals methods
* new line number agnostic assert_equals methods
* adapt to new method assertEqualsWithoutLineNumbers()
* adapt to new method assertEqualsWithoutLineNumbers()
* Bugfix: do not replace line number with spaces, remove it
* review changes: const char * -> std::string, size_t -> int, std::to_string() -> MathLib::toString()
* set #line at the beginning to guard against insertions from match compiler
* Bugfix: counting lines can be difficult :-) #line 1 -> #line 2
* added method stripDirectoryPart()
* added method stripDirectoryPart()
* used new method Path::stripDirectoryPart()
* new dependency path.h in lib/valueFlow.cpp
* code cleanup, removing redundant temporary objects and casts
2017-10-05 23:03:13 +02:00
Dmitry-Me
d170b496ba
Improve test coverage for wide string literals passed into printf
2017-10-05 17:45:06 +03:00
orbitcowboy
00bff02e13
Formatted the code. There are no functional changes [ci skip].
2017-10-05 09:02:55 +02:00
Dmitry-Me
da0185387f
Improve coverage for %j used with printf
2017-10-04 17:51:35 +03:00
Alexey Eryomenko
22483baf72
missed simplification in parsing of std function declaration resulted in ( #967 )
...
wrong type detection
2017-10-03 22:10:13 +02:00
Dmitry-Me
9564442167
Improve test coverage for detecting wrong file mode
2017-10-03 18:25:15 +03:00
Dmitry-Me
2b7ef7156a
Improve test coverage for accessing closed files
2017-09-29 17:12:50 +03:00
Daniel Marjamäki
04c2be33a6
Unit testing visual studio import
2017-09-24 22:57:24 +02:00
Daniel Marjamäki
5993c40d5b
Improve 'opposite inner condition' check
2017-09-22 14:01:20 +02:00
Daniel Marjamäki
411c5e5f7e
Fixed #8190 (False positive constStatement - return (struct media_frames_per_second) {0};)
2017-09-21 22:50:46 +02:00
Daniel Marjamäki
71d207c034
Fixed #8226 (Tokenizer: Wrong handling of string literal u"abc")
2017-09-21 13:33:14 +02:00
Daniel Marjamäki
e61222126f
Fixed #8176 (ValueFlow: variable might be changed if it's passed by reference to method)
2017-09-20 22:09:09 +02:00