7094dee95f8c915d27097ac18b47d1ef31fd72ed |
|
10-Aug-2012 |
Joerg Sonnenberger <joerg@bec.de> |
Add missing cctype includes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
fbffb5f91e34c4c455cdeb9d4331b128f9511a48 |
|
08-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
bed28ac1d1463adca3ecf24fca5c30646fa9dbb2 |
|
23-Jul-2012 |
Sylvestre Ledru <sylvestre@debian.org> |
Fix a typo (the the => the) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
bbe0175255d4da42cd99d93ca1e60c8eabcb4b9a |
|
20-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
Re-apply r160319 "Don't crash when emitting fixits following Unicode chars" This time, make sure we don't try to print fixits with newline characters, since they don't have a valid column width, and they don't look good anyway. PR13417 (and originally <rdar://problem/11877454>) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
43972898614d91c00982f10cdf7f2bfb4a9f6275 |
|
20-Jul-2012 |
Nico Weber <nicolasweber@gmx.de> |
Revert r160319, it caused PR13417. Add a test for PR13417. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
6f977c3e7918f9a668164f3ce27f1baa9557eb82 |
|
16-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
Don't crash when emitting fixits following Unicode characters. This code is very sensitive to the difference between "columns" as printed and "bytes" (SourceManager columns). All variables are now named explicitly and our assumptions are (hopefully) documented as both comment and assertion. Whether parseable fixits should use byte offsets or Unicode character counts is pending discussion on the mailing list; currently the implementation uses bytes (and has no problems on lines containing multibyte characters). This has been added to the user manual. <rdar://problem/11877454> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
af082c3b163397c040c3a98c7a5f09ee2a0badef |
|
12-Jul-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
PR13312: Don't crash when printing a fixit that ends in a unicode character. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
b956e5a2439bce94ba2e1da264471859632eb11f |
|
29-Jun-2012 |
Richard Trieu <rtrieu@google.com> |
When applying a template diff highlighting to a diagnostic message, remember to reapply the bold formatting when needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
50badd523b9b90c0731423d002b13a00bf754036 |
|
28-Jun-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix template type diffing coloring (r159216) when forcing color output to a file (not a terminal) Reviewed (over the shoulder) by Richard Trieu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
246b6aa6763de8c617d564ef33123a8f3293a80e |
|
26-Jun-2012 |
Richard Trieu <rtrieu@google.com> |
Add template type diffing to Clang. This feature will provide a better comparison between two templated types when they both appear in a diagnostic. Type elision will remove indentical template arguments, which can be disabled with -fno-elide-type. Cyan highlighting is applied to the differing types. For more formatting, -fdiagnostic-show-template-tree will output the template type as an indented text tree, with differences appearing inline. Template tree works with or without type elision. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
6b4f50662a1857d5203254fb2c52975e6f30fc90 |
|
22-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: escape \ characters in Doxygen comments as needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
3772c9abf9651da1f77c83ec937c96e10a353c6a |
|
08-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
If fixits appear to overlap, move the second one over in the output. This occurs when you have two insertions and the first one is so long that the second fixit's column is before the first fixit ends. The edits themselves don't actually overlap, but our command-line preview does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
4031a376275ccf9f76eae2efeb26ee64c4c5780a |
|
25-May-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
ensure value passed to is space is representable as unsigned char if the value isn't an unsigned char or EOF behavior is undefined (and on Windows there's an assertion) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
c5493d7d60005fc8aa9b0e06d326026a9f9a688d |
|
24-May-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
fix Bug 12924 http://llvm.org/bugs/show_bug.cgi?id=12924 This issue was that the source location was pointing to a non-printable character and so CaretEnd was pointing one _column_ past the caret but not one _character_ past the caret. So the conversion between column and byte locations wasn't working (because the conversion is only valid from the first column or byte of a character). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.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/TextDiagnostic.cpp
|
d1fda0393b50c9c1ea25925725916da3ce13c1e2 |
|
01-May-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make some helper functions static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
40d8e971a32a23856ce1ab0106ae75cf4b92ca9d |
|
26-Apr-2012 |
Nico Weber <nicolasweber@gmx.de> |
Revert r154981, because it caused PR12674. Add a test for PR12674. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
0ddb097bb02ddee8f1924ee4fcca384cb18ad8c5 |
|
18-Apr-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Suppress -Wunused-variable warning in -Asserts build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
3acf764931e0f3e3ce75db0f4c4d400ee588d6b0 |
|
18-Apr-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
fix display of source lines with null characters git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
6749dd50869281f9b49ad5960e25288c15a71cac |
|
18-Apr-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
Nicer display of unprintable source, and fix caret display for non-ascii text Unprintable source in diagnostics is transformed to a printable form and then displayed with reversed colors if possible. Unprintable characters are displayed as <U+NNNN> while bytes that do not represent valid characters are shown as <XX>. Column adjustments to diagnostic carets, highlighted ranges, and fixups are made both for characters escaped as above and for characters which are printable but take up more than a single column. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
9591697707c69af99bb196d70895f4e7e28be333 |
|
17-Apr-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
Revert "Nicer display of unprintable source, and fix caret display for non-ascii text" This reverts commit e9a3b76ba589a8a884e978273beaed0d97cf9861. Revert "fix display of source lines with null characters" This reverts commit 70712b276e40bbe11e5063dfc7e82ce3209929cd. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
70712b276e40bbe11e5063dfc7e82ce3209929cd |
|
17-Apr-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
fix display of source lines with null characters git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
e9a3b76ba589a8a884e978273beaed0d97cf9861 |
|
17-Apr-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
Nicer display of unprintable source, and fix caret display for non-ascii text Unprintable source in diagnostics is transformed to a printable form and then displayed with reversed colors if possible. Unprintable characters are displayed as <U+NNNN> while bytes that do not represent valid characters are shown as <XX>. Column adjustments to diagnostic carets, highlighted ranges, and fixups are made both for characters escaped as above and for characters which are printable but take up more than a single column. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.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/TextDiagnostic.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/TextDiagnostic.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/TextDiagnostic.cpp
|
9875c6020f6f2832e48c0d41910ba9fc99181670 |
|
24-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Switch to a more natural formatting of the macro name printing. Suggested by John McCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
fe627b0e16e9a735891505325b670d0d3c51d2b9 |
|
16-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Hoist the logic I added to compute the macro name into a helper function. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
a47129e97be2379961046fac4f94f12ac15cb540 |
|
16-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Now that macro expansion notes are real notes and go through the same formatting as any other diagnostic, they will be properly line wrapped and otherwise pretty printed. Let's take advantage of that and the new factoring to add some helpful information to them (much like template backtrace notes and other notes): the name of the macro whose expansion is being noted. This makes a world of difference if caret diagnostics are disabled, making the expansion notes actually useful in this case. It also helps ensure that in edge cases the information the user needs is present. Consider: % nl -ba t5.cc 1 #define M(x, y, z) \ 2 y 3 4 M( 5 1, 6 2, 7 3); We now produce: % ./bin/clang -fsyntax-only t5.cc t5.cc:6:3: error: expected unqualified-id 2, ^ t5.cc:2:3: note: expanded from macro: M y ^ 1 error generated. Without the added information in the note, the name of the macro being expanded would never be shown. This also deletes a FIXME to use the diagnostic formatting. It's not yet clear to me that we *can* do this reasonably, and the production of this message was my primary goal here anyways. I'd love any comments or suggestions on improving these notes, their wording, etc. Currently, I need to make them provide more helpful information in the presence of a token-pasting buffer, and I'm pondering adding something along the lines of "expanded from argument N of macro: ...". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
938ef249e9e5b5e3b7065c7f92b2578aa2dd971b |
|
16-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the original bug in our diagnostic printing that got me started on this long quest: actually use the note printing machinery for each macro expansion note rather than a hacky version of it. This will colorize and format the notes the same as any other. There is still some stuff to fix here, but it's one step closer. No test case changes because currently we don't do anything differently that I can FileCheck for -- I don't really want to try matching the color escape codes... Suggestions for how to test this are welcome. =] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
4ba55659982bf45eedc9d32851815e5c4b6d8460 |
|
16-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Now that the structure of this is more reasonably laid out, fix a long standing deficiency: we were providing no macro backtrace information whenever caret diagnostics were turned off. This sinks the logic for suppressing the code snippet and caret to the code that actually prints tho code snippet and caret. Along the way, clean up the naming of functions, remove some now fixed FIXMEs, and generally improve the wording and logic of this process. Add a test case exerecising this functionality. It is notable that the resulting messages are extremely low quality. I'm working on a follow-up patch that should address this and have left a FIXME in the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
2ed3495278c13802a3d85578ab20560dcb0ef270 |
|
16-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Add proper doxyments to the entry point routine, and remove a dead parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
21a869aace45586125238fde88c477b330618a0b |
|
16-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Persist the TextDiagnostic object across multiple diagnostics as long as the SourceManager doesn't change, and the source files don't change. This greatly simplifies the interfaces and interactions. The lifetime of the TextDiagnostic object forms the 'session' over which we attempt to condense and deduplicate information in diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
7531f571808201d44002fa38b67ee0a81e5ae936 |
|
16-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Clean up the names of all the TextDiagnostic methods (and even a static function) to agree with the coding conventions, and in one case have a bit more information in it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
6ddd8871c07ab161742e8ed37d3ef121ac79fa59 |
|
16-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Move two functions out of the public interface that shouldn't have ever been there. Also delete their redundant doxyments in favor of those in the source file. I'm putting the doxyments for private and static helpers into the implementation file, and only the public interface doxyments into the header. If folks have strong opinions about this type of split, feel free to chime in, I'm happy to re-organize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|
db463bb2e4a9751f4cbe53996db751e1985ee966 |
|
16-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Graduate the TextDiagnostic interface to its own header and source file, making it accessible to anyone from the Frontend library. Still a good bit of cleanup to do here, but its a good milestone. This ensures that *all* of the functionality needed to implement the DiagnosticConsumer is exposed via the generic interface in some form. No sneaky re-use of static functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/TextDiagnostic.cpp
|