1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00
Commit graph

290 commits

Author SHA1 Message Date
Marco Stornelli
bacb42110e Bug 546609 - Added checker for magic numbers
Change-Id: Idedcf15f9d5eb3a5d405fe8dc83131f1faf0efa3
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2020-01-04 12:09:38 +01:00
Jonah Graham
ca1ee32031 [releng] Update comparator repo for p2 compare and replace
Change-Id: Iff7e7ba98fe37f89d1b6b0e0754ef827925e849e
2020-01-03 15:16:28 -05:00
Marco Stornelli
2e761a5359 Bug 545714 - Added a shallow copy checker
Change-Id: I8998a98f9d7836405afcaf54bf241b0acbd9edea
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2020-01-03 14:11:08 -05:00
Marco Stornelli
55e08c0dfa Bug 273252 - Added checker for variable masking
Added new checker for variable masking another in a parent scope

Change-Id: Icff6b6499a1d38cc5a719d143552bbe17d57b15c
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2020-01-03 02:17:30 -05:00
Marco Stornelli
42daf203a6 Bug 552076 - Fix false positive virtual method with qualified name
Change-Id: Iaf82368fce793f9c23d6e8a13d88bf57282f9ae9
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-10-17 17:54:34 +02:00
Jonah Graham
7a2ff27b91 [releng] Update comparator repo to last release
Change-Id: I00901808f1eda041f070b2f3e1cda076987c69a5
2019-10-17 10:07:44 -04:00
Marco Stornelli
fa012eb7d4 Bug 545704 - Added checker for float comparison
Change-Id: Id5529b9bd5ee38bac5f5b7e8adab741f0bce3f8e
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-10-17 00:58:22 -04:00
Marco Stornelli
f8316e315b Bug 545977 - Added checker for variable initialization
Checker checks for multiple declarations on one line and
static variables defined in header files.

Change-Id: Ibc9670ee129e9bdd3ea58ac5409493fd99c4a234
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-10-13 08:29:11 +02:00
Marco Stornelli
6504d1a917 Bug 546173 - Add a check for returning of local variable addresses
Change-Id: Ief17af55c20b6e075381fa22a9208b7dfa67ec0b
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-10-12 09:11:24 +02:00
Marco Stornelli
a159173a51 Bug 545954 - Added checker for functions/methods blacklist
Change-Id: I69d32f166e09ec38e4bf3dd9eaca2643c2e2d01e
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-09-23 01:10:46 -04:00
Marco Stornelli
39be625d8e Bug 549466 - Quick fix with the same resolution
We have the "universal resolution" in an ArrayList and they are used as
single instances. So what can happen here is that we add the same
universal resolution instance multiple times for several markers.
However this approach can't work because a "marker resolution" is
designed to fix a single problem. Indeed the last marker analyzed
override the previous one in the single "universal resolution" instance,
so what we have is N proposals pointing to the same resolution where the
problem description is just the latest one. To solve the problem we
instantiate the universal resolution multiple times.

Change-Id: I072ca0b4dabff9781d6230a218eeb7dd388c648d
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-09-22 07:14:09 -04:00
Alexander Kurtakov
51da3eb3a6 Remove redundant superinterfaces.
Change-Id: I0de3509b02a8ef6853f0053c9ee6edd304a05a86
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2019-08-10 10:28:51 -04:00
Marco Stornelli
4c0e7d9f68 Bug 545959 - Added checker for assignment operator
Change-Id: Ib48742cbc04679ab9e48349f4d68aea5657d38c9
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-07-23 00:47:39 -04:00
Jonah Graham
6b435e1faf Bug 547763 - Bump patch version for previous change
Fixup for commit 141142dcab

Change-Id: I7be9eb1021eb611c7103aff7ea85fcdc3f5f1a87
2019-06-24 12:49:32 -04:00
Nathan Ridge
141142dcab Bug 547763 - Consistently handle IArrayType.getSize() returning a null IValue
Change-Id: I0246f1af5f3ed16f6ab03ff30dd9a0b27ee37df6
2019-06-21 14:44:18 -04:00
Jonah Graham
a9e84e4fb7 [releng] bump version numbers according to version number guidelines
See https://wiki.eclipse.org/CDT/policy#Version_Numbering

Change-Id: I54004437fa7a52b7c2b341fa9cb2d0683daf8962
2019-05-31 12:44:42 -04:00
Marco Stornelli
1204bf21b1 Bug 545956 - Added checker for virtual methods in ctor/dtor
Change-Id: I63b8a40447e9a5b6080e046030677a13607c4ea3
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-26 20:26:16 +02:00
Marco Stornelli
1065ee7688 Bug 355174 - Added cheker for missing case in a switch
Change-Id: I1ba1193186e275bed450eb7447eefd90dc09ebec
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-26 13:54:27 -04:00
Marco Stornelli
6452688c18 Bug 468742 - Fix false positive no-virtual destructor
Change-Id: Id8d2efaf3f7a5ca74d160e4a726c08a71c6d7067
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-18 02:13:30 -04:00
Marco Stornelli
ec6f9d204d Bug 320786 - Fix false negative assignment in condition
Fix bug with expression list

