Commit Graph

10 Commits

Author SHA1 Message Date
Chandler Carruth 1aef0c5621 Switch the VerifyDiagnosticsClient to use PresumedLocs now that they
exist. Cheat and do this by adding some wrappers around the PresumedLoc
machinery that directly return the line and column number.

llvm-svn: 126281
2011-02-23 00:47:48 +00:00
Argyrios Kyrtzidis bc4679335c Remove the hack where, to get the return status, we had special case for VerifyDiagnosticsClient
and just check the number of errors from the DiagnosticClient.

llvm-svn: 119736
2010-11-18 21:13:57 +00:00
Benjamin Kramer 2bd4cee516 StringRefize.
llvm-svn: 112718
2010-09-01 17:28:48 +00:00
Douglas Gregor 2dd19f1d5f Simplify the ownership model for DiagnosticClients, which was really
convoluted and a bit leaky. Now, the Diagnostic object owns its
DiagnosticClient.

llvm-svn: 111437
2010-08-18 22:29:43 +00:00
Argyrios Kyrtzidis 499e6e49e7 Remove ATTRIBUTE_UNUSED from the common pattern of disallowing copying.
llvm-svn: 111101
2010-08-15 10:17:39 +00:00
Argyrios Kyrtzidis 0a33cb62a6 Add ATTRIBUTE_UNUSED to methods not supposed to be used.
llvm-svn: 111087
2010-08-15 01:15:27 +00:00
Chris Lattner e82411b47f add regex support for -verify mode. You can now do things like
expected-error-re {{someregex}}

Patch by mike-m!

llvm-svn: 102516
2010-04-28 20:02:30 +00:00
Chris Lattner 710bb87147 Fix PR5633 by making the preprocessor handle the case where we can
stat a file but where mmaping it fails.  In this case, we emit an
error like:
t.c:1:10: fatal error: error opening file '../../foo.h'

instead of "cannot find file".

llvm-svn: 90110
2009-11-30 04:18:44 +00:00
Daniel Dunbar 1b39a2edff Shuffle VerifyDiagnosticsClient API to be less fragile.
llvm-svn: 88765
2009-11-14 07:53:24 +00:00
Daniel Dunbar 348185548e Add VerifyDiagnosticsClient, to replace old -verify.
- This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface.

 - This also tweaks a few things:
   o Errors are now just regular diagnostics.
   o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn't yet a way to specify that they are expected. That would be nice though.

 - Not yet used.

llvm-svn: 88748
2009-11-14 03:23:19 +00:00