summaryrefslogtreecommitdiffstats
path: root/clang/Driver/DiagChecker.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move <root>/Driver into <root>/tools/clang-cc.Daniel Dunbar2009-03-241-302/+0
| | | | | | Again, I tried to update cmake but it is untested. llvm-svn: 67605
* Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*Daniel Dunbar2009-03-021-1/+1
| | | | | | driver taking lib/Driver. llvm-svn: 65811
* Make one expected-diag directive match exactly one actual diagnostic.Sebastian Redl2009-02-071-36/+56
| | | | | | This uncovers some bugs, so several test cases now fail. llvm-svn: 64025
* spelling change.Chris Lattner2009-02-041-1/+1
| | | | llvm-svn: 63711
* use simplified Lexer ctor.Chris Lattner2009-01-171-4/+1
| | | | llvm-svn: 62416
* this massive patch introduces a simple new abstraction: it makesChris Lattner2009-01-171-3/+3
| | | | | | | | | | | | | | | "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
* more SourceLocation lexicon change: instead of referring to theChris Lattner2009-01-161-3/+3
| | | | | | "logical" location, refer to the "instantiation" location. llvm-svn: 62316
* Rewrite FindDiagnostics to be more strict about the formatting of the Chris Lattner2008-11-241-31/+55
| | | | | | | expected-foo strings. Now the only allowed characters between expected-error and {{ is whitespace. llvm-svn: 59925
* clean up -verify mode output. If the expected-error string is Chris Lattner2008-11-231-35/+34
| | | | | | mangled, report it using the diagnostics machinery instead of printf. llvm-svn: 59924
* Change -verify mode to find the "expected-error" and "expected-warning" stringsChris Lattner2008-11-211-15/+14
| | | | | | | | with a raw lexer instead of a PP lexer. This means that -verify doesn't scan #include'd headers for expected-error/warning strings, and it also means that it doesn't ignore them in #if 0. llvm-svn: 59774
* Remove unneeded CheckASTConsumer function.Daniel Dunbar2008-10-271-8/+0
| | | | | | - No functionality change. llvm-svn: 58282
* Allow \n for newlines in expected error messages.Sebastian Redl2008-10-261-0/+4
| | | | llvm-svn: 58198
* Add support for expected-note to Clang's -verify optionDouglas Gregor2008-09-111-5/+26
| | | | llvm-svn: 56089
* * Remove isInSystemHeader() from DiagClient, move it to SourceManagerNico Weber2008-08-101-1/+4
| | | | | | | | | | | | | | | | * Move FormatError() from TextDiagnostic up to DiagClient, remove now empty class TextDiagnostic * Make DiagClient optional for Diagnostic This fixes the following problems: * -html-diags (and probably others) does now output the same set of warnings as console clang does * nothing crashes if one forgets to call setHeaderSearch() on TextDiagnostic * some code duplication is removed llvm-svn: 54620
* add a libDriver, for now only move the text diangostics stuff from Driver to ↵Nico Weber2008-08-051-1/+1
| | | | | | there llvm-svn: 54383
* Allow -parse-noop -verify options to be used together.Argyrios Kyrtzidis2008-06-131-1/+5
| | | | llvm-svn: 52249
* rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp}Chris Lattner2008-02-061-1/+1
| | | | llvm-svn: 46786
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* Interned MainFileID within SourceManager. Since SourceManager is referenced byTed Kremenek2007-12-191-8/+8
| | | | | | | | | both Preprocessor and ASTContext, we no longer need to explicitly pass MainFileID around in function calls that also pass either Preprocessor or ASTContext. This resulted in some nice cleanups in the ASTConsumers and the driver. llvm-svn: 45228
* start partitioning the diagnostics into two classes: thoseChris Lattner2007-11-301-2/+2
| | | | | | | | that are builtin and those that are aren't. This is a bunch of API refactoring that will make this possible, but there is no functionality change yet. llvm-svn: 44473
* The checking for the delimiters of expected error/warning messages wasBill Wendling2007-11-261-2/+2
| | | | | | | looking only for { and } instead of {{ and }}. Changed it to check for this explicitly. llvm-svn: 44326
* Fix ownership model of ParseAST to allow the dtor of Chris Lattner2007-11-031-2/+2
| | | | | | | ASTConsumer to process the AST before it is destroyed. This allows elimination of HandleObjcMetaDataEmission. llvm-svn: 43659
* Make a significant change to invert the control flow handlingChris Lattner2007-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | predefined macros. Previously, these were handled by the driver, now they are handled by the preprocessor. Some fallout of this: 1. Instead of preprocessing two buffers (the predefines, then the main source file) we now start preprocessing the main source file and inject the predefines as a "psuedo #include" from the main source file. 2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify Preprocessor::isInPrimaryFile. 3. The driver doesn't have to know about standard #defines, the preprocessor knows, which is nice for people wanting to define their own drivers. 4. This allows us to put normal tokens in the predefine buffer, for example a definition for __builtin_va_list that is target-specific, and a typedef for id in objc. llvm-svn: 42818
* convert driver over to use Token::is/isNot APIs. fwew, all done.Chris Lattner2007-10-091-2/+2
| | | | llvm-svn: 42800
* Rename ASTStreamers.* -> ASTConsumers.*Chris Lattner2007-10-071-1/+1
| | | | llvm-svn: 42718
* Refactored driver so that any action that is implemented using anTed Kremenek2007-09-261-11/+2
| | | | | | | | | | | | | | ASTConsumer can also be verified using the diagnostics checker. From the command line, users may activate diagnostic checking using the "-verify" option. For example, "clang -verify -warn-dead-stores" checks if the warnings flagged by the dead store checker match those in the comments. Note that we still have the option "-parse-ast-check" for backwards comptability with existing test cases. This option is now equivalent to "-parse-ast -verify". llvm-svn: 42362
* Fixed broken English in comment.Ted Kremenek2007-09-251-1/+1
| | | | llvm-svn: 42317
* Added "CheckASTConsumer", a function that generalizesTed Kremenek2007-09-251-6/+11
| | | | | | | | | | | | | "CheckDiagnostics" (used for -parse-ast-check) to check the diagnostics of any ASTConsumer. Reimplemented CheckDiagnostics to use CheckASTConsumer instead. Added driver option -warn-dead-stores-check, which checks the diagnostics generated by the DeadStores checker. This is implemented using CheckASTConsumer.111 llvm-svn: 42310
* From Justin Handville:Chris Lattner2007-09-161-1/+1
| | | | | | | | | "The ExpectedStr search was starting at the end of the comment string. This patch starts the search at the beginning of the comment string. After applying this patch, clang -parse-ast-check on negative test case source files worked as expected." llvm-svn: 42012
* add a new ASTConsumer consumer to simplify stuff in the driver.Chris Lattner2007-09-151-2/+8
| | | | | | Switch -parse-ast over to it. llvm-svn: 41991
* When relexing the file to find expected warnings/errors, make sureChris Lattner2007-08-301-0/+7
| | | | | | to turn off all lexer-related warnings. llvm-svn: 41604
* Build ASTs before relexing the file. This avoids having comment finding ↵Chris Lattner2007-08-101-3/+3
| | | | | | | | | mutate the preprocessor state, causing bogus diagnostics when the file is parsed for real. This implements Misc/diag-checker.c. Thanks to Ted for noticing this. llvm-svn: 41000
* At one point there were going to be lexer and parser tokens.Chris Lattner2007-07-201-1/+1
| | | | | | | Since that point is now long gone, we should rename LexerToken to Token, as it is the only kind of token we have. llvm-svn: 40105
* Reimplement SourceLocation. Instead of having a Chris Lattner2007-07-201-5/+5
| | | | | | | | | | | | | | | | | fileid/offset pair, it now contains a bit discriminating between mapped locations and file locations. This separates the tables for macros and files in SourceManager, and allows better separation of concepts in the rest of the compiler. This allows us to have *many* macro instantiations before running out of 'addressing space'. This is also more efficient, because testing whether something is a macro expansion is now a bit test instead of a table lookup (which also used to require having a srcmgr around, now it doesn't). This is fully functional, but there are several refinements and optimizations left. llvm-svn: 40103
* pick more logical names for routines.Chris Lattner2007-06-281-30/+24
| | | | llvm-svn: 39706
* Remove dead code.Chris Lattner2007-06-281-10/+7
| | | | llvm-svn: 39705
* Eliminate almost all of the redundancy Bill introduced.Chris Lattner2007-06-281-10/+27
| | | | llvm-svn: 39704
* tersify outputChris Lattner2007-06-271-1/+1
| | | | llvm-svn: 39692
* rename LLVMDiagChecker.* -> DiagChecker.*Chris Lattner2007-06-271-2/+2
| | | | llvm-svn: 39690
* Submitted by: Bill WendlingBill Wendling2007-06-271-2/+5
| | | | | | | | | - Chris noticed that if there were multiple warnings/errors expected throughout the file and we were checking only one of them, then it would go ahead and say that the whole file was okay. Fixed this by adding a check for the line number as well as the string. llvm-svn: 39689
* Submitted by: Bill WendlingBill Wendling2007-06-271-2/+3
| | | | | | Removed unnecessary typedef. llvm-svn: 39686
* Submitted by: Bill WendlingBill Wendling2007-06-271-9/+11
| | | | | | - Shouldn't increment the iterator but a copy of it. llvm-svn: 39679
* Submitted by: Bill WendlingBill Wendling2007-06-271-0/+216
Reviewed by: Chris Lattner - Added a new diagnostic client, TextDiagnosticBuffer. It buffers all reported diagnostics. - Use the new diagnostic client to check that expected diagnostics are actually emitted. The way this is done is to put the expected diagnostic in a comment on the line you expect it to be emitted for. Like this: int X = A; // expected-warning {{blah}} - Use -parse-ast-check to use this feature. llvm-svn: 39678
OpenPOWER on IntegriCloud