Commit Graph

22763 Commits

Author SHA1 Message Date
orbitcowboy fae5d869e4 wxwidgets.cfg: Added support for more interfaces 2020-06-20 00:20:09 +02:00
orbitcowboy 55efa5b858 wxwidgets.cfg: Added support for more interfaces 2020-06-19 23:41:53 +02:00
Daniel Marjamäki af45148e58 ExprEngine; Refactor and improve code. Add tests for increments. 2020-06-19 20:40:20 +02:00
Daniel Marjamäki 06aeac75dc Bug hunting; Fix false negatives 2020-06-19 18:38:02 +02:00
Daniel Marjamäki b4443aa5a0 Suppress exceptRethrowCopy false positive 2020-06-19 18:15:04 +02:00
Daniel Marjamäki 8653c4b3a9 ExprEngine; Fix uninitialized value FP in subfunction when argument is passed by value 2020-06-19 18:05:56 +02:00
Daniel Marjamäki 6ec15b6d7b ExprEngine; Simple handling of increment/decrement 2020-06-19 17:35:35 +02:00
Daniel Marjamäki a5a3738df4 Fixed cve.py 2020-06-19 17:13:35 +02:00
orbitcowboy f60e805798 Running astyle [ci skip] 2020-06-19 16:36:09 +02:00
orbitcowboy 4c8c590b4b wxwidgets.cfg: Cleanup event table macros 2020-06-19 16:35:39 +02:00
Daniel Marjamäki c62e345340 Fix Cppcheck warning 2020-06-19 14:11:49 +02:00
Daniel Marjamäki f516bde744 ExprEngine; Fix TODO assertion 2020-06-19 14:05:19 +02:00
Daniel Marjamäki ab663feea8 Add testbughuntingchecks.cpp 2020-06-19 13:38:56 +02:00
Daniel Marjamäki d0ac583b97 Add 'bughuntingchecks' 2020-06-19 13:16:48 +02:00
Daniel Marjamäki cbe038e694 ExprEngine: execute functions in same TU 2020-06-19 10:27:59 +02:00
orbitcowboy 4acc63ac48 wxwidgets.cfg: Added support for more insterfaces 2020-06-19 07:59:17 +02:00
orbitcowboy 879fa9c18e wxwidgets.cfg: Added support for more insterfaces 2020-06-18 21:14:33 +02:00
orbitcowboy 30f1558f1c wxwidgets.cfg: Added support for more insterfaces 2020-06-18 21:10:48 +02:00
orbitcowboy 567ee92c20 wxwidgets.cfg: Added support for more interfaces 2020-06-18 17:14:07 +02:00
orbitcowboy d77c9cc9ff wxwidgets.cfg: Added support for more constants 2020-06-18 17:02:30 +02:00
orbitcowboy ae7f1843ab wxwidgets.cfg: Added support for more constants 2020-06-18 16:59:57 +02:00
orbitcowboy 2ac3892a14 wxwidgets.cfg: Added support for more constants 2020-06-18 16:58:57 +02:00
orbitcowboy f06956c8ae wxwidgets.cfg: Added support for more constants 2020-06-18 16:57:15 +02:00
Daniel Marjamäki d3df68e376 Updated bug hunting test 2020-06-18 14:31:51 +02:00
Daniel Marjamäki 542158d0f4 Bug hunting; checking uninitialized struct member 2020-06-18 13:49:11 +02:00
Daniel Marjamäki 6756587ac9 astyle formatting
[ci skip]
2020-06-18 12:05:24 +02:00
orbitcowboy bf4a6bc09a wxwidgets.cfg: Added support for more constants 2020-06-18 09:58:20 +02:00
Daniel Marjamäki 3f8218af1b Removed CheckClass::operatorEq: does not 'belong' 2020-06-17 20:35:43 +02:00
Daniel Marjamäki 97de6d2e5f
Merge pull request #2686 from Ken-Patrick/boost_throw
Better handle noreturn or throwing functions in valueflow
2020-06-17 20:25:31 +02:00
Ken-Patrick Lehrmann c297ed8204 Better handle noreturn or throwing functions in valueflow
Teaching cppcheck about `BOOST_THROW_EXCEPTION` and
`boost::throw_exception`, and using noreturn information from libraries
in value flow.

