Commit Graph

1744 Commits

Author SHA1 Message Date
PKEuS e978a681a3 Removed unused variable 2015-03-15 10:19:35 +01:00
PKEuS 713d993f71 Some refactorizations in Tokenizer:
- Refactorized simplifyTypedef
- Perform some template specific code only on non-C code
2015-03-15 10:04:44 +01:00
Simon Martin 32a7a178e8 Code simplification now that ">>" is turned into "> >" when it closes template argument lists. 2015-03-14 23:02:10 +01:00
PKEuS 430d8ca760 Refactorized code in simplifyEnum() 2015-03-14 20:43:14 +01:00
PKEuS 3d2e26daeb Small Refactorizations:
- Removed #include "symboldatabase.h" from library.h
- Moved variable to inner scope in tokenize.cpp
- Removed unnecessary variable in tokenize.cpp
2015-03-11 20:52:54 +01:00
Simon Martin 9c6a625f91 Ticket #6181: Normalize '>>' into '> >' when it's closing a C++11 template parameter list. 2015-03-07 11:06:04 +01:00
Daniel Marjamäki f705cdce72 Fixed #6556 (Tokenizer::simplifyVarDecl: doesn't simplify template variables properly) 2015-03-06 17:30:20 +01:00
Daniel Marjamäki e38f15ecc0 --check-library: dont write <noreturn> messages now since they cant be fixed. 2015-03-05 07:19:03 +01:00
Daniel Marjamäki 86cdc8e7a6 Fixed #6540 (Tokenizer::simplifyKnownVariables: Missing varid for simplification in conditional code) 2015-03-02 06:18:00 +01:00
Daniel Marjamäki 449b88aa0c Fixed #6547 (Regression - unknown macro causes analysis error) 2015-02-28 11:09:39 +01:00
Daniel Marjamäki 3add466035 Add isFunctionHead() in Tokenizer 2015-02-27 18:29:34 +01:00
Daniel Marjamäki acbf48c7fa Fixed #6548 (Tokenizer: Wrong varid set after function which is throw()) 2015-02-26 16:31:42 +01:00
Alexander Mai 8427398d9d #6539 Segmentation fault in Tokenizer::duplicateTypedef. Avoid crash on garbage code 2015-02-24 11:15:23 +01:00
Daniel Marjamäki d4fa656e58 Refactor and improve Tokenizer::sizeofAddParentheses 2015-02-22 13:38:06 +01:00
PKEuS f04070940e Fixed setVarId on ternary operator in initialization list 2015-02-22 11:57:46 +01:00
Dmitry-Me 6f6f9f7754 Reorder checks, move declaration 2015-02-06 16:30:39 +03:00
Dmitry-Me 21fbc30d59 Calling a function using Class::func() syntax should not be simplified 2015-02-02 10:37:10 +03:00
PKEuS 9dfb864522 Fixed two nullpointer messages in cppcheck 2015-02-01 15:21:09 +01:00
PKEuS a4cc4c3e3f Refactorization: Use SymbolDatabase scope information in ValueFlow 2015-02-01 12:10:20 +01:00
PKEuS 21cb0cfd60 Take simplifyIfNotNull and simplifyIfNot out of simplifyTokenList1 (first step for #6072) 2015-01-31 20:12:02 +01:00
PKEuS 1f97e3001b Fixed calculation of array size (#6487) 2015-01-31 19:06:44 +01:00
PKEuS b2835051df Refactorization: Renamed Token::Match pattern %var% to %name%, implement new pattern %var% which is true if varId > 0. 2015-01-31 12:32:04 +01:00
Samir Aguiar 141a071792 * Added Clang-related flag to gui.pro
* Updated external lib location with PWD variable
2015-01-20 19:20:00 +01:00
Thomas Jarosch c0aceb893e Replace custom code with Settings::isWindowsPlatform() 2015-01-18 12:43:43 +01:00
Thomas Jarosch 9a5260a43f Only simplify Windows's DEBUG_NEW macro on Windows platform 2015-01-18 12:20:23 +01:00
Robert Reif 193645318b Tokenizer: Remove macro in class declaration like 'class DLLEXPORT Fred {}' to be able to handle the class better later 2015-01-17 07:42:49 +01:00
Aneesh Azhakesan S fe5d2fc245 Fixed #5906 (false negative: 'else if' expression is always false (use library to determine if function is pure)) 2015-01-10 12:21:55 +01:00
PKEuS 7452613479 Refactorization:
- Merged messages exceptThrowInNoexecptFunction, exceptThrowInNoThrowFunction, exceptThrowInAttributeNoThrowFunction and exceptThrowInDeclspecNoThrowFunction into a single message.
- Merged Token::fIsDeclspecNothrow into Token::fIsAttributeNothrow
2015-01-09 20:18:09 +01:00
Daniel Marjamäki 6a8293a8b7 Library: More strict matching of functions 2015-01-08 19:31:41 +01:00
orbitcowboy ba837a6f2d Added support for strpbrk to std.cfg. Running astyle. 2015-01-07 02:34:41 +01:00
Daniel Marjamäki 8a6bb46958 Tokenizer: only print AST in debug output if --verbose is used 2015-01-07 06:46:04 +01:00
Daniel Marjamäki b0cc46e98b reverted 840b2fb0, it caused FN. tweaked the Tokenizer::simplifyAssignmentBlock to fix the FP it caused. 2015-01-07 06:38:42 +01:00
Daniel Marjamäki 840b2fb035 Tokenizer: Removed simplification Tokenizer::simplifyAssignmentBlock. This fixes a fp in linux. 2015-01-06 20:44:58 +01:00
Daniel Marjamäki d1927e3492 Removed Tokenizer::simplifyStructInit simplification. 2015-01-04 16:48:52 +01:00
Daniel Marjamäki 7bafbfbd6e Tokenizer: cleanup simplification of '!= 0' to avoid FP in 'x[(y & 0x80) != 0]' (linux) 2015-01-04 13:50:54 +01:00
PKEuS 016e89e422 Refactorizations:
- Disabled some parts of setVarId() for C code.
- Fixed mistake in <contaier> documentation
2015-01-04 10:52:11 +01:00
Daniel Marjamäki eb1c048d2a Tokenizer: Fix wrong simplification when checking linux kernel 2015-01-03 21:35:03 +01:00
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
PKEuS 274e1a838a Fixed #5871: Properly parse initialization list in setVarId() if constructor is declared as noexcept 2015-01-02 20:03:06 +01:00
PKEuS 88990bac59 Fixed #6386: Improved behaviour on unknown language (header file) 2015-01-02 12:32:23 +01:00
PKEuS 5dc45bd4ac Fixed #5497: Support designated initializers in array size detection 2014-12-30 19:23:01 +01:00
Thomas Jarosch 69b31a0743 Fix up extra whitespaces in match patterns
Detected by new internal check.
2014-12-30 14:53:43 +01:00
PKEuS 990d14f3e2 Fixed #6328: Use isAttributeNoreturn() whereever we also check Library::isnoreturn(). 2014-12-27 11:07:36 +01:00
Robert Reif 9e60f584d9 Fixed #6321: Implemented function Token::swapWithNext(). 2014-12-27 10:53:26 +01:00
Daniel Marjamäki 06803ee333 Refactoring Tokenizer::simplifyAttribute 2014-12-24 13:03:38 +01:00
Daniel Marjamäki fb3f5a159d Token: Added flag for attribute noreturn (#6328) 2014-12-24 12:50:51 +01:00
Daniel Marjamäki 90bd38a972 Renamed isCasted to isCast 2014-12-24 10:35:40 +01:00
Daniel Marjamäki 1b2a23b3fe Fixed #6350 (Tokenizer::simplifyCast: set Token::isCasted when cast is removed) 2014-12-23 16:16:14 +01:00
PKEuS 4d81945ac5 Fixed a couple of #6276 integer over/underflow issues 2014-12-09 23:28:22 +01:00
Dmitry-Me ff6604e289 Make expensive string manipulation depend on settings 2014-12-09 06:08:38 +01:00