Move the __STDC__ macro to the scanner configuration extension, where we can
differentiate compiler type. Only add it when compiler type is not MSVC.
This will miss the case where MSVC is compiling in C mode and /Za is used,
then __STDC__ should be defined but this is a much less common case and would be
addressed likely outside scanner configuration.
See also
https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros
Change-Id: Icc5d3ef038fb468efe33802a04fc78fc1e5e583e
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
This reverts commit 9a6fd2ab97.
A proper implementation is needed to resolve bug 551610.
Change-Id: I1ea353ea905a33dc43ceda59dde93c15de2032cd
Signed-off-by: Hannes Vogt <hannes@havogt.de>
Implements http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0017r1.html:
Types with non-private, non-protected, non-virtual base classes can be
aggregate initialized.
Change-Id: Idad341d45d6aaf1d8c36691cf8d7bc7cd049e28b
Signed-off-by: Hannes Vogt <hannes@havogt.de>
Fix constructor calls of the form Type{...} to a constructor of
the form Type(std::initializer_list<T>).
So far only Type({...}) was supported.
Change-Id: I09e3b8c9c73c30e12c0c370a5c88885079a14746
Signed-off-by: Hannes Vogt <hannes@havogt.de>
ClassTypeHelper.getDeclaredFields() returns the first field of an anonymous union.
Change-Id: I3f33dcdd7b274ffac7aad0b80ea8c523bfd6e5f2
Signed-off-by: Hannes Vogt <hannes@havogt.de>
Without setting dependent plug-ins to minimum version to match the
target platform we are aiming for we can imply (and therefore let install)
CDT into older versions of Eclipse where CDT does not actually work.
This can be exposed in very odd ways, such as IllegalAccessError, when
platform has allowed API changes.
However, rather than update every single bundle in CDT, only the
o.e.cdt.core/ui bundles are being updated as this should achieve the
desired result without every other bundle needing to be touched.
See Bug 536448
Change-Id: Ifad2e0eef003b037ac332301120c26fe079a2e7f
This new parser is compatible with both 32 bit and 64 bit executables.
Change-Id: Ief9db7c6fcc10ea9e92d5ca58186eb50100d39f6
Signed-off-by: Adrien Thierry <adrien.thierry@spacecodesign.com>
This allows us to consider more than just the os and arch in the build
config names as required by the selected toolchain.
Change-Id: I3e1a52c756aca13fbe6c83a95f9a86bb2f286f1d
If we call it without cloning, we associate the value with every place
that has a reference to that CPPBasicType object, which could involve
completely unrelated entities.
Change-Id: Icff6c32d15ee6dbc55e363b2de9a166e03440f74
This started happening when I added the ErrorBuildConfiguration which
returns a null id. This happens when you create a CMake project and
add a new launch target. Not totally sure how we got an error config
for that. Will investigate that later.
Change-Id: I1a4e7c528d2cee101a432d386ad6a7505b9983b6
When at the same time never join wrapped lines and next line
for opening function brace were selected, two tabs were added.
Change-Id: I90f606bf7f8b7bb7e83f3ae85d7cbb9cd0146b97
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Because of the missing getRecordSize implementations, subclasses would
starting writing in records that were thought to be malloc'ed by
the parent but it was instead writing in other blocks, possible used
by other PDOM objects or free blocks to be used later and now not initialized
to 0.
This could lead to a few different exceptions like
- BufferUnderflowException(Chunk.getChars)
- CoreException: Corrupted database
- ArrayIndexOutOfBoundsException(AbstractIndexerTask$IndexFileContent.merge)
and possibly others.
Change-Id: Ie6d1986a22a9fb5f5e90cb741046d098ebf10a90
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
We need a way to alert the user that we are unable to find a toolchain
that maps to the current target. An ErrorBuildConfiguration is created
that simply prints out an error message at build time to handle this.
We then set one of these as the active build config in the tracker
with the appropriate message.
We also add a target listener so that when a target becomes OK_STATUS,
we run the tracker again to see if we have the right active build
config for that target. Some targets can only determine some of their
attributes when connected.
Hook up the IToolChain matches so we're using it in the toolchain
manager. This allows toolchains to do more complicated matching of
the properties.
Change-Id: Icaff85117e8147cd2793f2915fa75ce33673ab52
Add existing type-traits that were implemented for GCC that are relevant to
MSVC. Some are missing but even with those parsing is improved with minimal
effort. For the LLVM codebase, I see it go from 0.46% unresolved names (16,668)
to 0.19% (6,950).
This is combined with another patch that adds temporary macro hacks.
Change-Id: I441dcfa4a986edef78b75c0d6db04b78fdbc97b3
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
While a literal expression itself will never be negative (the negative
sign is parsed as a unary operator), we also use FloatingPointValue to
represent results during value computations which can be negative.
Change-Id: I16227b2d19256066b094ae60476e124b4bcea14d
Add missing ; to test case.
Change-Id: If0224c4fc3580cbe527efe0d3a5739896a000d7e
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
Recognize MinGW installations by checking the path of gcc.exe for
substring "ming".
Change-Id: Ibc6d4b03ef715036176e3aea6382dd986e4caae8
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
Without setting dependent plug-ins to minimum version to match the
target platform we are aiming for we can imply (and therefore let install)
CDT into older versions of Eclipse where CDT does not actually work.
This can be exposed in very odd ways, such as IllegalAccessError, when
platform has allowed API changes.
However, rather than update every single bundle in CDT, only the
o.e.cdt.core/ui bundles are being updated as this should achieve the
desired result without every other bundle needing to be touched.
See Bug 536448
Change-Id: I1c8f102a9a750e40970197da3e6cd56d139492bc
Methods weren't added if the virtual methods were in a base
template class.
Change-Id: I34b05eeb1e7dc5ce83944a642461eca521764967
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>