346 Commits

Author SHA1 Message Date
Paul Fultz II
691f681d86
Fix issue 10235: Regression: oppositeInnerCondition () 2021-04-19 09:15:03 +02:00
Oliver Stöneberg
5de58c4ddd
added clang-tidy to CI () 2021-04-18 21:51:47 +02:00
Paul Fultz II
563c9dd9cc
Fix issue 10208: FP: knownConditionTrueFalse in for loop with function that assigns by ref () 2021-04-18 21:42:27 +02:00
Paul Fultz II
5077663684
Fix issue 9979: false positive: containerOutOfBounds with conditional resize () 2021-03-30 14:02:28 +02:00
Paul Fultz II
9de976b243
Fix issue 10194: hang with followAllReferences() ()
* Decrease depth faster when there is multiple returns
2021-03-30 11:22:56 +02:00
Daniel Marjamäki
42437277dc Update Copyright year 2021-03-21 20:58:32 +01:00
Daniel Marjamäki
fbf63b932e astyle formatting
[ci skip]
2021-02-10 11:42:00 +01:00
Paul Fultz II
0e871c178f
Fix issue 10141: Errors with ref assignment (duplicateValueTenary and knownEmptyContainer) () 2021-02-09 15:27:46 +01:00
Paul Fultz II
a81427f97f
Fix issue 10022: Logical conjunction error between two completely unrelated members () 2021-01-29 10:26:57 +01:00
IOBYTE
4e1ff86bb2
use nonneg int for varid and exprid () 2021-01-27 19:49:13 +01:00
Ken-Patrick Lehrmann
00707455be
10110: Fix FP knownConditionTrueFalse () 2021-01-25 17:23:47 +01:00
Daniel Marjamäki
772b44d11a Fixed compiler warnings 2021-01-23 18:04:28 +01:00
Paul Fultz II
c860de8565
Fix issue 8143: valueFlowCondition: before and inside while () 2021-01-23 17:52:01 +01:00
Paul Fultz II
a6f4fbae54
Fix issue 2741: False negative: redundant assignment of x to itself (ref = x) () 2021-01-22 11:00:57 +01:00
Oliver Stöneberg
b2ed372f75
various optimizations () 2021-01-16 19:05:51 +01:00
Paul Fultz II
b1c56d33ac
Fix issue 9133: Invalid iterator; vector::push_back, functions () 2021-01-11 18:47:38 +01:00
Paul Fultz II
678ee00fe9
Infer variables from conditions in valueFlowSubfunction () 2021-01-11 08:00:13 +01:00
Rikard Falkeborn
50cdb6cbfc
Astyle: sync windows and linux folders () 2021-01-06 17:13:44 +01:00
Paul Fultz II
a95c931da0
Fix issue 8501: false negative: (style) Opposite expression on both sides of () 2021-01-05 12:07:27 +01:00
Daniel Marjamäki
1d6c0976e5 astyle formatting
[ci skip]
2021-01-01 08:56:17 +01:00
miltolstoy
ee8d5b972a
checkunusedvar: handle array element change using pointer arithmetic () 2021-01-01 08:06:20 +01:00
Daniel Marjamäki
bcf6039558 Fixed (False positive: redundant assignment, there is break) 2020-12-25 09:08:15 +01:00
Daniel Marjamäki
b8f45a5c65 Replace and fix findBreakScope with findNextTokenFromBreak 2020-12-25 08:43:14 +01:00
Daniel Marjamäki
8bd783f820 Refactoring; Added findBreakScope and Scope::isLoopScope() 2020-12-24 22:58:31 +01:00
Paul Fultz II
e12a733ee9
Fix issue 10053: False positive: Same value on both branches of ternary operator () 2020-12-23 13:37:28 +01:00
Paul Fultz II
904d52acac
Fix issue 10004: ValueFlow: pointer value, wrongly set known value () 2020-12-03 07:15:31 +01:00
Daniel Marjamäki
4330a43acb Fixed (FP: uninitvar when reading to struct) 2020-11-11 22:47:23 +01:00
Daniel Marjamäki
7182da5c8e astyle formatting 2020-11-11 09:17:54 +01:00
Paul Fultz II
bd7e915c20
Add generic reverse valueflow () 2020-11-10 16:00:55 +01:00
Ken-Patrick Lehrmann
79bdd64689
Fix false positive memoryleak ()
```
int *f() {
  int *p = static_cast<int *>(realloc(nullptr, 10));
  if (!!(!p)) {
    return nullptr;
  }
  return p;
}

```
would give
```
memleak2.cpp:4:5: error: Memory leak: p [memleak]
    return nullptr;
    ^
```
Because of the additional `!!̀ .
2020-11-10 15:59:51 +01:00
Armin Müller
08cef9e815
Typos found by running "codespell" () 2020-10-15 19:24:13 +02:00
Paul Fultz II
7b6d3f8061
Fix issue 9907: False positive: knownEmptyContainer after function call with :: () 2020-09-20 22:37:28 +02:00
Daniel Marjamäki
c563944fdd astyle formatting 2020-09-20 20:14:30 +02:00
Paul Fultz II
857722f859
Fix issue 9711: FP knownConditionTrueFalse for variable modified via pointer () 2020-09-20 14:27:09 +02:00
Paul Fultz II
c2e8051196
Fix issue 9904: False positive: duplicateCondition when modifying variable in lambda () 2020-09-18 07:44:26 +02:00
Paul Fultz II
782684a7cc
Fix issue 9530: False positive: Reference to temporary returned when using initializer lists () 2020-09-17 08:33:16 +02:00
Paul Fultz II
94850fec3f
Fix issue 9897: False positive: nullPointerRedundantCheck () 2020-09-14 09:17:29 +02:00
Paul
c568e8ea78 Format 2020-09-10 22:59:19 -05:00
Paul
71bc79ac28 Fix issue 9889: False positive: Using reference to dangling temporary with function object 2020-09-10 22:58:17 -05:00
Daniel Marjamäki
f052d32e31 astyle formatting 2020-09-10 08:02:45 +02:00
Paul
5033fb4418 Fix issue 9869: False positive: knownEmptyContainer when passed to constructor 2020-09-09 22:23:42 -05:00
Paul Fultz II
bfe53fce04
Fix issue 9878: false positive: multiCondition () 2020-09-09 15:39:36 +02:00
Paul
8d7088aa24 Fix issue 9835: False negative: Return reference to temporary with const reference 2020-09-08 18:30:45 -05:00
Daniel Marjamäki
0c6dc84cbb astyle formatting
[ci skip]
2020-09-07 10:56:02 +02:00
Paul Fultz II
a4f43fc2ad
Fix issue 8234: false negative: (warning) Opposite inner 'if' condition leads to a dead code block. () 2020-09-07 07:53:41 +02:00
Paul Fultz II
cc2bc74084
Track lifetime for lambdas with explicit capture () 2020-09-05 07:56:01 +02:00
Paul Fultz II
32df807b22
Fix issue 9783: wrong lifetime analysis temporary assigned to object () 2020-09-02 07:13:15 +02:00
Paul Fultz II
3e99bff764
Same expression when comparing with zero () 2020-08-31 08:48:48 +02:00
Paul Fultz II
ac846b96d1
New check: Iterating a known empty container () 2020-08-22 09:16:26 +02:00
Paul Fultz II
becdf20310
Fix crash in isSameExpression () 2020-08-22 07:05:21 +02:00