1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
Commit graph

784 commits

Author SHA1 Message Date
Alena Laskavaia
32d1a28f49 codan tests - removed sleeps and made sure it runs in non-ui thread
Change-Id: Ic684e647ea43968c7da35e0f9448e01e66c06e8f
2015-02-21 22:07:10 -05:00
Alena Laskavaia
2fca26b8e5 codan tests - make use of comment tags in tests
Change-Id: I822ea36bfa49164b43954ae80bc9fd223ae8d0f6
2015-02-21 22:06:56 -05:00
Nathan Ridge
80c624f2c3 Bug 455828 - Don't be over-eager when collecting dead nodes in the
control flow graph

Change-Id: I54013e31a197c02698e3161f9f52755e4cb6b203
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
2015-02-20 09:30:19 -05:00
Nathan Ridge
43097ce04e Bug 455828 - Proper handling of 'switch' without explicit default
(including empty switch)

Change-Id: I3e20400f86c5e4273d8b0c62ed9ac3f429a84879
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
2015-02-18 19:30:08 -05:00
Nathan Ridge
3586267e6b Bug 455828 - Proper handling of 'break' inside compound statement in a
case of a switch

Change-Id: I73329a8769bc20a4fc4e017faad627e03adce9d9
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
2015-02-18 19:08:59 -05:00
Alena Laskavaia
3cf5ec86ee Bug 327375 control flow graph regression - dead connector nodes
basically for the code like
if (a) return 1; else return 2;
a++; // this should be a dead code node

but we don't check connector node of "if" and don't add
it to dead nodes graph resulting it this code not being marked as dead,
which can lead to false positives or false negatives for checkers that
use that. Same apply for other control statements...

Change-Id: Iafb4b48ca960f0ffab2c0265285a31cb08eb0d11
2015-02-18 16:42:59 -05:00
Nathan Ridge
d0ef9d1d82 Bug 455828 - General cleanup in ControlFlowGraphBuilder
Change-Id: I46cfe23fc10bed235d091afaec8eec29dd7d62ac
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
2015-02-17 20:07:04 -05:00
Nathan Ridge
0221ee20b1 Bug 441714 - Consider spurious semicolons in CaseBreakChecker
Change-Id: Id4fe394164063007c45da37ae82cc730a9e726dd
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
2015-02-16 01:48:37 -05:00
Nathan Ridge
155fa65c1c Fix a typo in org.eclipse.cdt.codan.ui.cfgview/plugin.xml
Change-Id: I41aeb1195e9d8b663de396883e0aa6e4f3b5c6e4
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
2015-02-16 01:45:53 -05:00
Marc Khouzam
d266f8656e Remove unnecessary .api_filters
Note that
memory/org.eclipse.cdt.debug.ui.memory.traditional/.settings/.api_filters
needs to be kept because:
1- it removes warnings about implementing provisional APIs
2- that plugin sets warnings as errors, so warnings are not allowed

Change-Id: Id4bcc9cd78c4c6678ef749cfe276e5a9945efa1e
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-02-11 15:48:32 -05:00
Marc-Andre Laperle
afd11359e6 Extract test VM args to common property base.test.vmargs
This makes it easier to change arguments for all tests. As a side-effect,
all tests now enable assertion (-ea) and have the same max heap size, etc.

Change-Id: I0965d40ba3283efe7eacdf927f6c302ee0ab30f0
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2015-02-06 13:02:28 -05:00
Sergey Prigogin
252eaf4c0f Incremented CDT feature version to 8.6.0.
Change-Id: Ic90c8e6a68d21e5b90ec3fac997da6a95a29bedf
Signed-off-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Reviewed-on: https://git.eclipse.org/r/39066
Tested-by: Hudson CI
2015-01-06 19:40:38 -05:00
Alena Laskavaia
24d2e1a4c8 Bug 447486 - codan - CCE is thrown by control flow graph builder
- addOutgoing cannot join JumpNode - block will be added to dead list
instead
- addjusted goto code to not use addOutgoing but using setJump directly
- corrected code that doing fake return to deal jump nodes at the end
- corrected code that marks up dead code to remove jump targets
- corrected code that calculates all nodes in the graph to take into
account dangling labels
- fixed CFG viewer to show unconnected labeled statements

Change-Id: Ie4d9e37678e3ebaae8e9f268e6f37342e14a1444
Reviewed-on: https://git.eclipse.org/r/38189
Tested-by: Hudson CI
Reviewed-by: Elena Laskavaia <elaskavaia.cdt@gmail.com>
2014-12-14 13:09:13 -05:00
Nathan Ridge
517b811599 Bug 452325 - Protect against IVariable.getInitialValue() calling itself
recursively along any code path

