History log of /external/clang/lib/Frontend/DiagnosticRenderer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5543169296beeb183b9c9392debc774fcf493eeb 05-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef constructor from None

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
14f9b5d62861d7c672f5aa7d7fc20cfa38bc92a8 24-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> DiagnosticRenderer.cpp: Prune one description in DiagnosticRenderer::emitMacroExpansions(). [-Wdocumentation]

/// \param MacroSkipEnd The depth to stop skipping macro expansions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
6ee225c8d4381e728c73252ed589f13e9f546def 19-Dec-2012 Ted Kremenek <kremenek@apple.com> Simplify logic to use SourceManager::getFileLoc(), per Argyrios's feedback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
adff43ad96defb28bad20d8335ab30beadd72ee8 18-Dec-2012 Eli Friedman <eli.friedman@gmail.com> More conservative fix for <rdar://problem/12847524> (a crash printing diagnostic ranges).
I'm not really happy with this fix, but I'm confident it's correct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
5bdbc114da925304a774b726b0abb87d75bc3008 13-Dec-2012 Nadav Rotem <nrotem@apple.com> Revert 170049 because it fails with an assertion on one of the spec2000 workloads.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
0fdcd1e81db7b8f5b3fd05154d966b215b20a2eb 13-Dec-2012 Eli Friedman <eli.friedman@gmail.com> More hacking on mapDiagnosticRanges to make it handle more cases.
This still isn't quite right, but it fixes a crash.

I factored out findCommonParent because we need it on the result of
getImmediateExpansionRange: for a function macro, the beginning
and end of an expansion range can come out of different
macros/macro arguments, which means the resulting range is a complete
mess to handle consistently.

I also made some changes to how findCommonParent works; it works somewhat
better in some cases, and somewhat worse in others, but I think overall
it's a better balance. I'm coming to the conclusion that mapDiagnosticRanges
isn't using the right algorithm, though: chasing the caret is fundamentally
more complicated than any algorithm which only considers one FileID for the
caret can handle because each SourceLocation doesn't really have a single parent.
We need to follow the same path of choosing expansion locations and spelling
locations which the caret used to come up with the correct range
in the general case.

Fixes <rdar://problem/12847524>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
5b10af7aa9e254a38d0a9f4d86caaccd61972124 05-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR14049: Don't say "expanded from macro 'foo'" when 'foo' just happens to be
the LHS of a token paste. Use "expanded from here" instead when we're not sure
it's actually a macro.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
98cffc6b30dacd71434530fee368b1f7d03bd565 05-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Minor reorganization. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
ac31c8346f1ce3628b5a7fb862fefab5b94f8e82 05-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Simplify slightly by seperating out the responsibility for emission of a caret
diagnostic from the emission of macro backtraces. Incidentally, we now get the
displayed source location for a diagnostic and the location for the caret from
the same place, rather than computing them separately. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
678839297204002df215e0be12bcd10b20a9a4a4 05-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Simplify diagnostic emission. No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
4565e487531c7bf6d348dbe9f5529784966fc7ae 30-Nov-2012 Douglas Gregor <dgregor@apple.com> Rename ModuleBuildPath -> ModuleBuildStack. Thanks, Dmitri!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
6c3254316de2d0d554b19702f4b10117ae46b77b 30-Nov-2012 Douglas Gregor <dgregor@apple.com> When we're emitting a diagnostic with a source location in an imported
module, provide a module import stack similar to what we would get for
an include stack, e.g.,

In module 'DependsOnModule' imported from build-fail-notes.m:4:
In module 'Module' imported from DependsOnModule.framework/Headers/DependsOnModule.h:1:
Inputs/Module.framework/Headers/Module.h:15:12: note: previous definition is here
@interface Module

