Currently CDT would return empty CompositeValue if recursion creating for class
type is detected. If this happens inside CompositeValue.computeForFunctionCall()
and class type has fields, this leads to an attempt to assign a value to
non-existent index into empty values array.
Fix this by returning usual IntegralValue.UNKNOWN and additionally checking
whether created value is actually a CompositeValue instance.
A follow-up change to bug 509898 missed actually incrementing the counter,
restore it now.
Fixes: 5462bac381 ("Bug 509898 - IndexFileSet.containsDeclaration is slow and is causing UI freezes")
One of Qt sample snippets contain (...) as placeholder for actual user code.
Parsing that leads to invalid class cast because buildExpression would return
fold expression token marker and not a proper ICPPASTexpression.
Fix that by handling this error early as invalid fold expression.
Currently CDT evaluates result type of comparison ops to the converted type of
their operands. When floating point values are compared and then the result is
binary shifted this trips an assertion trying to promote floating point value.
Fix this by limiting operand types of binary shifts to integral or unscoped
enumerations. Additionally fix return type of comparison op to be boolean value.
The old method assumed all resources were at the end of the line,
optionally followed by option -o.
Now the complete line is scanned for valid resource file extensions.
When we update Tycho we pull in a new version of ECJ which means
we can get some differences in the class files even though
there is no difference in the source. This commit bumps
all the bundles that are affected by this.
This is kept as a separate commit from the Tycho update
because if we need to revert the Tycho update we would still
need to bump all these bundles to make jgit timestamp qualifier
happy.
Part of #320
See also #308
If parsing expression part for an alternative terminates with BacktrackException,
selectFallback() would short-circuit to the longest remaining variant. If that
happens to successfully complete parsing till the end of expression token
sequence, all of remaining variants are discarded, including the first found
alternative which was to parse identifier as template name.
This causes expression() to only consider one branchpoint out of all possible
variants. Allow it to find more variants by scanning through all branchpoints
looking for the alternative with leftmost parsed boundary.
This is probably still not ideal but fixes this common std library construct:
template <typename T>
inline constexpr bool X = true;
template <typename T>
inline constexpr bool Y = true;
template<typename T> bool predicate() {
return X<T> && Y<T>; // CDT finds this one: (X) < (T) > (&&Y<T>)
// Fix it to also consider (X<T>) && (Y<T>)
}
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=497931
Disassembly view is expected to be populated with lines that are fetched from a given source file. There might be the case where instructions on what lines to append are wrong. This results in a null response that will propagate through the code leading to a NPE.
The current commit is proofing the code from NPE by:
- removing the source position of the lines that were not found within the given file
- null checking the source before becoming a key element in the code flow
- adding logging if expected lines are not found in the given file
Resolves: #287
Option to override the matching of macro defines for the Core Build
GCC toolchain. This may be needed for custom compilers.
Also-by: Jonah Graham <jonah@kichwacoders.com>
Simplify parser by deferring fold-expression op token check until complete
expression can be examined.
Binary expression builder already produces a chain of BInaryOperator with
cast-expression objects. Use that to restrict valid fold-expression sequence
to the one containing only cast-expression on sides.
Currently type of parameters of instantiated template function is ignored while
preparing activation record, which makes constexpr evaluation of instantiated
body use types of arguments in function call expression instead:
template<typename T> bool f(T t) { return t > 0; }
t<unsigned int>(-1); // CDT returns false because conversion is not done
Fix this by applying EvalTypeId to argument if cost of standard conversions is
Rank.CONVERSION to make sure createActivationRecord() would populate activation
record with argument values matching template parameter types.
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.