Change-Id: I25b226ec7fd1edcfc40fe2ebcadbd3bdb2a6a5dd
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-18 02:10:33 -04:00
Marco Stornelli
f90cd7214d Bug 545702 - Added new checker to verify copyright information
Change-Id: I57cad8565ce3c752a41f89473a95d5427d10cc8b
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-16 00:52:48 -04:00
Marco Stornelli
695de049db Bug 458850 - Fix false positive for deferred classes
Change-Id: I46335a94d69ae8d4e5ae1c68857344d1dc513328
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-12 09:59:22 +02:00
Marco Stornelli
db0cc1f9a4 Bug 468749 - Fix false negative no virtual destructor
The checkers simply skipped nested classes.

Change-Id: If464b229e586267d845768f9d96d3223328a8298
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-08 02:23:47 -04:00
Marco Stornelli
838a12d8f4 Bug 545952 - Added checker to check for goto usage
Change-Id: I5f7f157c5c208e686627bb90b001879953d83e70
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-08 00:50:59 -04:00
Marco Stornelli
3fcbb5c7b5 Bug 492878 - Fix no-return in function with goto
Change-Id: I39f2605aa2e5b697015a2dfdb795f163e76095cf
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-21 13:46:24 -04:00
Marco Stornelli
60a4cccbe3 Bug 545699 - Added checker for C-style casts in C++
Change-Id: I38076599b354608a4b806f7b1d2ca1f6acc50a44
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-15 10:28:39 -04:00
Marco Stornelli
77592ee87a Bug 546179 - Fix lack of warning for field references
With just a reference of the field even for another instance of the
same class the warning wasn't provided to the user.

Change-Id: Icb6ca008c2e61b8a762ecf31e4514cb0368c477d
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-07 10:26:15 +02:00
William Riley
174aaa05a3 [releng] Fix baseline repo location
Change-Id: I21a46592111e60ce4425d1cb80377ab3c2511fad
2019-04-04 16:08:23 -05:00
Marco Stornelli
97e18b4b31 Bug 544980: Added a checker for using directive in header file
Change-Id: Ic77fd2f7504e7a6cc4e15a2fdeb507724db9e74f
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-03-04 09:36:50 -05:00
Bassem Girgis
d8c2330efe Bug 509751 - Process function template with non-dependent return type in ReturnChecker
Change-Id: I8274affff8152dba35233a06cd8cdaef39cf00bb
Signed-off-by: Bassem Girgis <brgirgis@gmail.com>
2019-02-19 18:15:19 -05:00
Jonah Graham
37ed2c406d Bug 540373: Update the compiler warnings/ignores
The previous alignment of all the warnings/ignores
led to too many warnings that weren't there before. This
commit relaxes them a bit.

The core/org.eclipse.cdt.core/.settings/org.eclipse.jdt.core.prefs
is still the "master" copy, with
releng/scripts/check_code_cleanliness.sh containing the
exceptions that apply to test plug-ins.