<rdar://problem/12696425>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
830ea5b7c75413526c19531f0180fa6e45b98919 30-Nov-2012 Douglas Gregor <dgregor@apple.com> When an error occurs while building a module on demand, provide "While
building module 'Foo' imported from..." notes (the same we we provide
"In file included from..." notes) in the diagnostic, so that we know
how this module got included in the first place. This is part of
<rdar://problem/12696425>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
ecdc8d3e0fc65610746a4e074491ca0807fca7b2 30-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Fix the computation of highlight ranges so we produce something sane when
the beginning and end of the range are in different macro arguments.
PR14399.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
62221b17c90457df9ca0ff20bb54d634e8951def 15-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add -cc1 option -fno-diagnostics-use-presumed-location, a handy mode for
working with preprocessed testcases. This causes source locations in
diagnostics to point at the spelling location instead of the presumed location,
while still keeping the semantic effects of the line directives (entering and
leaving system-header mode, primarily).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
9cb1c3de9df7d944f0c5cccaf03fa414036487eb 03-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Add a proper algorithm to compute accurate source ranges for diagnostics with
caret locations and source ranges in macros. Makes ranges more accurate
in some cases, and fixes an assertion failure.

Fixes <rdar://problem/12472249>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
02c23ebf41ae2f70da0ba7337e05c51fbfe35f7f 24-Oct-2012 Douglas Gregor <dgregor@apple.com> Make DiagnosticOptions intrusively reference-counted, and make sure
the various stakeholders bump up the reference count. In particular,
the diagnostics engine now keeps the DiagnosticOptions object alive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
29271fbcef645117df05d5b60e593acb6562422c 18-Jun-2012 Matt Beaumont-Gay <matthewbg@google.com> Move a few static functions from DiagnosticRenderer.cpp into SourceManager.

This simplifies the code a little bit, since these functions all took a
SourceManager parameter and called a bunch of methods on it, and makes
the functions available to other users.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
16afdf76b6f12e41ff6f6e6828bfb1d4732523ba 10-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix an assertion hit when the serialized diagnostics writer receive a diagnostic
from the frontend when the location is invalid and the SourceManager null.

Instead of keeping the SourceManager object in DiagnosticRenderer, propagate it
to the calls accordingly (as reference when it is expected to not be null, or pointer
when it may be null).
This effectively makes DiagnosticRenderer not tied to a specific SourceManager,
removing a hack from TextDiagnosticPrinter.

rdar://11386874

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
30660a898545416f0fea2d717f16f75640001e38 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Add new code migrator support for migrating existing Objective-C code to use
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax.

This introduces a new library, libEdit, which provides a new way to support
migration of code that improves on the original ARC migrator. We now believe
that most of its functionality can be refactored into the existing libraries,
and thus this new library may shortly disappear.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
8be51eab5ad34515d2a40dcdc8558128ca1800ad 14-Feb-2012 Ted Kremenek <kremenek@apple.com> Refactor DiagnosticRenderer and SDiagsRenderer to have some functionality
pulled into DiagnosticNoteRenderer, and common DiagnosticRenderer that
assumes that all custom diagnostic messages are notes. Also extend
DiagnosticRenderer to work with StoredDiagnostics in preparation for
subsequent changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
f7ccbad5d9949e7ddd1cbef43d482553b811e026 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
cf2362b76b624b90e2649497ab8019bcce959bf4 25-Jan-2012 Ted Kremenek <kremenek@apple.com> Fix -fmacro-backtrace-limit=0 to show the entire macro backtrace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
7f6cf9764b33381e03fcf7c44f7985a333212b06 23-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Improve Lexer::getImmediateMacroName to take into account inner macros
of macro arguments.

For "MAC1( MAC2(foo) )" and location of 'foo' token it would return
"MAC1" instead of "MAC2".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
c2a8d6cee01fc4845f5409bf5c021a64616ac8c3 18-Jan-2012 Anna Zaks <ganna@apple.com> Refactor: Pull getImmediateMacroName() out of DiagnosticRenderer and
into Lexer and Preprocessor; making it widely available.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp
2898d4f7648e6ed5e9047068f1e8ee2f3c2bcd75 17-Dec-2011 Ted Kremenek <kremenek@apple.com> Refactor 'TextDiagnostic' to have a parent class 'DiagnosticRenderer' which handles
the policy of how diagnostics are lowered/rendered, while TextDiagnostic handles
the actual pretty-printing.

This is a first part of reworking SerializedDiagnosticPrinter to use the same
inclusion-stack/macro-expansion logic as TextDiagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/DiagnosticRenderer.cpp