| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
llvm-svn: 140479
|
| |
|
|
| |
llvm-svn: 140478
|
| |
|
|
|
|
| |
hoisting parts of the text diagnostic.
llvm-svn: 140477
|
| |
|
|
|
|
|
| |
to handle non-caret diagnostics as well in order to be fully useful in
libclang etc. Also sketch out some more of my plans on this refactoring.
llvm-svn: 140476
|
| |
|
|
|
|
|
|
| |
tracking the start and stop of macro expansion suppression. Also remove
the Columns variable which was just a convenience variable based on
DiagOpts. Instead we materialize it in the one piece of code that cared.
llvm-svn: 140475
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TextDiagnosticPrinter into the CaretDiagnostic class. Several
interesting results from this:
- This removes a significant per-diagnostic bit of state from the
CaretDiagnostic class, which should eventually allow us to re-use the
object.
- It removes a redundant recursive walk of the macro expansion stack
just to compute the depth. We don't need the depth until we're
unwinding anyways, so we can just mark when we reach it.
- It also paves the way for several simplifications we can do to how we
implement the suppression.
llvm-svn: 140474
|
| |
|
|
|
|
| |
emits a source snippet and caret line.
llvm-svn: 140467
|
| |
|
|
| |
llvm-svn: 140435
|
| |
|
|
| |
llvm-svn: 140369
|
| |
|
|
| |
llvm-svn: 140367
|
| |
|
|
| |
llvm-svn: 140365
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This moves the existing code for CPATH into the driver and adds the environment lookup and path splitting there.
The paths are then passed down to cc1 with -I options (CPATH), added after the normal user-specified include dirs.
Language specific paths are passed via -LANG-isystem and the actual filtering is performed in the frontend.
I tried to match GCC's behavior as close as possible
Fixes PR8971.
llvm-svn: 140341
|
| |
|
|
|
|
|
|
|
|
| |
OpenCL is different from AltiVec in the way it supports vector literals. OpenCL
is strict with regards to semantic checks. For example, implicit conversions
and explicit casts between vectors of different types are disallowed.
Fixes PR10975. Submitted by: Anton Lokhmotov <Anton.lokhmotov@gmail.com>
llvm-svn: 140270
|
| |
|
|
| |
llvm-svn: 140155
|
| |
|
|
|
|
|
|
|
|
| |
PreprocessingRecord's getPreprocessedEntitiesInRange.
Also remove all the stuff that were added in ASTUnit that are unnecessary now
that we do a binary search for preprocessed entities and deserialize only
what is necessary.
llvm-svn: 140063
|
| |
|
|
|
|
| |
return iterators for local, non-loaded, preprocessed entities.
llvm-svn: 140062
|
| |
|
|
|
|
|
| |
check whether the requested location points inside the precompiled preamble,
in which case the returned source location will be a "loaded" one.
llvm-svn: 140060
|
| |
|
|
|
|
| |
It already works (and is useful with) macro locs as well.
llvm-svn: 140057
|
| |
|
|
|
|
| |
header files have the same name as clang's builtins, this creates clash.
llvm-svn: 140009
|
| |
|
|
|
|
|
|
| |
that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.
Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.
llvm-svn: 139987
|
| |
|
|
|
|
|
|
|
|
|
|
| |
compiler switch: -fms-compatility.
Microsoft specific tweaking will now fall into 2 categories:
- fms-extension: Microsoft specific extensions that should never change the meaning of an otherwise well formed code. Currently map to LangOptions::Microsoft. (To be clearer, I am planning to change the name to LangOptions::MicrosoftExt).
- fms-compatibility: Really a MSVC emulation mode. Map to LangOptions::MicrosoftMode. Can change the meaning of an otherwise standard conformant program.
llvm-svn: 139978
|
| |
|
|
|
|
|
| |
#include or #import direcctives of framework headers into module
imports of the corresponding framework module.
llvm-svn: 139860
|
| |
|
|
| |
llvm-svn: 139837
|
| |
|
|
|
|
| |
graceful than running out of stack space.
llvm-svn: 139833
|
| |
|
|
|
|
|
| |
used back when we had an -import-module command-line option, but it's
no longer used (or useful).
llvm-svn: 139829
|
| |
|
|
| |
llvm-svn: 139827
|
| |
|
|
|
|
| |
the newly-created ASTReader. This makes sure that CodeGen sees the declarations it is interested in
llvm-svn: 139824
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
-Use an array of offsets for all preprocessed entities
-Get rid of the separate array of offsets for just macro definitions;
for references to macro definitions use an index inside the preprocessed
entities array.
-Deserialize each preprocessed entity lazily, at first request; not in bulk.
Paves the way for binary searching of preprocessed entities that will offer
efficiency and will simplify things on the libclang side a lot.
llvm-svn: 139809
|
| |
|
|
| |
llvm-svn: 139750
|
| |
|
|
| |
llvm-svn: 139696
|
| |
|
|
|
|
| |
options is the same as the module hash before stripping those options.
llvm-svn: 139663
|
| |
|
|
|
|
|
|
|
| |
target triple to separate modules built under different
conditions. The hash is used to create a subdirectory in the module
cache path where other invocations of the compiler (with the same
version, language options, etc.) can find the precompiled modules.
llvm-svn: 139662
|
| |
|
|
|
|
| |
and preprocessor options (such as macro definitions) first.
llvm-svn: 139638
|
| |
|
|
|
|
|
|
|
|
| |
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.
AST serialization changes are next up.
llvm-svn: 139605
|
| |
|
|
|
|
|
|
| |
already provided. This required a little bit of clean-up in the way
that VerifyDiagnosticsClient managed ownership of its underlying
"primary" client, because now it will no longer always take ownership.
llvm-svn: 139570
|
| |
|
|
|
|
|
|
|
| |
but there is a corresponding umbrella header in a framework, build the
module on-the-fly so it can be immediately loaded at the import
statement. This is very much proof-of-concept code, with details to be
fleshed out over time.
llvm-svn: 139558
|
| |
|
|
|
|
|
|
| |
where the compiler will look for module files. Eliminates the
egregious hack where we looked into the header search paths for
modules.
llvm-svn: 139538
|
| |
|
|
|
|
|
|
|
|
|
|
| |
modifying directly for the preamble.
This avoids an awful, hard to find, bug where "PreprocessorOpts.DisablePCHValidation = true"
would be persistent for subsequent reparses of the translation unit which would result
in defines, present in command-line but not in the PCH, being ignored.
Fixes rdar://9615399.
llvm-svn: 139512
|
| |
|
|
|
|
|
| |
Only predefine the OBJC_ZEROCOST_EXCEPTIONS macro if Objective-C
exceptions are turned on. Fixes PR10910.
llvm-svn: 139496
|
| |
|
|
|
|
| |
whether a Decl was deserialized from an AST file (any AST file).
llvm-svn: 139438
|
| |
|
|
|
|
|
|
| |
feature akin to the ARC runtime checks. Removes a terrible hack where
IR gen needed to find the declarations of those symbols in the translation
unit.
llvm-svn: 139404
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function. This is really the beginning of the second phase of
refactorings here. The end goal is to have (roughly) three interfaces:
1) Base class to format a single diagnostic suitable for display on the
console.
2) Extension of the base class which also displays a caret diagnostic
suitable for display on the console.
3) An adaptor that implements the DiagnosticClient by delegating to #1
and/or #2 as appropriate.
Once we have these, things like libclang's formatDiagnostic can use #1
and #2 to provide really well formatted (and consistently formatted!)
textual formatting of diagnostics.
Getting there is going to be quite a bit of shuffling. I'm basically
sketching out where the interface boundaries can be drawn for #1 and #2
within the existing classes. That lets me shuffle with a minimum of fuss
and delta. Once that's done, and any of the related interfaces that need
to change are updated, I'll hoist these into separate headers and
re-implement libclang in terms of their interfaces. Long WIP, but
comments at each step welcome. =D
llvm-svn: 139228
|
| |
|
|
|
|
|
| |
CaretDiagnostic. It's completely generic, with nothing to do with the
diagnostic client or info APIs.
llvm-svn: 139227
|
| |
|
|
| |
llvm-svn: 139226
|
| |
|
|
| |
llvm-svn: 139225
|
| |
|
|
|
|
|
|
|
|
|
|
| |
a stack array of a magical size with an assert() that we never
overflowed it. That seems incredibly risky. We also have a very nice API
for bundling up a vector we expect to usually have a small size without
loss of functionality or security if the size is excessive.
The fallout is to remove the last pointer+size parameter pair that are
traced through the recursive caret diagnostic emission.
llvm-svn: 139217
|
| |
|
|
| |
llvm-svn: 139197
|
| |
|
|
|
|
| |
inspection.
llvm-svn: 139196
|
| |
|
|
|
|
|
| |
Clean up loops over the hints to use the more idiomatic iterator form in
LLVM and Clang.
llvm-svn: 139195
|
| |
|
|
|
|
|
|
|
|
|
|
| |
a defined interface. This isn't as nice as the previous one, but should
get better as I push through better data types in all these functions.
Also, I'm hoping to pull some aspects of this out into a common routine
(such as tab expansion).
Again, WIP, comments welcome as I'm going through.
llvm-svn: 139190
|