PR #234 had a compilation error once it was rebased which
wasn't identified until after it was rebased and merged
to main causing build to fail.
This PR is to fix that rebase error.
This change makes LaunchBarManager.descriptors a synchronized map,
slightly reducing the extra code and complexity added for #262.
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
This change synchronizes access to LaunchBarManager.descriptors, to
avoid a ConcurrentModificationException when adding descriptors for 2
launches at the same time.
Fixes: #262
C++ parser methods already store current lookup point which makes AST available
via thread-local variable. Do the same for C parser to enable SizeofCalculator
accessing type size macros via AST while processing C code.
The field implies that the fSourceViewer has a longer life
than it does. But reality is that the viewer is only
valid until the editor gets reopened while the test is
running.
The previous commit in this series addresses the NPE that
can be hit. This code covers the case of the OP in #251
to actually find the correct expression to pass to GDB.
Improvement to #251
While working on #251 I had to understand what this code did,
I include the method javadoc in the hope it saves the next person
who touches this code some time.
In cases where an IASTName has no image location we were getting
NPEs in this code. See javadoc for getImageLocation for cases
when image location can be null. See #251's description for a
full case of when this can happen.
All other calls to IASTName.getImageLocation in CDT were also checked
and this was the only place in the code where the return value
was not checked for null.
Fixes#251
Without this change when the project is not a "hasTargetBuilder" then
the projectMap will contain an entry mapping the project to
an empty set of makefile targets. So when we get a project added,
make sure to re-read the target settings by clearing the cached
versions.
Fixes#244
If name lookup ends up with a variable, additionally check if node being
resolved is part of the structured binding initializer introducing found
variable. If this is the case, produce problem binding and report structured
binding declaration error via codan.
This change also prevents infinite recursion trying to resolve auto type of
introduced variable while evaluating such problematic initializer.
Add STD and GNU scanner configuration ids and pass these as needed instead of
boolean flag useGNUExtensions. This will be used later by C++20 scanner tests.
When parameter pack contains array type the EvalCompositeAccess.getType() will
attempt to return type of array element.
Fix this by providing EvalPackAccess which returns pack elements as is.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=552070
After closing and opening a Core Build project (Make, CMake,
Autotools, and Meson), the project could not be built for Debug
anymore. Error: "Build not configured correctly".
Restoration of the debug build configurations failed, because the
settings had been removed during closure of the project.
CBuildConfiguration(IBuildConfiguration config, String name)
failed with a CoreException. The CBuildConfigurationManager
silently catched the exception and put the IBuildConfiguration for
debug in the noConfigs list.