Change-Id: Idbf46ca82b431e72bf6b2598427430c37ef65cc4
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/37220
Tested-by: Hudson CI
Reviewed-by: Elena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-12-08 13:39:24 -05:00
Alena Laskavaia
863def95be Bug 453275 - Codan tests cannot test for checkers throwing an exception
Added system flag that is used to propagate exception
instead of swallowing. Set by default in codan junit tests.

Change-Id: Iccda9a7b2e419192bb9f4eec4b89d525e152fc81
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-on: https://git.eclipse.org/r/37482
2014-12-04 13:57:27 -05:00
Alena Laskavaia
0f49ec2015 Avoid ClassCastException in Codan Run job
Occasionally Run Code Analysis actions get text selection
instead of structured selection so it is failing and logging
CCE. Avoid this by non accepting other selections.

Change-Id: Ia3583755547e5251a057290e506184656ebf2d5a
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-on: https://git.eclipse.org/r/37306
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-12-02 19:38:08 -05:00
Alena Laskavaia
ac11501703 Bug 353352 - CFG doesn't handle range-based for loop
Change-Id: Ic4334ce82585d4dbfbbd008fd013b0ce97cca434
Reviewed-on: https://git.eclipse.org/r/33155
Tested-by: Hudson CI
Reviewed-by: Elena Laskavaia <elaskavaia.cdt@gmail.com>
2014-09-12 20:13:29 -04:00
Alena Laskavaia
d2f248dc70 Bug 353352 - CFG doesn't handle range-based for loop
Change-Id: Ic71c15d26d31d954fbc4c91882dd9361d9b23eae
2014-09-09 22:44:58 -04:00
Marc-Andre Laperle
97079f6ad0 Add missing arg for jacoco in in tests. Update jacoco.
Jacoco arguments are missing when executing certain tests. This happens when
argLine is being overriden. We had the same problem in Linux Tools. We solved
it by prepending the argLine with ${tycho.testArgLine}. This should help
improving the Code coverage metric in Sonar.

Also update the jacoco version to fix a bug when building with Java 8.

Change-Id: I7f73f40488efc01fc7d643940c1ac0d5950c900d
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/32507
Tested-by: Hudson CI
Reviewed-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
2014-08-28 15:40:26 -04:00
Doug Schaefer
3a81f65932 Bug 437392 - Added the Launch Targets View.
This view lists all launch targets that could appear in the Target
selector. It allows us to add context menus to them to perform
operations, such as opening a terminal view to the target. It will
also gives us a cleaner UI to add and remove targets

Change-Id: I538a204ce6f25fd017573c50585ac45cdeeaf554
Reviewed-on: https://git.eclipse.org/r/31856
Tested-by: Hudson CI
Reviewed-by: Jonathan Williams <jonwilliams@qnx.com>
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
2014-08-19 10:22:01 -04:00
Sergey Prigogin
d87c480f47 Proper reporting of unsupported statement types.
Change-Id: I4e4745bf7661329873107e8849f6200577756891
Reviewed-on: https://git.eclipse.org/r/31725
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-08-14 17:50:36 -04:00
Sergey Prigogin
21c0d0a2f8 Cosmetics. 2014-08-13 12:03:53 -07:00
Sergey Prigogin
d8154bd340 Inremented branding plugin version to 8.5 2014-07-21 17:39:01 -07:00
Alena Laskavaia
db43e03878 Bug 394521 Do Constant folding propagation when building CFG
When building control flow graph we can consider constants
and not add some branches in decisions nodes, that make CFG
more accurate and elimate some false positives

Change-Id: I19c623e1e6d2dc7416a0e796a98168df7a976111
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-on: https://git.eclipse.org/r/28726
2014-06-21 10:57:37 -04:00
Chris Marr
fcd66c7d04 Bug 433357 - Added fix for false positives from GNU
Statement-Expressions

Change-Id: I21eb9978a156f2375e5b9e1992c297e3b6ca78ac
Signed-off-by: Chris Marr <cdabone@gmail.com>
Reviewed-on: https://git.eclipse.org/r/25600
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Hudson CI
Reviewed-by: Elena Laskavaia <elaskavaia.cdt@gmail.com>
2014-06-19 16:51:14 -04:00
Alena Laskavaia
16037a5f38 Bug 350168 - Return checker won't report errors in dead code
Also Bug 356908, Bug 348386

Change-Id: I48d2f74e05d2d6d7a7bf0589408ca90bc07a6922
Reviewed-on: https://git.eclipse.org/r/28527
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
2014-06-16 10:26:43 -04:00
Marc-Andre Laperle
1cc6d6ab8e Build with 4.4 and use target definition file for maven build
Change-Id: I1044751c600e7725fd2cb02578c28d5f45de1854
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/27631
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
2014-06-03 11:52:57 -04:00
Sergey Prigogin
2e36f9b4ca Added a TODO. 2014-04-22 17:19:16 -07:00
Sergey Prigogin
7f914e4a6a Fixed a typo. 2014-04-22 17:17:19 -07:00
Sergey Prigogin
a94a29ae22 Fixed compiler warnings. 2014-04-11 16:15:40 -07:00
Marc Khouzam
0ddab334f0 Missing NON-NLS strings
Change-Id: Ia177b5ded46b3d6292af3e41951165c9d26b57cc
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-04-09 15:31:42 -04:00
Marc Khouzam
b647093b94 Remove unused API filters
Change-Id: Ia3a53fec79973ccdec7d74d68fcc4f4621fe1cc7
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-04-09 15:24:47 -04:00
Nathan Ridge
cff738fe0b Bug 430282 - Limit recursion depth when processing inheritance
hierarchies

