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

13602 commits

Author SHA1 Message Date
Jesper Eskilson
611c89cd36 Protect against NPE in case "declarators" is null
Change-Id: Iab76315980cab8f2070cdf3ba853871b0eecf74c
Signed-off-by: Jesper Eskilson <jesper.eskilson@iar.com>
2017-03-30 18:07:09 -04:00
Sergey Prigogin
548d5e19e1 Removed an unused import.
Change-Id: I9b5ef6949187088e779c0d1aca5d227903690603
2017-03-30 14:40:15 -07:00
Sergey Prigogin
9763d3b058 Bug 444577 - __int128_t / __uint128_t not supported (GCC)
Change-Id: I3213c7a6ad034c2fac2c96d2e9f88c38d101ed09
2017-03-29 17:59:29 -07:00
Sergey Prigogin
4f70ea542a Bug 514197 - Organize Includes removes an include necessary for
instantiation of the body of a template function

Change-Id: I7a788f5ddcfae039acdec3a7985dcef364c5b8c0
2017-03-27 20:29:15 -04:00
Simon Marchi
1981d5905d Remove ANSI escape sequences from lines before handing them to output parsers
If a build tool (e.g. gcc) outputs colored text, the ANSI escape
sequences will prevent the output parsers from matching the lines.  This
patch makes the ErrorParserManager remove them before handing the
strings to the parsers.

I tested that this works well with the ANSI console plugin [1], which
allows displaying colors in the console window.

Note that I stole the regex from this SO post [2], I hope it's trivial
enough that it doesn't cause any IP problem.

[1] https://marketplace.eclipse.org/content/ansi-escape-console
[2] https://stackoverflow.com/questions/25189651/how-to-remove-ansi-control-chars-vt100-from-a-java-string

Change-Id: I0d6a25723be4008600acecb8595865bcb4f4abc1
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-03-27 11:52:09 -04:00
Marc-Andre Laperle
5e1208c12a Remove unused OpenTypeDialog
It's internal and not used anywhere.

Change-Id: I194b4db7f4284bc0820221220301515a12b17ae4
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-03-24 23:23:29 -04:00
Nathan Ridge
9742e45559 Bug 513429 - Defer instantiation of variable templates with dependent arguments
Change-Id: Ic5875b19b384ae2726fe000fe5ab2b8cf5dd45a7
2017-03-24 00:52:14 -04:00
Alexander Kurtakov
be16270d15 Generify AsmTextEditor.getAdapter.
Change-Id: Ia98a0a98c0aa12beaa0aa96136adf79e7a8bebab
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-03-23 13:57:39 -04:00
Alexander Kurtakov
5bec70f68f Remove unneeded casts.
Change-Id: Ie506aa209db9be9c56ed8d80c0c97634c6f0cecf
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-03-23 04:35:03 -04:00
Alexander Kurtakov
93623a1a04 Generify ListenerList.
Generified, some lamnda conversions and some non-javadoc removal.

Change-Id: Ibf0493917ac3da7531de1ca591a9bfdc250ddf2a
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-03-23 09:25:24 +02:00
Alexander Kurtakov
4d47bff054 Don't use _ as identifier.
Change-Id: I0ae0462a47ad421ae1baae0dadfa0b5c7489d952
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-03-22 18:15:33 -04:00
Marc-Andre Laperle
7eaabfe557 Bug 463480 - [Include Browser] Add Expand all, Collapse all
Change-Id: I00d6ca764fa1ecb408d8786f6a49d8d81a735ea7
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-03-22 01:22:52 -04:00
Marc-Andre Laperle
e44a300af7 Bug 514021 - Corrupted database only prints Error as message
When the pdom for a project it corrupted, the only message in the
console/log is "Error". The DBStatus class accepts a message string as a
parameter and doesn't use it. If it's changed to use it, then a more
useful message is printed:
"Corrupted database: foo.1487621676851.pdom"