This fixes false positive nullPointerRedundantCheck with the following
code:
```
void throwexception(int * buf)
{
    if (!buf)
        boost::throw_exception(std::bad_alloc());
    *buf = 0;
}
```
2020-06-17 19:06:14 +02:00
Daniel Marjamäki fe4657f218 Tweaked cppunit.cfg 2020-06-17 13:10:30 +02:00
Daniel Marjamäki 51a6af299f
Merge pull request #2683 from Ken-Patrick/cast_expandTemplate
Fix handling of c++ casts in template expansion
2020-06-17 09:21:01 +02:00
Daniel Marjamäki 94f92f00fe
Merge pull request #2684 from firewave/precompiled
use precompiled headers if CMake supports it
2020-06-17 07:53:51 +02:00
Daniel Marjamäki d26593321d Fixed Visual Studio compile error 2020-06-16 22:56:01 +02:00
Daniel Marjamäki 4947a3b7ab Bug hunting; review and improve handling of multi dimensional arrays 2020-06-16 22:50:45 +02:00
firewave a49d60f0b3 use precompiled headers if CMake supports it 2020-06-16 19:56:53 +02:00
Ken-Patrick Lehrmann 5c1a2db434 Fix handling of c++ casts in template expansion
Cast were not expanded properly: the `<` was not taken into account in
typeindentlevel, so we would then miss a `>`, resulting in syntaxError.
2020-06-16 19:36:04 +02:00
Daniel Marjamäki d984d84450
Merge pull request #2681 from firewave/py
donate_cpu_lib.py: fixed Python error
2020-06-16 02:40:45 +02:00
Daniel Marjamäki 6faad9cd90 Bug hunting; better handling when assigning multidimensional array in for loop 2020-06-15 22:42:45 +02:00
firewave fa7e687853 donate_cpu_lib.py: fixed Python error 2020-06-15 22:12:22 +02:00
Daniel Marjamäki b36c85d8fd Rename VerifyException to BugHuntingException 2020-06-15 22:07:32 +02:00
orbitcowboy 86e64f6224 Integrated PR #2679 into main 2020-06-15 20:11:20 +02:00
Daniel Marjamäki 33388217a5 new default branch is main 2020-06-15 20:04:57 +02:00
orbitcowboy b60b083af8 wxwidgets.cfg: Added support for more interfaces 2020-06-15 20:03:20 +02:00
Daniel Marjamäki 60208a11d1 donate_cpu: Update OLD_VERSION to 2.1 2020-06-15 19:48:20 +02:00
Daniel Marjamäki e2c99ee697 donate_cpu: master branch was renamed to main 2020-06-15 19:46:34 +02:00
Daniel Marjamäki f5fe5ca2dd
9768: Fix ast with throw in the middle of return (#2678)
* 9768: Fix ast with throw in the middle of return

```
int f(bool x)
{
    return x ? 0 : throw 0;
}
```

The `throw` part was not included in the ast, leading to an invalid
ternary operator.

* 8526: Fix ast construction for ternary operator

This tries to decide a bit more properly when ':' can be part of a
ternary operator. More precisely, there are some times when we want to
delay the construction of the ast for ':', so that it is place
accordingly to the matching '?'.

Typically, this fixes an issue with
`return val < 0 ? throw 1 : val;`,
where the ast for ':' would be constructed during as part of the
`throw`, and the ast for `?` would be invalid.

This patch is a bit of a hardcode, stating that we don't expect ':'
inside a throw, unless there is a complete ternary operator in there
(there can't be a range based for loop, a case in a switch). When we
reach ':', we know we are and the end of the `throw`.
2020-06-15 10:36:02 +02:00
orbitcowboy b3d0a520fc wxwidgets.cfg: Added support for more interfaces. 2020-06-15 09:53:40 +02:00
orbitcowboy 505509e6c0 wxwidgets.cfg: Added support for more interfaces. 2020-06-15 09:47:58 +02:00
orbitcowboy f8c37e771c wxwidgets.cfg: Added support for more interfaces. 2020-06-15 09:42:26 +02:00