Change-Id: Ia9d9f379cb61e8d8bc8d1fb33f893fcd2a0688a2
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/23957
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-04-06 20:56:18 -04:00
Sergey Prigogin
dc19bb3b6b Bug 431544 - UnsupportedOperationException in
ControlFlowGraphBuilder.build

Change-Id: I91fd0b4e1a816b80a4bbad5e7a8ee1f61f9862a9
Reviewed-on: https://git.eclipse.org/r/24214
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-03-31 13:52:52 -04:00
Sergey Prigogin
14bea54256 Cosmetics. 2014-03-31 10:44:07 -07:00
Marc-Andre Laperle
535ad23797 Fix intermittent test failures in codan
Sometimes, index-based checkers (AbstractIndexAstChecker) were skipped
because the indexer was not fully initialized so expected errors were
not getting reported.

Change-Id: Ibb764224f11ae4a867a4aa6b9de2b8ec55e90c55
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/23428
Reviewed-by: Nathan Ridge <zeratul976@hotmail.com>
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-03-15 12:05:03 -04:00
Teodor Madan
ce1620f8cc Bug 428725 - Severity selection from Coda Analyses preferences should
not allow not supported values.

Create  ComboBoxCellEditor with SWT.READ_ONLY style

Change-Id: I5d1bbc94ffb6df17be092108c1e45133849cea3e
Signed-off-by: Teodor Madan <teodor.madan@freescale.com>
Reviewed-on: https://git.eclipse.org/r/22363
Tested-by: Hudson CI
2014-02-23 15:45:37 -05:00
Sergey Prigogin
2186138b87 Bug 428041 - NPE in ReturnChecker 2014-02-12 13:03:02 -08:00
Sergey Prigogin
5d7a19fa6c Enabled JDK 1.7.
Change-Id: Ic2a161ea3c318dc1e8ba01c271c936bf5ed8763d
Reviewed-on: https://git.eclipse.org/r/21020
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-24 13:38:55 -05:00
Sergey Prigogin
1d166260a8 Bumped up CDT version to 8.4.
Change-Id: I1229344feaaed4a3551ceb7b1ef1410545048b55
Reviewed-on: https://git.eclipse.org/r/20908
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-21 17:35:29 -05:00
Andrew Eidsness
2136875477 Bug 424160: null checks for CodanPreferencesLoader.getProjectNode
CodanPreferencesLoader.getProjectNode will sometimes return null.  This
patch adds null checks before using the result.

Change-Id: If4dd70e6673d5da62cc0b8e899fb5066bdaa4bef
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19873
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-17 17:17:59 -05:00
Nathan Ridge
c126fade3d Bug 419938 - [fp] Pure virtual implementation not recognized if only one
path implements it

Change-Id: I90732a87d8d6b4ad2a84aa3c8b09b10727afa994
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19823
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-16 00:40:02 -05:00
Sergey Prigogin
ecf7d25dd9 Cosmetics. 2013-12-06 12:01:12 -08:00
Sergey Prigogin
fb08c843e9 Bug 400073 - Indexer runs out of memory.
An attempt to reduce memory consumption.
2013-12-05 19:47:34 -08:00
Sergey Prigogin
b52beeb11b Cosmetics. 2013-12-05 18:29:13 -08:00
Nathan Ridge
08293b3f58 Bug 421900 - NPE in StatementHasNoEffectChecker.usesOverloadOperator()
Change-Id: I9099f3600cfdac492784087ef5993b353111eab8
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/18468
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-11-30 22:57:04 -05:00
Sergey Prigogin
cc789a1979 Fixed an NPE during shutdown. 2013-10-09 09:37:03 -07:00
Nathan Ridge
62c4e62ff3 Bug 416284 - Unsafe method call, using nested templates
Change-Id: I08732af62f43c03f362d4602736ef6b8e0f227e9
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/16147
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-09-05 20:15:50 -04:00
Nathan Ridge
e9d295e1a6 Bug 380751 - Members of decltype types cannot be used
Change-Id: Ie6113d44647a222e063ab2ab27f3dc9d994f98fc
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/15451
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-09-05 20:01:24 -04:00
Sergey Prigogin
af5a14ac6d Bug 390782 - NPE in AssignmentToItselfChecker$1.isAssignmentToItself 2013-08-28 13:51:59 -07:00