Change-Id: I0d4fb0b97fe1c63661941130e14edea18d0f26ee
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-03-21 18:26:49 -04:00
Nathan Ridge
1dcc3613f7 Bug 513430 - sizeof() with dependent type in default template argument
Change-Id: I01b21afb076b29e418a4d9eece2ac8eff3dafbb6
2017-03-19 00:41:46 -04:00
Sergey Prigogin
c5dc285ca5 Bug 513681 - Unresolved name with a friend declaration in a namespace
Change-Id: I778886f802576a9b8d7804eb32abfe091bf0568d
2017-03-14 20:25:23 -07:00
Sergey Prigogin
8da53f1e5e Bug 509396 - Unresolved symbol with address of overload set containing
function templates

This change fixes the examples contained in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=509396#c0 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=509396#c4

Change-Id: Id5c81469b6700ddc775ab714b0b68d5ea9a809ae
2017-03-14 13:50:03 -04:00
Sergey Prigogin
8bfd2cdc22 Added toString() method
Change-Id: Ieb9e66af1bd290ebe5f8bdce82d0778ea6da2809
2017-03-13 23:15:17 -04:00
Sergey Prigogin
fc6fad911b Cosmetics.
Change-Id: I92903893c481734b42e9292fbc48f1e58d440895
2017-03-13 19:16:45 -07:00
Sergey Prigogin
581182ce98 Minor performance optimization.
Change-Id: I19b1b8f55c8b62fa95eede5318d4b73291dfbd70
2017-03-13 19:13:20 -07:00
Sergey Prigogin
87ce31e19e Code streamlining.
Change-Id: I813c84d316a15727e45293849c21577565fa4afa
2017-03-13 19:40:07 -04:00
Sergey Prigogin
f60d78b32d Cosmetics.
Change-Id: I3484969221546dc8d71995c71651bcad95df128a
2017-03-10 14:23:21 -08:00
Sergey Prigogin
1735a17c5e Bug 513345 - A lot of time during indexing is spent inside
CompositeValue.create

Minor code cleanup.

Change-Id: I92ea01711034df5fa88cd41a81a54450fdb0ba6c
2017-03-10 11:52:02 -08:00
Sergey Prigogin
5b22093f47 Bug 513345 - A lot of time during indexing is spent inside
CompositeValue.create

Added precalculation of initial values of non-field variables.

Change-Id: Ie6c0690d90d5725e812d10afa15c4a11ba92f647
2017-03-09 20:48:50 -08:00
Sergey Prigogin
7501266165 Added protection against NPE and invalid values.
Change-Id: I8b2b96acc9f7852a4857eabb81e4ff35f9e3a0a9
2017-03-09 18:34:27 -08:00
Sergey Prigogin
8bdda7bd02 Bug 513345 - A lot of time during indexing is spent inside
CompositeValue.create

Added caching of initial values in CPPVariable and CPPVariableTemplate.

Change-Id: Id56dc273d1b27a972a30021bb8f26ce57443d208
2017-03-09 18:14:00 -08:00
Sergey Prigogin
f144cd407f Added a missing point argument.
Change-Id: Ie07e20efd16f29de67f7510782d3269417b8df93
2017-03-08 16:05:59 -08:00
Sergey Prigogin
a23515435e Minor performance optimization.
Change-Id: I8a07484cd5159081df2fa743612d4a2b08bdacad
2017-03-07 16:42:33 -08:00
Sergey Prigogin
35e7ae3e05 Bug 513280 - Major performance inefficiency in CPPVariable.getType
In my test project this change reduced total indexing time by half.

Change-Id: I6c7d3adfa1e4d2d05f7f5108f25110f6a9ec9a1a
2017-03-07 19:18:00 -05:00
Sergey Prigogin
1e60830c7d Allow LookupData.setFunctionArguments to be called more than once
Change-Id: Id716b83a3c7eed980c9b8fff68907ce729a86402
2017-03-06 17:41:21 -08:00
Sergey Prigogin
8765065b70 Bug 513105 - NPE in BuiltinOperators.<init> due to
CPPTemplateNonTypeArgument.getNonTypeValue() passing null to
ICPPEvaluation.getValue()

