summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/HTMLDiagnostics.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*Daniel Dunbar2009-03-021-502/+0
| | | | | | driver taking lib/Driver. llvm-svn: 65811
* Introduce code modification hints into the diagnostics system. When weDouglas Gregor2009-02-261-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | know how to recover from an error, we can attach a hint to the diagnostic that states how to modify the code, which can be one of: - Insert some new code (a text string) at a particular source location - Remove the code within a given range - Replace the code within a given range with some new code (a text string) Right now, we use these hints to annotate diagnostic information. For example, if one uses the '>>' in a template argument in C++98, as in this code: template<int I> class B { }; B<1000 >> 2> *b1; we'll warn that the behavior will change in C++0x. The fix is to insert parenthese, so we use code insertion annotations to illustrate where the parentheses go: test.cpp:10:10: warning: use of right-shift operator ('>>') in template argument will require parentheses in C++0x B<1000 >> 2> *b1; ^ ( ) Use of these annotations is partially implemented for HTML diagnostics, but it's not (yet) producing valid HTML, which may be related to PR2386, so it has been #if 0'd out. In this future, we could consider hooking this mechanism up to the rewriter to actually try to fix these problems during compilation (or, after a compilation whose only errors have fixes). For now, however, I suggest that we use these code modification hints whenever we can, so that we get better diagnostics now and will have better coverage when we find better ways to use this information. This also fixes PR3410 by placing the complaint about missing tokens just after the previous token (rather than at the location of the next token). llvm-svn: 65570
* HTMLDiagnostics: Always display diagnostics *below* the line in question.Ted Kremenek2009-02-181-22/+7
| | | | llvm-svn: 64959
* lower the interface to getLineNumber like we did forChris Lattner2009-02-041-2/+2
| | | | | | | | getColumnNumber. This fixes a FIXME in SourceManager::getPresumedLoc because we now just decompose the sloc once. llvm-svn: 63701
* make SM::getColumnNumber take a predecomposed FileID/offset, whichChris Lattner2009-02-041-10/+9
| | | | | | | | makes it clear to clients that they have to pick an instantiation or spelling location before calling it and allows optimization based on that. llvm-svn: 63698
* PathDiagnostics:Ted Kremenek2009-01-271-0/+8
| | | | | | | | | | | | | - Add the distinction between the 'bug type' and the 'bug description' HTMLDiagnostics: - Output the bug type field as HTML comments scan-build: - Use the bug type field instead of the bug description for the HTML table. - Radar filing now automatically picks up the bug description in the title (addresses <rdar://problem/6265970>) llvm-svn: 63084
* Rename SourceManager::getCanonicalFileID -> getFileID. There isChris Lattner2009-01-191-15/+8
| | | | | | no longer such thing as a non-canonical FileID. llvm-svn: 62499
* this massive patch introduces a simple new abstraction: it makesChris Lattner2009-01-171-48/+44
| | | | | | | | | | | | | | | "FileID" a concept that is now enforced by the compiler's type checker instead of yet-another-random-unsigned floating around. This is an important distinction from the "FileID" currently tracked by SourceLocation. *That* FileID may refer to the start of a file or to a chunk within it. The new FileID *only* refers to the file (and its #include stack and eventually #line data), it cannot refer to a chunk. FileID is a completely opaque datatype to all clients, only SourceManager is allowed to poke and prod it. llvm-svn: 62407
* eliminate FullSourceLoc::getLocation() now that FullSourceLocChris Lattner2009-01-161-5/+4
| | | | | | *is* the location. This eliminates some weird X.getLocation().getLocation()'s. llvm-svn: 62376
* elimiante FullSourceLoc::getCanonicalFileIDChris Lattner2009-01-161-6/+4
| | | | llvm-svn: 62374
* an instantiation loc is always a file loc.Chris Lattner2009-01-161-3/+0
| | | | llvm-svn: 62370
* more SourceLocation lexicon change: instead of referring to theChris Lattner2009-01-161-23/+23
| | | | | | "logical" location, refer to the "instantiation" location. llvm-svn: 62316
* Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'Ted Kremenek2008-11-031-1/+1
| | | | llvm-svn: 58646
* Fixed a horrible bug in HTMLDiagnostics.cpp where bugs referencing source ↵Ted Kremenek2008-11-021-3/+3
| | | | | | ranges that occur within macros would not be emitted at all. llvm-svn: 58550
* Expand bubble size by 50%.Ted Kremenek2008-10-241-1/+1
| | | | llvm-svn: 58111
* Output "REPORTHEADER" and "REPORTSUMMARYEXTRA" tags for use with scan-view.Ted Kremenek2008-09-221-2/+4
| | | | llvm-svn: 56440
* Added experimental "intelligent-sizing" of HTML message bubbles based on the ↵Ted Kremenek2008-09-211-35/+77
| | | | | | contents of the message. llvm-svn: 56400
* Add "category" to BugTypes, allowing bugs to be grouped.Ted Kremenek2008-09-201-0/+9
| | | | | | Changed casing of many bug names. The convention will be to have bug names (mostly) lower cased, and categories use some capitalization. llvm-svn: 56385
* Patch by Csaba Hruska!Ted Kremenek2008-09-131-7/+13
| | | | | | | "Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch covers the AST library, but ignores Analysis lib." llvm-svn: 56185
* Moved HTMLDiagnostics to lib/Driver.Zhongxing Xu2008-08-241-0/+444
llvm-svn: 55274
OpenPOWER on IntegriCloud