| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
part of the TextDiagnostic interface without requiring a full instance.
llvm-svn: 142085
|
| |
|
|
|
|
|
| |
allow the TextDiagnosticPrinter to continue using it even if
TextDiagnostic is implemented in a separate file.
llvm-svn: 142084
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostics to control suppression of redundant information. It now
follows the same model as all the other state, and has a bit more clear
semantics.
This is making the duality of the state a bit annoying, and I've added
a FIXME to resolve it. The problem is that I need to lift the
TextDiagnostic up into an externally visible layer before that can
happen.
llvm-svn: 142083
|
| |
|
|
|
|
|
| |
It's the last include-stack-root we tried to walk up. Use a better name
and better doxyments for it.
llvm-svn: 142071
|
| |
|
|
|
|
|
|
|
| |
TextDiagnosticPrinter argument to the TextDiagnostic helper class. This
cements the proper ordering of things: TextDiagnostic is now a viable
stand-alone class for emitting pretty-printed textual diagnostics to
a terminal.
llvm-svn: 142070
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
utility. This is a particularly nice win because it removes a pile of
parameters from these routines. Also name them a bit better. I'm trying
to follow the pattern of 'emit' routines writing directly to what is
expected to be the final output, while 'print' routines take a output
stream argument and can be used to build up intermediate buffers, etc.
Also, fix a bug I spotted by inspection from my last commit where
'LastLoc' and 'LastNonNoteLoc' were reversed. It's really scary that
this didn't trigger a single test failure. Will be working on tests for
more of this functionality now.
llvm-svn: 142069
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
across emissions.
1) The include stack printing is conditioned on non-note diagnostics,
not just on warning diagnostics.
2) Those should be full source locations as they're tied to a source
manager.
3) We should pass in the prior state to the TextDiagnostic constructor,
allow it to mutate as diagnostics are emitted, and then cache the
final state before tearing it down.
Some of this remains incomplete, specifically #3 isn't finished for the
non-note location. That'll come when the include stack printing sinks
down a level.
This also highlights how *completely* bug-ridden this code is. For
example, we currently do all these comparisons of a FullSourceLoc and
a SourceLocation... which silently does a SourceLocation to
SourceLocation comparison, completely disregarding the source manager
from whence one of the arguments came. Oops! Good thing in practice this
wasn't important, but it could in theory be suppressing caret
diagnostics in a second TU on a single clang invocation. I'm hoping to
hammer these bugs out as the refactorings occur, although for so many of
them it's really unlikely I can dream up a test case that would show the
potentially buggy behavior.
llvm-svn: 142067
|
| |
|
|
|
|
| |
interface now that its only caller is there.
llvm-svn: 142065
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
consumer. The TextDiagnostic interface now has a generic entry point for
emitting a diagnostic which uses a minimal interface that should be
compatible with StoredDiagnostics such as are available in libclang etc.
Some unfortunate shuffling of static functions as things get relocated.
Also some unfortunate public interface points added to
TextDiagnosticPrinter, but those are the next bits to get moved so they
won't last long.
llvm-svn: 142064
|
| |
|
|
|
|
|
|
|
|
|
| |
to operate directly on the source location and ranges associated with
a diagnostic rather than digging them out of the diagnostic. This had
a side benefit of cleaning up its code a tiny bit by using the ArrayRef
interface.
No functionality changed.
llvm-svn: 142063
|
| |
|
|
|
|
|
|
| |
Also note that it is actually doing much more than it should. This paves
the way for building a more generic 'Emit' routine that is the real
entry point here.
llvm-svn: 142035
|
| |
|
|
|
|
| |
created ASTUnit.
llvm-svn: 142004
|
| |
|
|
|
|
|
|
| |
of a pointer.
Passing a pointer was a bad idea as it collides with the overload for void*.
llvm-svn: 141971
|
| |
|
|
|
|
| |
paths). The -nostdinc behavior is now -nostdsysteminc + -nobuiltininc.
llvm-svn: 141691
|
| |
|
|
| |
llvm-svn: 141681
|
| |
|
|
|
|
|
|
| |
re-entrancy in the same thread.
The checks are performed only in DEBUG, it becomes no-op in release mode.
llvm-svn: 141582
|
| |
|
|
| |
llvm-svn: 141577
|
| |
|
|
|
|
|
|
| |
frontend removes the non-system directory to maintain gcc compatibility. When
this happens NumAngled needs to be updated.
PR11097
llvm-svn: 141565
|
| |
|
|
| |
llvm-svn: 141516
|
| |
|
|
|
|
| |
signed" warning on Cygwin gcc-4.3.4.
llvm-svn: 141488
|
| |
|
|
| |
llvm-svn: 141486
|
| |
|
|
|
|
|
| |
for better self-documenting code, since the semantics
are subtly different from getDefinition().
llvm-svn: 141355
|
| |
|
|
|
|
|
| |
This frontend-only flag is used by the IR generator to determine
whether to filter CUDA declarations for the host or for the device.
llvm-svn: 141301
|
| |
|
|
|
|
|
| |
line options.
- <rdar://problem/10120602>, PR9631
llvm-svn: 141211
|
| |
|
|
| |
llvm-svn: 141181
|
| |
|
|
| |
llvm-svn: 141180
|
| |
|
|
|
|
|
|
|
|
|
| |
creation, so that only a single Clang instance will rebuild a given
module at once (and the others will wait).
We still don't clean up the lock files when we crash, which is a
rather unfortunate problem. I'll handle that next, and there is
certainly a *lot* of room for further improvements.
llvm-svn: 141179
|
| |
|
|
| |
llvm-svn: 141086
|
| |
|
|
|
|
|
| |
This is old leftover cruft from the days when C++ was not yet ready
for prime time.
llvm-svn: 141063
|
| |
|
|
|
|
|
| |
separate thread with the "suitably large" stack, so we don't blow the
stack when building modules recursively.
llvm-svn: 141051
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
increasingly prevailing case to the point that new features
like ARC don't even support the fragile ABI anymore.
This required a little bit of reshuffling with exceptions
because a check was assuming that ObjCNonFragileABI was
only being set in ObjC mode, and that's actually a bit
obnoxious to do.
Most, though, it involved a perl script to translate a ton
of test cases.
Mostly no functionality change for driver users, although
there are corner cases with disabling language-specific
exceptions that we should handle more correctly now.
llvm-svn: 140957
|
| |
|
|
|
|
| |
remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.)
llvm-svn: 140838
|
| |
|
|
|
|
|
|
| |
TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker.
- The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though.
llvm-svn: 140752
|
| |
|
|
|
|
|
|
|
| |
DiagnosticsEngine::setDiagnosticGroup{ErrorAsFatal,WarningAsError} methods which
more accurately model the correct API -- no internal change to the diagnostics
engine yet though.
- Also, stop honoring -Werror=everything (etc.) as a valid (but oddly behaved) option.
llvm-svn: 140747
|
| |
|
|
|
|
| |
from sources.
llvm-svn: 140746
|
| |
|
|
|
|
|
|
|
| |
we have the ability to create a new, distict diagnostic consumer when
we go off and build a module. This avoids the currently horribleness
where the same diagnostic consumer sees diagnostics for multiple
translation units (and multiple SourceManagers!) causing all sorts of havok.
llvm-svn: 140743
|
| |
|
|
|
|
|
| |
strings.
rdar://9696709
llvm-svn: 140732
|
| |
|
|
|
|
|
| |
versions of libc++. Newer versions of libc++ know how to deal with ARC
properly. Fixes <rdar://problem/10062179>.
llvm-svn: 140651
|
| |
|
|
|
|
|
| |
'bool' rather than '_Bool' within types, to make things a bit more
readable. Fixes <rdar://problem/10063263>.
llvm-svn: 140650
|
| |
|
|
|
|
|
|
|
|
|
| |
message. Specifically, we now only line-wrap the first line of te
diagnostic message and assume the remainder is manually formatted. While
adding it back, simplify the logic for doing this.
Finally, add a test that ensures we actually preserve this feature. =D
*Now* its not dead code. Thanks to Doug for the test case.
llvm-svn: 140538
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when working with a diagnostic attached to a source location. Also
comment more thoroughly why its important to handle non-location
diagnostic messages separately.
Finally, hoist the creation of the TextDiagnostic object up to the
beginning of the location-based diagnostics. This paves the way for
sinking more and more of the logic into this class. When everything
below this constructor is sunk into the TextDiagnostic class it should
be sufficiently "feature complete" to accomplish my two goals:
1) Have the printing of a macro expansion note use the exact same code
as any other note.
2) Be able to implement clang_formatDiagnostic in terms of this class.
llvm-svn: 140526
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a dedicated path. The logic for such diagnostics is much simpler than
for others.
This begins to make an important separation in this routine. We expect
most (and most interesting) textual diagnostics to be made in the
presence of at least *some* source locations and a source manager.
However the DiagnosticConsumer must be prepared to diagnose errors even
when the source manager doesn't (yet) exist or when there is no location
information at all. In order to sink more and more logic into the
TextDiagnostic class while minimizing its complexity, my plan is to
force the DiagnosticConsumer to special case diagnosing any locationless
messages and then hand the rest to the TextDiagnostic class. I'd
appreciate any comments on this design. It requires a bit of code
duplication in order to keep interfaces simple. Alternatively, if we
really need TextDiagnostic to be capable of handling diagnostics even in
the absence of a viable SourceManager, then this split isn't necessary.
llvm-svn: 140525
|
| |
|
|
|
|
|
|
|
| |
function. Doing this conveniently requires moving the word wrapping to
use a StringRef which seems generally an improvement. There is a lot
that could be simplified in the word wrapping by using StringRef that
I haven't looked at yet...
llvm-svn: 140524
|
| |
|
|
|
|
| |
functionality changed.
llvm-svn: 140523
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
a "loaded" location of the precompiled preamble.
Instead, handle specially locations of preprocessed entities:
-When looking up for preprocessed entities, map main file locations inside the
preamble range to a preamble loaded location.
-When getting the source range of a preprocessing cursor, map preamble loaded
locations back to main file locations.
Fixes rdar://10175093 & http://llvm.org/PR10999
llvm-svn: 140519
|
| |
|
|
|
|
| |
Also remove an obsolete utostr call.
llvm-svn: 140511
|
| |
|
|
|
|
|
|
|
|
|
|
| |
characters. I could find no newline character in a diagnostic message,
and adding an assert to this code never fires in the testsuite.
I think this code is essentially dead, and was previously used for
a different purpose. If I just don't understand how it is we can end up
with a newline here please let me know (with a test case?) and I'll
revert.
llvm-svn: 140497
|
| |
|
|
|
|
|
| |
printing routines, clean up its doxyments and switch it to a camelCase
name as well. No functionality changed here.
llvm-svn: 140496
|
| |
|
|
|
|
| |
style, and add doxyments.
llvm-svn: 140495
|
| |
|
|
|
|
| |
use the ostream interface and avoid lots of temporary strings.
llvm-svn: 140494
|