Stopgap measure to protect against NPE.

Change-Id: I1f34a219f982eec3703dc82ef54996a4c454568f
2017-03-03 16:12:40 -08:00
Sergey Prigogin
8e6d9134fe Bug 513106 - EvalUtil.getVariableValue method does not propagate point
of instantiation

Change-Id: I2d60e3e8fb635345115705f3f87631bf7a2f940a
2017-03-03 15:54:50 -08:00
Ghaith Hachem
1d4cf78a0f Bug 447643 Modified the CommandLauncher to consider Win32 Env variables
Added a check on the parseEnvironment() method to store keys in upper
case if the platform is windows
Added a method to fetch a property directly from the fEnvironment or
using the EnvironmentReader class instead of fetching the map and
redirecting the call to that map. This would ensure normalization as the
getEnvVar(key) is implemented to use the normalized map.

Bug: 447643
Change-Id: Ic664d81781f80663ce18854209077a2f38ec7c3a
Signed-off-by: Ghaith Hachem <ghaith.hachem@bachmann.info>
2017-03-03 07:21:29 -04:00
Sergey Prigogin
f311c6f050 More robust infinite recursion protection in CompositeValue.create
Change-Id: Ic0303db73c19651d341f84748b87efc9868defc4
2017-03-01 17:41:12 -08:00
Sergey Prigogin
b868b50c37 Added tracing to CompositeValue.create.
Change-Id: I46b076c2d2fd1b4b0cb490fd3de2ff55e5ec66d7
2017-02-27 20:29:30 -08:00
Sergey Prigogin
68a8cf3205 Minor adjustment to tracing.
Change-Id: I16910a0d8e3fb78ae9fc74fa3b0a87b0c72fc37a
2017-02-27 20:29:29 -08:00
Sergey Prigogin
a98b07b8d3 Moved implementations of deprecated methods from to the IValue interface
Change-Id: I2002d5d3c60d66f15c47a8014f39333291a49a2f
2017-02-27 20:22:51 -04:00
Sergey Prigogin
b97bdab9f9 Fixed a typo.
Change-Id: I64f30d3e8f2565c3fa918b9c4a4508ea043b83d8
2017-02-27 20:22:22 -04:00
Sergey Prigogin
3f8d51e65b Added point parameter to the CompositeValue.create(ICPPClassType) method
Change-Id: Ia3bb0dc48c90496242a696ec7126be2fd71e47fd
2017-02-27 19:21:50 -05:00
Nathan Ridge
2cd2500957 Bug 512262 - Remove the unnecessary ICPPEvaluationOwner interface
This also fixes some ClassCastExceptions caused by types which
implemented ICPPASTInitializerClause but not ICPPEvaluationOwner.

Change-Id: Ie624865ebe476fe760dc28e02b6aef8a43b4c621
2017-02-17 01:14:35 -05:00
Sergey Prigogin
40416c3da4 Cosmetics
Change-Id: I30f57d777d2761343449940087f825a37208c930
2017-02-15 20:02:43 -08:00
Sergey Prigogin
151a4c05e5 Bug 512260 - Organize Includes should prefer .h and .hpp files to files
with other extensions

Change-Id: I115a3441d98d220f0d2b985b7d595971a146e8b6
2017-02-15 20:02:20 -08:00
Sergey Prigogin
bb9fe47b10 Added @noreference to the CCorePlugin.getDOM method and the CDOM class
Change-Id: I73119bb3463dc932d0951522645f351dec62fd86
2017-02-15 16:21:04 -08:00
Sergey Prigogin
8a079c6639 Cosmetics
Change-Id: I2335d8d96c7e9bec13b98c5ac553fa10dce6d9f4
2017-02-14 20:38:13 -08:00
Sergey Prigogin
2dee53e9c5 Cosmetics
Change-Id: Ifbd153a926898ad3820b6e03cca14555495712fa
2017-02-14 17:02:55 -08:00
Sergey Prigogin
5fe63e30ba Cosmetics
Change-Id: Ie4060b90f9ad492d0aece30d2bc13702fa2a9244
2017-02-14 15:56:02 -08:00
Sergey Prigogin
56e6da621e Bug 512201 - NPE in Organize Includes
Change-Id: I09d7b250697ae3ff00a5f615000512524c74ff01
2017-02-14 15:55:48 -08:00
Marc-Andre Laperle
0046099052 releng: Make use of Tycho POM-less functionality
This removes a lot of pom.xml from the source tree. This is using the
"POM-less" Tycho functionality.
See
https://wiki.eclipse.org/Tycho/Release_Notes/0.24#POM-less_Tycho_builds

