cppcheck/test
Rikard Falkeborn 52264b9c26
Fix #11401 nullpointer dereference with alignof (#4601)
* checknullpointer: Don't report dereference with alignof

* Refactor unevaluating operator check in checknullpointer

Unifying these ensures the different checks treat the operators the
same.

* Fix FP with _Alignof and null pointer

Just like alignof, _Alignof does not evaluate its operand.

* CheckNullPointer: Also support compiler specific alignof

This fixes #11401 which is about __alignof__. For good measure, also add
the microsoft extensions __alignof and _alignof.
2022-11-27 09:20:19 +01:00
..
bug-hunting Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
cfg Fix 11396, doublefree on munmap in if-statement (#4594) 2022-11-26 15:45:27 +01:00
cli selfcheck : cleaned up some suppressions, fixed warnings and some cleanups (#4436) 2022-09-06 23:11:39 +02:00
synthetic use python3 on debians too (#3812) 2022-11-03 22:14:30 +01:00
testsuites Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
CMakeLists.txt some small cleanups and refactorings (#4488) 2022-09-24 11:59:13 +02:00
options.cpp Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
options.h Update Copyrights 2022-08-28 14:22:12 +02:00
precompiled.h
redirect.h include all (internal non-generated) headers in clang-tidy checks (#4100) 2022-10-16 13:51:17 +02:00
test.cxx
test64bit.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testanalyzerinformation.cpp Fix sense of test (.analyzerinfo files get placed in wrong directory) (#4486) 2022-09-21 17:38:23 +02:00
testassert.cpp Fixed #9926 (False positive assertWithSideEffects, calling method that has no side effects) 2022-10-12 07:51:50 +02:00
testastutils.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testautovariables.cpp Fix #11362 FP returnDanglingLifetime for pointer to struct member in static array (#4563) 2022-10-22 00:27:30 +02:00
testbool.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testboost.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testbufferoverrun.cpp Fix #11361 FP ctuPointerArith with unknown buffer size (#4591) 2022-11-23 19:11:47 +01:00
testcharvar.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testclangimport.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testclass.cpp Fix #11383 FP selfAssignment: lambda capture / #11380 FP operatorEqRetRefThis (#4581) 2022-11-13 21:20:44 +01:00
testcmdlineparser.cpp dump: output language to dumpfile 2022-11-20 12:30:09 +01:00
testcondition.cpp Add tests for #9327, #10597 (#4566) 2022-10-25 19:41:48 +02:00
testconstructors.cpp Fix crash on nullptr (#4582) 2022-11-13 23:04:51 +01:00
testcppcheck.cpp enabled and fixed `readability-named-parameter` clang-tidy warnings (#4487) 2022-09-27 20:03:25 +02:00
testerrorlogger.cpp Cppcheck: Write product name if provided in xml output 2022-07-07 17:35:13 +02:00
testexceptionsafety.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testfilelister.cpp Fixed #11395 (Cant exclude file) 2022-11-24 13:45:57 +01:00
testfunctions.cpp Typo found in Summary of CWE: 758 (#4553) 2022-10-20 19:11:15 +02:00
testgarbage.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testimportproject.cpp Fixed #11102 (False positive: unreadVariable when union in derived struct is used) 2022-10-11 20:47:07 +02:00
testincompletestatement.cpp Fix #11370 FP constStatement with lambda (#4570) 2022-11-01 11:50:08 +01:00
testinternal.cpp added more missing `sstream` includes (#4384) 2022-08-19 18:23:15 +02:00
testio.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testleakautovar.cpp Fix #11391 FP doubleFree with goto (#4587) 2022-11-19 16:49:34 +01:00
testlibrary.cpp applied clang-tidy `misc-const-correctness` fixes for POD types, iterators and references (#4529) 2022-10-02 07:12:40 +02:00
testmathlib.cpp Fix #11368 FP "Same value in both branches of ternary operator" on plus and minus zero (#4569) 2022-10-31 15:18:25 +01:00
testmemleak.cpp Fix leakNoVarFunctionCall FP (#4523) 2022-09-29 21:58:11 +02:00
testnullpointer.cpp Fix #11401 nullpointer dereference with alignof (#4601) 2022-11-27 09:20:19 +01:00
testoptions.cpp removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
testother.cpp Improve fix for #11383 FP selfAssignment: lambda capture (#4584) 2022-11-18 19:44:32 +01:00
testpath.cpp Fixed whole program analysis 2022-07-12 22:58:52 +02:00
testpathmatch.cpp removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
testplatform.cpp Implemented error handling in cppcheck::Platform::loadFromXmlDocument(), enabled related unit test (#8409) (#4181) 2022-06-08 12:35:23 +02:00
testpostfixoperator.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testpreprocessor.cpp Typos found by running "codespell" (#4578) 2022-11-09 22:52:03 +01:00
testprocessexecutor.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testrunner.cpp Update copyright year 2022-02-05 11:45:17 +01:00
testrunner.vcxproj LCppC backports: Refactorizations/Optimizations (#4204) 2022-08-21 17:21:02 +02:00
testrunner.vcxproj.filters LCppC backports: Refactorizations/Optimizations (#4204) 2022-08-21 17:21:02 +02:00
testsimplifytemplate.cpp #11351 follow-up: Handle more variadic template arguments (#4554) 2022-10-22 00:28:33 +02:00
testsimplifytokens.cpp Fix #11359 FP constStatement for function-local struct definition+initialization statement (#4561) 2022-10-22 00:27:19 +02:00
testsimplifytypedef.cpp Fix #11373 typedef: not simplified after inline keyword (#4574) 2022-11-02 15:15:33 +01:00
testsimplifyusing.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testsizeof.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
teststl.cpp Fix #10412 FN useStlAlgorithm with iterators (#4157) 2022-10-16 13:46:26 +02:00
teststring.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testsuite.cpp applied clang-tidy `misc-const-correctness` fixes for POD types, iterators and references (#4529) 2022-10-02 07:12:40 +02:00
testsuite.h Remove bug hunting. This feature will be provided in Cppcheck premium. 2022-04-11 07:31:33 +02:00
testsummaries.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testsuppressions.cpp Fix #10412 FN useStlAlgorithm with iterators (#4157) 2022-10-16 13:46:26 +02:00
testsymboldatabase.cpp Fix #11385 debug: SymbolDatabase::findFunction found '>' without link. (#4583) 2022-11-14 21:08:15 +01:00
testthreadexecutor.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testtimer.cpp removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
testtoken.cpp Fix #10412 FN useStlAlgorithm with iterators (#4157) 2022-10-16 13:46:26 +02:00
testtokenize.cpp Fix lambda capture template syntax error (#4593) 2022-11-23 20:15:10 +01:00
testtokenlist.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testtokenrange.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testtype.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testuninitvar.cpp Fix #11321 FP uninitvar for in-class member initialization (#4547) 2022-10-14 19:48:27 +02:00
testunusedfunctions.cpp various optimizations (#4535) 2022-10-06 20:12:07 +02:00
testunusedprivfunc.cpp Respect [[maybe_unused]] in unusedPrivateFunction (#4579) 2022-11-10 20:58:39 +01:00
testunusedvar.cpp Add tests for #9327, #10597 (#4566) 2022-10-25 19:41:48 +02:00
testutils.cpp fixed handling of incomplete char/string literals in `isPrefixStringCharLiteral()` - also optimized it a bit (#4541) 2022-10-09 11:19:19 +02:00
testutils.h enabled and fixed `readability-named-parameter` clang-tidy warnings (#4487) 2022-09-27 20:03:25 +02:00
testvaarg.cpp iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) 2022-09-16 07:15:49 +02:00
testvalueflow.cpp Fix #10412 FN useStlAlgorithm with iterators (#4157) 2022-10-16 13:46:26 +02:00
testvarid.cpp #11134 Fix broken AST with (designated) initializers (#4550) 2022-10-19 07:25:15 +02:00