Граф коммитов

88 Коммитов

Автор SHA1 Сообщение Дата
Oscar Fuentes d2f4e5ea6e CMake: Builds and installs clang binary and libs (no docs yet). It
must be under the `tools' subdirectory of the LLVM *source* tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58180 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26 00:56:18 +00:00
Chris Lattner 99bd46c018 make the -rewrite-test a bit more interesting: it now
wraps comments in <i> tags.  Extend rewrite tokens to support
this minimal functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57409 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 06:09:52 +00:00
Chris Lattner cff9cc95de start implementing a token rewriter. At this point, it just reads in a file
and lets a client iterate over it. 



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57407 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 05:44:03 +00:00
Chris Lattner 590f0cc643 Change how raw lexers are handled: instead of creating them and then
using LexRawToken, create one and use LexFromRawLexer.  This avoids
twiddling the RawLexer flag around and simplifies some code (even 
speeding raw lexing up a tiny bit).

This change also improves the token paster to use a Lexer on the stack
instead of new/deleting it. 



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57393 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 01:15:46 +00:00
Ted Kremenek 2c3352b5d1 Add #include (introduced by dependence on DeclGroup)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 23:08:39 +00:00
Chris Lattner b5cd09a2bf add a new Rewriter::getRewritenText method that returns the text for a range
that includes any edits in the range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57037 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 23:31:16 +00:00
Zhongxing Xu 3f61c18dd7 Fixed an offset calculation error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56242 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 07:58:21 +00:00
Ted Kremenek a95d375044 Patch by Csaba Hruska!
"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch
covers the AST library, but ignores Analysis lib."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56185 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-13 05:16:45 +00:00
Ted Kremenek cc1b8532a1 Patch by Kovarththanan Rajaratnam!
"This minor patch adds markup of string literals with a red colour."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55589 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-31 16:37:56 +00:00
Nico Weber 63366303f6 honor EscapeSpaces in 2nd overload of EscapeText()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54854 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-16 22:24:33 +00:00
Ted Kremenek 170db7c38d Add CSS for word wrapping of long message bubbles.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53492 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11 23:13:22 +00:00
Ted Kremenek f6f593fae2 In a report-XXXXX.html, make the title include the name of the file with the bug. Patch by Jean-Daniel Dupas!
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-July/002166.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53184 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 18:31:05 +00:00
Chris Lattner 3d2e8c7b70 Fix rewrite rope to keep the leaf list up-to-date as it erases leaves
from the rope.  rdar://5952468


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51651 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-28 18:45:56 +00:00
Chris Lattner 54bd7cb491 add an assertion
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51645 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-28 16:35:02 +00:00
Chris Lattner 514b24cb53 fix a nasty off-by-one error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51519 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-23 23:29:33 +00:00
Chris Lattner 9ed7cfd351 fix an inconsistency computing offsets that caused a crash on rewrite-nest.m
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51514 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-23 23:06:56 +00:00
Chris Lattner b6403af3e6 Fix rdar://5919567: assertion failure: split didn't occur before erase!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50839 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 03:23:46 +00:00
Chris Lattner c66d0aa934 fix a rewriter crash on zero length files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50126 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 03:21:50 +00:00
Chris Lattner f3d8d19caf replace form feeds with an <hr> tag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49975 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 23:56:30 +00:00
Ted Kremenek fb58609c5b Provide a version of html::HighlightMacros that takes a Preprocessor&.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49896 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 05:34:33 +00:00
Chris Lattner 5c176f7a9b Make tab insertion really right: the number of spaces inserted
depends on the column number of the start of the tab.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49891 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 04:54:20 +00:00
Ted Kremenek 38941b5b54 Use HTML5 doctype when generating HTML.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49888 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 03:37:38 +00:00
Ted Kremenek f501626052 Updated CSS colors. Patch by Cedric Venet!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49886 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 02:12:39 +00:00
Chris Lattner 9227c69534 Fix a problem noticed by Nuno, where we wouldn't escape characters in
macro expansions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49877 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 23:03:14 +00:00
Ted Kremenek 339b9c2775 class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its dstor.
clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and
  passes it to the preprocessor object.
  
clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main().

html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new
Preprocessor to highlight macros.

class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros().
Updated clients of HTMLDiagnostics to use this new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49875 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 22:31:54 +00:00
Chris Lattner dc5be47542 don't give macros a background
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49871 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 21:32:46 +00:00
Chris Lattner 8aa06aca8b Make sure popup is on top over other spans. wrap long line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49870 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 21:28:41 +00:00
Ted Kremenek 07339a63b4 Add support in HTML macro expansion for hovering over a macro and automatically
expanding its definition.  This is a pure CSS solution.

Tested on IE7, Firefox 3b4, and Safari 3.1.

Patch by Cedric Venet!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49865 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 19:57:27 +00:00
Chris Lattner 6f46be279f insert macro expansions into floating divs. For now, they are always displayed,
but we want some javascript or something toggle their display.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49836 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 00:40:45 +00:00
Chris Lattner 5deb96d065 correctly hilight multi-line macro definitions and other
preprocessor directives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49828 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 23:21:17 +00:00
Chris Lattner 9402b57a0d Make HighlightRange correctly handle multi-line ranges. This causes us to
correctly handle multi-line comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49827 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 23:06:45 +00:00
Chris Lattner 5ef3e2c45f add a new HighlightRange API, it doesn't handle multiline ranges
yet, but it will soon...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49825 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 22:45:51 +00:00
Chris Lattner 678c6358c8 reenable highlighting of (the first line of) comments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49816 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 20:54:51 +00:00
Chris Lattner a745e8c528 switch from relexing with the preprocessor to do syntax highlighting to relexing
with the Lexer.  This is cheaper and gives us some advantages.  For now we start
highlighting preprocessor directives (which need improvement), and disable 
comments.  Comments to be restored later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49815 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 20:51:51 +00:00
Chris Lattner 74ea3e5c57 Take a stab at highlighting #defines and #includes. This doesn't work yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49781 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 06:53:09 +00:00
Chris Lattner c4586c234e Syntax highlight keywords. I assume someone else will pick less appaling colors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49780 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 06:35:07 +00:00
Chris Lattner c54d50a418 split syntax highlighting of macros from keywords and comments,
allowing us to use a cheaper means to highlight keywords and making
it so that comments won't foul up macro expansions.

Start highlighting macro expansions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49779 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 06:32:08 +00:00
Chris Lattner 3245a0a1c7 Add a mode of hackily syntax highlighting comments. This has a number of
problems, including the fact that it doesn't work well with multi-line 
comments due to Ted's crazy table.  However, that could be fixed, and it
does work with single-line ones :).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49778 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 06:11:58 +00:00
Chris Lattner 8570f0b0fd Switch AddLineNumbers to hack on a rewritebuffer instead of on a
rewriter, getting sourcelocations out of the picture.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49775 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 04:37:29 +00:00
Chris Lattner 735271479a In html::EscapeText, instead of going through the rewriter with
a SourceLocation to get a RewriteBuffer, poke the RewriteBuffer
with an offset directly.  THis is no faster, but results in 
cleaner code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49774 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 04:33:23 +00:00
Chris Lattner 57df3b9500 switch AddLineNumber to use a SmallString instead of sstream. This
speeds up -emit-html on ted's testcase by 29% (.138 -> 0.107s) in a
release build.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49767 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 04:11:35 +00:00
Ted Kremenek 4b0f81323b For HTML diagnostics, output more information about a bug report.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49742 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 21:25:08 +00:00
Chris Lattner b9b3094813 finish commenting RewriteRope
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49712 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 06:37:11 +00:00
Chris Lattner 53f9e203c1 Fix a corner case that ted hit in -emit-html, rdar://5863212
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49703 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 02:26:21 +00:00
Chris Lattner bf26856c21 simplify the implementation of the insert/split operation to return
the new RHS directly instead of indirecting through the 'InsertResult'
struct.  This eliminates InsertResult.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49694 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 22:10:58 +00:00
Chris Lattner 5618d88b93 Add a bunch of comments, move RewriteRope::MakeRopeString out of line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49689 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 21:41:00 +00:00
Chris Lattner 70778c8582 fix more uninit ivars, who wrote this junk? :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49679 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 20:07:03 +00:00
Chris Lattner b442e21970 Fix an assertion ted was hitting, due to an uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49678 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 20:05:32 +00:00
Chris Lattner 5fd3e2673a move a ton of code out of line, from RewriteRope.h -> RewriteRope.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49664 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:54:23 +00:00
Chris Lattner e5cd857f7e remove ifdefs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49651 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:12:49 +00:00