One advantage of this is that you do not need to update the version in
the pom.xml when you change it in the MANIFEST.MF because the pom.xml is
automatically generated. This also reduces a lot of the duplicated
information and pom.xml repetition.

- Maven 3.3 and up is required.
- Only eclipse-plugins and eclipse-features can be pom-less.
Repositories, target and others still have pom.xml.
- New parent poms are added because a parent is necessary directly one
level above the plug-in/feature that will have its pom generated
- Some test plug-ins had to be renamed .test -> .tests because it's
required so that it detects that it's a test plug-in
- Some suites were renamed so that they all use the same consistent name
"AutomatedIntegrationSuite"
- Profiles were added for the more common test configurations. They are
activated by the presence of simple .properties files that only serve to
activate the correct profile. The profiles:
  - One for UI tests (UI present and start in UI thread)
  - One for SWTBot tests (UI present and do not start in UI thread)
Other test plug-ins that are too different are kept intact and still
have
a pom.xml
- Fragments are kept intact since they all have different target
platform configurations

Change-Id: I9d73380eb766f547830c552daf08053a30b1845c
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-13 23:19:56 -04:00
Sergey Prigogin
f78a7306b3 Bug 512150 - Don't allow indirect inclusion by partner header for test
files

Change-Id: I6d0eb9078b92b4cf6e9345cc58824994dd679324
2017-02-13 20:48:45 -04:00
Sergey Prigogin
e431143a97 Removed an unused method.
Change-Id: Ica6fc7ba71ec039f4a33ca01c5fc1867dfdb54b1
2017-02-13 20:48:21 -04:00
Marc-Andre Laperle
3f0e34177c Bug 511677: Mitigate deadlock closing project during indexer job
A deadlock can occur if a project is closing and an indexing job is
running.
There is a patch on Gerrit that reproduces the lock all the time:
https://git.eclipse.org/r/#/c/90603

Thread #1, closes the project (*workspace lock*), removes the binary
parser for this project. Around the same time...

Thread #2, is just about to start indexing the project
(PDOMRebuildTask).
  It visits the C model to collect source files. Because the binary
parser was removed, it reloads the project description, which triggers a
listener (CExternalSettingsManager) to get a *workspace lock*.

Thread #1 then blocks on cancelling the indexer, which will never happen
because it is blocked on getting the workspace lock.

This deadlock could happen for any code being called by the indexer
thread that gets a workspace lock before the indexer cancels itself.
Because so much code can be hooked up to the C model (extensions,
listeners, etc), it is difficult to guarantee that this will not happen.

- Possible option 1. Changing CExternalSettingsManager to execute
asynchronously (Job) breaks other code that expect the operation to be
synchronous. Doing this also does not guarantee that other code will not
get a workspace lock.

- Possible option 2. Cancelling the indexer before the binary parser is
removed from the map: does not break any tests but only cover this
particular case of the binary parser triggering the project description
reload. Any other code that triggers a project description reload (and
workspace lock) will still be an issue.

Option 2, although incomplete, seems the safest and more reasonable at
this point. Judging by the comments in bug 327126, to fix this properly
would require quite a big effort that I'm not sure anyone would do.

Change-Id: Ida7b45558e4430bc5cc9a1eb5ef25e8d19487c31
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-13 15:11:49 -05:00