Change-Id: Ibd4e31ade0b42b31e7cbe5a94f06c6fc15183a56
2018-11-24 10:55:06 +00:00
Jonah Graham
ff75ae80fa Bug 540373: Cleanup: Remove trailing whitespace in properties files
Command used:
# Remove space at eol in comments
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/^(#.*)[ \t]+$/\1/' {} +
# Remove space at eol in blank lines
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/^[ \t]+$//' {} +
# Replace escaped spaces at eol with unicode
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/([^\\])\\ $/\1\\u0020/' {} +
# Replace unescaped spaces at eol with unicode
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/([^\\]) $/\1\\u0020/' {} +
# Replace escaped tabs at eol with unicode
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/([^\\])\\\t$/\1\\u0009/' {} +
# Replace unescaped tabs at eol with unicode
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/([^\\])\t$/\1\\u0009/' {} +
# Stage all changes
git add -A .
# trim any remaining whitespace and then identify and fixup
# manually
# Only dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/MessagesForDebugVM.properties
# needed this due to missing newline at end of the file
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/[ \t]+$//' {} +

Change-Id: I858f16891fe001f4f7e62d5a4f904146e891cd39
2018-11-23 07:52:26 +00:00
Jonah Graham
aa1040a21a Bug 540373: Remove '(non-Javadoc)' comments
These were inserted in the past automatically by Eclipse but
newer tooling makes them redundant.

These were removed by doing a global find/replace on *.java files
using the following regular expression:
\t/\*\n\t \* \(non-Javadoc\)[^/]*/\n

Change-Id: I59d3248020f10934fde1dda5b5a31e20bb188e19
2018-11-22 22:00:29 +00:00
Jonah Graham
caf2292768 Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Remove redundant type arguments
and completing the wizard

Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
2018-11-22 21:55:36 +00:00
Jonah Graham
170e654b47 Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Format source code
- Remove trailing white spaces on all lines
and completing the wizard

Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
2018-11-22 21:47:02 +00:00
Jonah Graham
35996a5c5c Bug 540373: Standard .settings auto applied
The releng/scripts/apply_jdt_prefs_to_all_projects.sh was run to
copy standard settings to all other projects.

Change-Id: I4436c947d7f0142f56b709e661379c3eb54f666b
2018-11-22 21:47:02 +00:00
Jonah Graham
f70a8b35c1 Bug 540371: Update to EPLv2 using releng/scripts/change_to_eplv2.sh
Change-Id: Ifbb1d5af2a00bd5634dea200320e8c4303ffca6c
2018-11-22 20:31:51 +00:00
Karsten Thoms
652602febd Bug 540610 - Add Automatic-Module-Name header
Change-Id: Ia990b24469751050dd9ec8f9b5550804816308b3
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2018-10-30 15:49:15 +01:00
Nathan Ridge
a00346af22 Bug 540112 - Perform C++14 return type deduction in ReturnChecker
As part of this change, ReturnChecker was refactored to compute the
return type as an IType, which allowed for removal of some logic in
ReturnChecker which duplicated CPPVisitor's type resolution work.

Change-Id: I9cd8512164d650a5ee11d2e58fdae477e3c428a2
2018-10-28 22:52:37 -04:00
William Riley
f3ca365140 Bug 540367 - Increment version numbers
Change-Id: I4a355170a7075f0a98ba3c1a5131c235c89b07d2
2018-10-23 11:20:31 -04:00
Marc-Andre Laperle
efbda46cba Bug 389577 - False positive "Unused static function"
Add handling of constructor/destructor attributes and some improvement
when functions were previously declared but not defined as used.

Change-Id: I7537bc87c6c4bc5b294d8e15fe5b42c92b3f2974
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2018-10-11 22:43:20 -04:00
Bassem Girgis
ae8442fd6d Bug 519311 Handle delegating constructor in class template
- Fixed delegating constructor resolution for templated classes in
ClassMembersInitializationChecker
- Added a unit test for this bug

Change-Id: Idb072ec05e66e0f10af53db8258459ad14f7f329
Signed-off-by: Bassem Girgis <brgirgis@gmail.com>
2018-10-10 00:09:22 -04:00
Bassem Girgis
9c04b1bcf7 Bug 519473 Fixed member function calling with references
Change-Id: I86d1dfacb6f842be688bfdaf2a6a0faf0ffade09
Signed-off-by: Bassem Girgis <brgirgis@gmail.com>
2018-10-09 23:57:48 -04:00
Nathan Ridge
acca2b3b6e Bug 539145 - Avoid opening an editor during CaseBreakQuickFixFallthroughAttribute.isApplicable()
Change-Id: I82c5b345cfb017680d06f3caeff0c9839780ee68
2018-09-27 13:31:26 -04:00
Nathan Ridge
fa50ca7bc0 Bug 536268 - Find uses of overloaded operators when checking for unused symbols
Change-Id: I4445b62d4419ffa12d505bcc8265492c22f49bb6
2018-07-07 20:17:13 -04:00
Nathan Ridge
45bbb2bb5b Bug 534332 - In the unused symbol checker, check for 'unused' attribute on the decl-specifier too
Change-Id: Ib4f26e5a04742af93c884819a5b2f1f714faeb97
2018-05-10 22:47:43 -04:00
Alena Laskavaia
ce18aad766 Bug 350144 - suppressing the "No break" problem with regexp
added regex support for suppression comment

Change-Id: I590d171fcce23d547a489e42a791aa484963d4a6
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
2017-12-26 15:08:20 -05:00
Hansruedi Patzen
a4dcbbaf15 Bug 527553: Detect invalid decltype(auto) with a type specifier
The evaluated type of 'decltype(auto)' in combination with const and/or
volatile will be a ProblemType since this is not valid code. The patch
also contains a checker to give the user a visual feedback.

Note: A proposed quick-fix has been removed after a short discussion.

Change-Id: I8760ed0ac28e28529ab30516accac9c0413c87d9
Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
2017-11-30 14:56:02 -05:00
Nathan Ridge
33d33a8cd6 Bug 525350 - Ensure a lookup point is always set during indexing, code analysis, and code completion
Also push a more accurate lookup point in a few places.

Change-Id: I635569178d8d9afd23f7782aeebdaed714f1a10d
2017-10-03 22:23:09 -04:00
Nathan Ridge
64709c980d Bug 513105 - Store the current lookup point in a thread-local static stack rather than passing it around everywhere
Change-Id: I3da7326d1ce6bede8d4787d98f38fb2064288338
2017-09-25 12:51:22 -04:00