| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 140493
|
|
|
|
| |
llvm-svn: 140491
|
|
|
|
|
|
| |
This needs to be cleaned up to better use the ostream object, WIP.
llvm-svn: 140490
|
|
|
|
|
|
|
| |
I'm planning to switch a bunch of these over to use a raw_ostream
instead of += on a string object.
llvm-svn: 140488
|
|
|
|
|
|
|
|
| |
and completely broken at that.
Sorry, must remember to stash rather than commit. =]
llvm-svn: 140487
|
|
|
|
| |
llvm-svn: 140486
|
|
|
|
| |
llvm-svn: 140484
|
|
|
|
|
|
| |
function.
llvm-svn: 140481
|
|
|
|
| |
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: 140369
|
|
|
|
| |
llvm-svn: 140367
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
and reducing indentation through the clever use of early exits. ;]
llvm-svn: 139001
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(unsurprisingly) caret diagnostics. This is designed to bring some
organization to the monstrous EmitCaretDiagnostic function, and allow
factoring it more easily and with less mindless parameter passing.
Currently this just lifts the existing function into a method, and
splits off the obviously invariant arguments to be class members. No
functionality is changed, and there are still lots of warts to let
existing code continue functioning as-is. Definitely WIP, more cleanups
to follow.
llvm-svn: 138921
|
|
|
|
| |
llvm-svn: 138920
|
|
|
|
|
|
| |
to isMacroArgExpansion.
llvm-svn: 136053
|
|
|
|
|
|
| |
SourceManager and FullSourceLoc.
llvm-svn: 135969
|
|
|
|
|
|
| |
SourceManager and FullSourceLoc.
llvm-svn: 135965
|
|
|
|
| |
llvm-svn: 135962
|
|
|
|
|
|
| |
getImmediateExpansionRange.
llvm-svn: 135960
|
|
|
|
| |
llvm-svn: 135915
|
|
|
|
|
|
|
|
| |
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part
of the API and documentation update from 'instantiation' as the term for
macros to 'expansion'.
llvm-svn: 135914
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
|
|
|
|
|
|
|
| |
'[Ee]xpan(sion|ded)' in the TextDiagnosticPrinter.
No functionality changed.
llvm-svn: 135136
|
|
|
|
|
|
|
|
|
| |
and 'expansions' rather than 'instantiated' and 'contexts'.
This is the first of several patches migrating Clang's terminology
surrounding macros from 'instantiation' to 'expansion'.
llvm-svn: 135135
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instantiation and improve diagnostics which are stem from macro
arguments to trace the argument itself back through the layers of macro
expansion.
This requires some tricky handling of the source locations, as the
argument appears to be expanded in the opposite direction from the
surrounding macro. This patch provides helper routines that encapsulate
the logic and explain the reasoning behind how we step through macros
during diagnostic printing.
This fixes the rest of the test cases originially in PR9279, and later
split out into PR10214 and PR10215.
There is still some more work we can do here to improve the macro
backtrace, but those will follow as separate patches.
llvm-svn: 134660
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function-style macros, by not recursively printing notes for other 'instantiated from' notes.
This is a one line fix here:
+ // Don't print recursive instantiation notes from an instantiation note.
+ Loc = SM.getSpellingLoc(Loc);
While here, fix the testcase to be more precise (it got filecheck'ized
brutally), and fix EmitCaretDiagnostic to be private and to not pass down
the unused 'Level' argument.
llvm-svn: 133993
|
|
|
|
|
|
|
|
| |
the caret location
points to a macro instantiation.
llvm-svn: 133802
|
|
|
|
|
|
| |
control of f/fno-diagnostics-show-note-include-stack flags. This should help with reducing diagnostic spew from macros instantiations.
llvm-svn: 132143
|
|
|
|
|
|
|
|
|
| |
Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static
diagnostic data structures, which resulted in a huge global-var-init function.
Depends on llvm commit r132046.
llvm-svn: 132047
|
|
|
|
|
|
|
|
|
|
|
|
| |
prints the file, line, and column of a diagnostic. We currently
support Clang's normal format, MSVC, and Vi formats.
Note that we no longer change the diagnostic format based on
-fms-extensions.
Patch by Andrew Fish!
llvm-svn: 131794
|
|
|
|
|
|
| |
Monrocq
llvm-svn: 129614
|
|
|
|
| |
llvm-svn: 128606
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These stacks are often less important than those on primary diagnostics.
As the number of notes grows, this becomes increasingly important. The
include stack printing is clever and doesn't print stacks for adjacent
diagnostics from the same file, but when a note is in between a sequence
of errors in a header file, and the notes all refer to some other file,
we end up getting a worst-case ping-pong of include stacks that take up
a great deal of vertical space.
Still, for now, the default behavior isn't changed. We can evaluate user
feedback with the flag.
Patch by Richard Trieu, a couple of style tweaks from me.
llvm-svn: 128371
|
|
|
|
|
|
|
|
|
|
| |
warning flag for a warning mapped to an error.
For example:
t.c:7:9: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]
llvm-svn: 126466
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
invalid PresomedLoc, instead of just silencing it.
FileManager.cpp: Allow virtual files in nonexistent directories.
FileManager.cpp: Close FileDescriptor for virtual files that correspond to actual files.
FileManager.cpp: Enable virtual files to be created even for files that were flagged as NON_EXISTENT_FILE, e.g. by a prior (unsuccessful) addFile().
ASTReader.cpp: Read a PCH even if the original source files cannot be found.
Add a test for reading a PCH of a file that has been removed and diagnostics referencing that file.
llvm-svn: 124374
|