Commit Graph

24 Commits

Author SHA1 Message Date
Daniel Dunbar 221fa94e40 More #include cleaning
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
   SourceLocation.h)
 - Move ASTContext constructor into implementation

llvm-svn: 54627
2008-08-11 04:54:23 +00:00
Ted Kremenek 79ab0fa913 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

llvm-svn: 53184
2008-07-07 18:31:05 +00:00
Chris Lattner ba1f37bfdf simplify ownership of the predefines buffer.
llvm-svn: 49973
2008-04-19 23:09:31 +00:00
Ted Kremenek 71c41d9561 Restore macro expansion for HTMLPrint by using the original Preprocessor.
This is a workaround until we figure out why a freshly create Preprocessor
doesn't expand macros from headers.

llvm-svn: 49897
2008-04-18 05:35:23 +00:00
Ted Kremenek f42f3fb47d 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.

llvm-svn: 49875
2008-04-17 22:31:54 +00:00
Chris Lattner 7c7e9b3bbe Handle text escaping (e.g. & -> &) last, to avoid interactions between 'replace' operations and insert operations. This fixes a problem with "&;&" on line 666 of the gcc.c example I sent out.
llvm-svn: 49874
2008-04-17 22:24:51 +00:00
Ted Kremenek f2e6fcf3bf Hook up HTMLDiagnostics to use Chris's new syntax highlighting. --html-diags
currently doesn't pass in the Preprocessor from the driver, so we don't get
syntax highlighting when we create HTMLDiagnostics in that way.

llvm-svn: 49796
2008-04-16 16:39:56 +00:00
Chris Lattner a5a75e7a10 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.

llvm-svn: 49779
2008-04-16 06:32:08 +00:00
Chris Lattner 060d8aa2ed 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 :).

llvm-svn: 49778
2008-04-16 06:11:58 +00:00
Chris Lattner dffe0f7db5 Add -o support for -emit-html, make it not produce a file on an error.
llvm-svn: 49777
2008-04-16 05:21:09 +00:00
Ted Kremenek 088d12e741 Remove "--html-test" driver option and its corresponding code; all of this
functionality has been migrated into "--emit-html" and "--html-diags".

llvm-svn: 49776
2008-04-16 04:38:45 +00:00
Chris Lattner e4dd37ce0a speed up -emit-html in a release build by 6.5% by avoiding std::string.
llvm-svn: 49764
2008-04-16 03:46:57 +00:00
Steve Naroff 4fff2a08aa Fix comment.
llvm-svn: 49688
2008-04-14 21:39:16 +00:00
Ted Kremenek 13ad6e1234 Convert over to new SourceManager::isFromMainFile() instead of doing direct
FileID comparison (fixes insidious corner case with chunks).

llvm-svn: 49684
2008-04-14 21:14:03 +00:00
Ted Kremenek d4db4fa359 For -emit-html, use the Rewriter to expand tabs.
llvm-svn: 49409
2008-04-08 23:25:54 +00:00
Ted Kremenek bc24962566 Added HTML highlighting for ranges.
llvm-svn: 48572
2008-03-19 23:55:53 +00:00
Ted Kremenek 1651b7cd2d Misc. cleanups to HTML printing: make code rendered using tables; add
better div positioning for messages.

llvm-svn: 48555
2008-03-19 21:59:05 +00:00
Ted Kremenek 216624ce58 Initial experimentation with adding boxed "annotations" to HTMLized source.
llvm-svn: 48540
2008-03-19 07:53:42 +00:00
Ted Kremenek 966da4acc3 Moved generation of html header/footer with builtin CSS to the rewriter library.
llvm-svn: 48537
2008-03-19 06:14:37 +00:00
Ted Kremenek 3f8392626b More cleanups to the HTML rewriter (with line formatting), with better
pretty-printing of line numbers.

llvm-svn: 48533
2008-03-19 05:07:26 +00:00
Ted Kremenek 5ddff02861 More cleanups to HTML rewriter API: remove the InsertTag method; was too complicated
and clients can achieve a cleaner design just by inserting tags directly.  Reserve
the "html" namespace for meta-level operations (e.g., escaping text, etc.)

llvm-svn: 48524
2008-03-19 01:30:02 +00:00
Ted Kremenek 8800ae68a0 More HTML rewriter cleanups. Preliminary CSS support in code pretty-printing.
llvm-svn: 48518
2008-03-18 23:55:46 +00:00
Ted Kremenek 5792cebb08 Some cleanups to the HTMLRewrite API. Added support for printing out line
numbers (more work to be done on aesthetics).

llvm-svn: 48512
2008-03-18 23:08:51 +00:00
Ted Kremenek b0c409a235 Added HTML pretty-printer.
llvm-svn: 48507
2008-03-18 22:21:07 +00:00