Commit Graph

11627 Commits

Author SHA1 Message Date
Daniel Marjamäki b6833b525f Clang import 2020-01-25 17:01:17 +01:00
Daniel Marjamäki 6beadd9eb9 Restore cppcheck.cpp 2020-01-25 16:14:56 +01:00
Daniel Marjamäki f911495db3 Clang import; Handle clang-9 while loop better 2020-01-25 16:10:13 +01:00
Daniel Marjamäki 0bab9ba6e3 Clang import; Handle clang-9 range for loop 2020-01-25 14:47:51 +01:00
Daniel Marjamäki afad8b1f5c Clang import; Set Scope::check 2020-01-25 11:59:01 +01:00
Simon Martin 2840173a72 Ticket #9569: Do not substitute type aliases within enum definitions. (#2504) 2020-01-25 10:18:37 +01:00
Simon Martin 224a41361d Ticket #9572: Properly detect designated initializers. (#2496) 2020-01-25 10:14:16 +01:00
Daniel Marjamäki 569523bbef Clang import; Better handling of enums 2020-01-25 09:31:47 +01:00
Daniel Marjamäki b3e192a4e1 astyle formatting
[ci skip]
2020-01-24 21:34:47 +01:00
Daniel Marjamäki 1cabba8755 Clang import; Improved enum handling 2020-01-24 21:34:29 +01:00
Daniel Marjamäki 0929c3cced Cleanup code, CppCheck::checkNormalTokens executes the bug hunting code 2020-01-24 20:37:24 +01:00
Daniel Marjamäki 7db54bde6f Run normal checks on --clang output 2020-01-24 18:04:39 +01:00
Aleksandr Serbin 11993ed999 Ticket 5607: Allow to exclude folders with glob pattern (#2498) 2020-01-24 07:06:09 +01:00
Daniel Marjamäki fc813cef2a Clang import: IfStmt 2020-01-23 16:18:39 +01:00
Daniel Marjamäki ce77db2b1b Clang import; EnumDecl 2020-01-23 16:06:25 +01:00
Daniel Marjamäki fcd6c62a0d Clang import; Always set Scope::classDef token 2020-01-23 10:33:29 +01:00
Daniel Marjamäki 6a07c2f71a ExprEngine; Check struct member assignment 2020-01-21 20:29:13 +01:00
Daniel Marjamäki 263f80deb8 ExprEngine: Add variable value checker 2020-01-21 20:19:51 +01:00
Daniel Marjamäki 4235a29501 ExprEngine: Handle variable annotations better 2020-01-21 18:55:07 +01:00
Daniel Marjamäki b6db5116c3 Clang import; CXXStdInitializerListExpr 2020-01-21 18:29:04 +01:00
Daniel Marjamäki a20b3a9e2e Clang import; better handling of string literals 2020-01-21 17:47:57 +01:00
Daniel Marjamäki 6386f0e633 Clang import; CXXDeleteExpr 2020-01-21 17:47:57 +01:00
Daniel Marjamäki 9f26e8a356 Clang import; CXXNewExpr 2020-01-21 12:16:39 +01:00
Daniel Marjamäki 7fecc17707 Clang import; CXXThrowExpr 2020-01-21 11:16:22 +01:00
Daniel Marjamäki 549df6a80e Clang import; Fixed wrong AST 2020-01-21 11:07:47 +01:00
Daniel Marjamäki 459e906ae1 Clang import; ConditionalExpr 2020-01-21 07:00:03 +01:00
Daniel Marjamäki e5662ceef2 Clang import; CXXDefaultArgExpr 2020-01-21 06:52:45 +01:00
Daniel Marjamäki f048b4ca57 Clang import; CXXBindTemporaryExpr and CXXTemporaryObjectExpr 2020-01-20 21:43:25 +01:00
Daniel Marjamäki bdc621b7a3 Clang import; MaterializeTemporaryExpr 2020-01-20 21:27:49 +01:00
Daniel Marjamäki 78fcf93342 Clang import; DoStmt 2020-01-20 20:46:33 +01:00
Daniel Marjamäki cd3ad89777 Clang import; GotoStmt, LabelStmt 2020-01-20 19:07:10 +01:00
Daniel Marjamäki 6722ee9d3f test/bug-hunting: add --clang option to the juliet testing 2020-01-20 18:53:40 +01:00
Daniel Marjamäki 3ccd369cf5 Clang import; CaseStmt 2020-01-20 17:38:54 +01:00
Daniel Marjamäki d635ea4b7f Clang import; SwitchStmt 2020-01-20 14:24:03 +01:00
Daniel Marjamäki dea6cc3b76 Clang import; FloatingLiteral 2020-01-20 14:10:43 +01:00
versat 0cf82d6d45 cppcheck.cpp: Fix reserved name "stderr"
Using "stderr" as variable name results in build errors on Windows.
2020-01-20 11:12:23 +01:00
Daniel Marjamäki 9bc43fca1d Fixed crash when printing out ValueFlow debug output 2020-01-20 08:11:57 +01:00
Daniel Marjamäki 8ac2cdd9ff Clang import; If there are syntax errors then abort analysis 2020-01-19 17:30:57 +01:00
Daniel Marjamäki 0eccffe8e3 --clang; require that --cppcheck-build-dir. output files are needed. 2020-01-19 12:33:17 +01:00
Daniel Marjamäki 7d4bd57cc5 Clang import; Fix crash 2020-01-19 09:45:47 +01:00
Daniel Marjamäki 84bb024662 Refactoring; Reuse variable typeSize 2020-01-19 09:17:38 +01:00
Daniel Marjamäki a6ab986217 ExprEngine; In divbyzero report rhs token because that has better location 2020-01-19 09:16:02 +01:00
Daniel Marjamäki 16981f0813 ExprEngine; Fix FP for BailoutValue 2020-01-19 09:10:50 +01:00
Daniel Marjamäki 3d1cb87a11 Clang import; range for 2020-01-18 19:23:37 +01:00
Daniel Marjamäki 36a67c7022 Clang import; fixed ValueType::typeSize calls 2020-01-18 17:32:59 +01:00
Daniel Marjamäki cefd7fb33f Fix testrunner 2020-01-18 12:29:03 +01:00
Daniel Marjamäki 269d21e972 Clang import; Better array handling in sizeof() 2020-01-18 11:55:50 +01:00
Daniel Marjamäki b905547c76 Clang import; Better sizeof/type handling 2020-01-18 11:07:36 +01:00
Daniel Marjamäki f7a30fc99f Rename Verification => Bughunting 2020-01-18 07:25:57 +01:00
Rikard Falkeborn 0bb98aeef9 Fix 9577 (endless recursion in Valueflow::bifurcate()) (#2492)
Ensure bifurcate() does not recurse endlessly where a variable is
initialized recursively, or a variable is initialized as x(0) or x{0}
followed by a recursive assignment (for example int x(0); x = x / 1;).

The first case is solved by bailing out if there initialization is done
using x(0) or x{0}, the second by adding a missing depth argument to a
recursive call.
2020-01-17 03:17:26 +01:00
Daniel Marjamäki bc39cd73f0 Clang import; fix wrong 'sizeof' import 2020-01-17 03:15:08 +01:00
Daniel Marjamäki 272fbfeb74 ExprEngine; Fix Z3 usage for floats 2020-01-16 19:35:05 +01:00
Daniel Marjamäki bc737be0b5 ExprEngine; OLD_Z3 => NEW_Z3 2020-01-16 18:59:47 +01:00
Dmitry-Me 01e0a61ebe Break loops earlier 2020-01-16 18:37:10 +03:00
Daniel Marjamäki 76a048a2c1 Bug hunting; 'hide' the uninitialized variables checking, I need to focus on division by zero and clang import 2020-01-15 21:06:00 +01:00
Daniel Marjamäki 9507fccfc1 ExprEngine: Quick hacks for old Z3 compatibility 2020-01-15 19:46:00 +01:00
Daniel Marjamäki 52d72b6ffc ExprEngine; Fix crash 2020-01-15 18:35:55 +01:00
Daniel Marjamäki 446e7c3c0e ExprEngine; Fix fp in edgevalue 2020-01-15 17:51:34 +01:00
Daniel Marjamäki c79ec9e956 ExprEngine: sizeof() 2020-01-15 15:24:36 +01:00
Daniel Marjamäki 5ac0eb100c Bug hunting; avoid crash when argument is NULL 2020-01-15 07:15:47 +01:00
Daniel Marjamäki 7820b5dbcc Rename 'Verification' to 'Bug hunting' 2020-01-14 21:17:07 +01:00
Daniel Marjamäki dfbf347912 Clang import; Better type 2020-01-13 17:56:30 +01:00
Daniel Marjamäki a17ded3862 Clang import; handle {} that is not a scope better 2020-01-13 13:16:02 +01:00
Daniel Marjamäki 066e43cce3 Clang import; InitListExpr 2020-01-13 12:44:35 +01:00
Daniel Marjamäki bd41b3d713 Clang import; Fixed function arguments in SymbolDatabase 2020-01-13 05:52:46 +01:00
Daniel Marjamäki 9f3df5d630 Clang import; CompoundAssignOperator 2020-01-12 18:41:46 +01:00
Daniel Marjamäki ae7ff940e6 Clang import; minor tweaks 2020-01-12 18:05:45 +01:00
Daniel Marjamäki 1e207e42c5 CppCheck: Try to handle '"' properly in split() 2020-01-12 17:13:26 +01:00
Daniel Marjamäki f4f4377fbf Clang import; Constructor arguments, ExprWithCleanups 2020-01-12 16:49:02 +01:00
Daniel Marjamäki 47e186864b Clang import; Set function pointer properly 2020-01-12 15:15:21 +01:00
Daniel Marjamäki fd1809590c Token: Write function() in ast debug output 2020-01-12 15:04:25 +01:00
Daniel Marjamäki 0e75f16510 verificationUninit: ignore bailout values until it's less noisy 2020-01-12 14:52:15 +01:00
Daniel Marjamäki 1bad69923c astyle formatting
[ci skip]
2020-01-12 13:35:39 +01:00
Daniel Marjamäki 166402b5cf verificationUninit: Avoid some false positives for 'bailout' values 2020-01-12 13:35:09 +01:00
Daniel Marjamäki 88429382b7 Verification; Avoid obvious verificationUninit false positives during bailout 2020-01-12 11:53:49 +01:00
Daniel Marjamäki 55ea06354b ExprEngine: BailoutValue is uninitialized 2020-01-12 10:42:20 +01:00
Daniel Marjamäki e78438e990 astyle formatting
[ci skip]
2020-01-12 10:32:47 +01:00
Daniel Marjamäki 7704f6578f Verification; Fix struct member false negative 2020-01-12 10:29:03 +01:00
Rikard Falkeborn c6e74f4c10 Mathlib: Fix value of suffixed binary integer literal (#2487) 2020-01-12 08:11:12 +01:00
Daniel Marjamäki 668212ac2f SymbolDatabase: Type lookup for clang type strings 2020-01-11 21:24:15 +01:00
Daniel Marjamäki cde757bcd3 Clang import; Type fixes 2020-01-11 18:39:59 +01:00
Daniel Marjamäki abc51afcf1 Clang import; parse clang ast type with ValueType::parseDecl 2020-01-11 18:07:57 +01:00
Daniel Marjamäki ba244be2d6 Clang import; getType() 2020-01-11 16:49:30 +01:00
Daniel Marjamäki aa090a8b45 Clang import; addTypeTokens for function return type 2020-01-11 16:40:22 +01:00
Daniel Marjamäki f7f5f10de4 Clang import; Tweaked IfStmt (Clang 3.8 compatibility) 2020-01-11 16:15:18 +01:00
Daniel Marjamäki 05a34142aa Clang import; forward class declaration 2020-01-11 16:02:25 +01:00
Daniel Marjamäki 380cc78077 Clang; Run ValueFlow 2020-01-11 14:00:41 +01:00
Daniel Marjamäki 6b983a9587 Revert ValueFlow changes, there was unexpected problems in testrunner 2020-01-11 13:11:19 +01:00
Daniel Marjamäki 052eaba632 Clang; run ValueFlow analysis 2020-01-11 13:04:51 +01:00
Daniel Marjamäki 9c38a659a1 Clang import; Fixed CXXConstructExpr without child 2020-01-11 12:16:48 +01:00
Daniel Marjamäki 96ff57e275 ValueFlow; Refactoring 2020-01-11 09:17:32 +01:00
Daniel Marjamäki 30bc67c691 Clang import; CXXNullPtrLiteralExpr 2020-01-10 19:01:33 +01:00
Daniel Marjamäki 7a3bedb583 Clang import; CXXConstructExpr 2020-01-10 18:54:28 +01:00
Daniel Marjamäki c23d33fc0a Clang import; Fixed getSpelling() and getType() 2020-01-10 18:13:47 +01:00
Daniel Marjamäki f667abacf6 Clang import; character literal '\' 2020-01-10 17:37:36 +01:00
Daniel Marjamäki 4c778e0999 Clang import; Rename files/namespace 2020-01-10 16:29:06 +01:00
Daniel Marjamäki 8f1a50ffc0 Clang import; CStyleCastExpr 2020-01-10 16:19:01 +01:00
Daniel Marjamäki 75fd4809e6 Fix compiler warning 2020-01-10 15:08:53 +01:00
Daniel Marjamäki 797ed88147 Fix Cppcheck warning 2020-01-10 15:04:07 +01:00
Daniel Marjamäki 729fca8728 Clang import; handle locations better, only expand function bodies in source file 2020-01-10 14:59:34 +01:00