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

25 Коммитов

Автор SHA1 Сообщение Дата
Mike Stump 1eb4433ac4 Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 15:08:12 +00:00
Dan Gohman b044c473a1 Update clang for raw_fd_ostream no longer requiring F_Force.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79991 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 15:36:09 +00:00
Chris Lattner 92bcc27ada adjust for raw_fd_ostream api change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79809 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 02:59:41 +00:00
Daniel Dunbar 3c415447d5 Add missing '"'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77416 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 01:10:25 +00:00
Ted Kremenek f75560670b (1) Enable PlistDiagnostics to take an option "PathDiagnosticClientFactory"
object that it can use to forward PathDiagnostics for further processing. Along
with this feature, the PlistDiagnostics object logs which files are created by
the forwarding of the PathDiagnostics.

(2) Create a new PathDiagnosticClientFactory object for HTMLDiagnostics,
allowing other PathDiagnosticClients to forward PathDiagnostics through an
opaque interface.

(3) Create a "plist-html" diagnostics option in AnalysisConsumer to allow the
    logging of HTML files created in a hybrid Plist+HTML diagnostic client.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 22:13:39 +00:00
Dan Gohman 92db284169 Update for raw_fd_ostream API changes. raw_fd_ostream now has a
Force flag to control whether the case of opening an existing
file is considered an error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75802 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:32:18 +00:00
Ted Kremenek d49967f876 BugReporter/PathDiagnostics:
- Add an (optional) short description for BugReports for clients that want
  to distinguish between long and short descriptions for bugs
- Make the bug report for VLA less obscene for Plist diagnostics by using
  the short description


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70415 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 21:58:13 +00:00
Ted Kremenek 4c5fcd9469 Add PathDiagnosticRange to PathDiagnostics. These simply wrap SourceRange and
indicate whether or not the range represents an absolute range or should be
extended by lexing to the end of the token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22 22:26:10 +00:00
Ted Kremenek a104de8ec5 Plist diagnostics: Remove deprecated single-point locations in control-flow
pieces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69719 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21 21:03:00 +00:00
Chris Lattner 2c78b873f4 Change Lexer::MeasureTokenLength to take a LangOptions reference.
This allows it to accurately measure tokens, so that we get:

t.cpp:8:13: error: unknown type name 'X'
static foo::X  P;
       ~~~~~^

instead of the woefully inferior:

t.cpp:8:13: error: unknown type name 'X'
static foo::X  P;
       ~~~~ ^

Most of this is just plumbing to push the reference around.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14 23:22:57 +00:00
Ted Kremenek f076339c67 Fix output of ranges in analyzer plist files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68437 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-05 02:08:28 +00:00
Ted Kremenek 96a69267fc Hack: Add 'PathDiagnostic::flattenLocations()'. Because PlistDiagnosticClient
can use a PathLocation after any reference Stmts are reclaimed,
flattenLocation() converts those references to statements to source ranges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02 05:13:24 +00:00
Ted Kremenek 67f4964975 For plist diagnostics, use the extensive PathDiagnostic generation algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02 00:44:18 +00:00
Ted Kremenek 5fb5dfb664 - Changed PathDiagnosticPiece::getLocation() to return a PathDiagnosticLocation
instead of a FullSourceLoc. This resulted in a bunch of small edits in various
  clients.
- Updated BugReporter to include an alternate PathDiagnostic generation
  algorithm for PathDiagnosticClients desiring more control-flow pieces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 06:13:56 +00:00
Ted Kremenek 7dc8664a54 Allow two codepaths for PathDiagnostic generation. This patch mainly consists of
refactoring to make this possible (no functionality change).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68141 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31 20:22:36 +00:00
Ted Kremenek b0b6f726ab Properly escape special characters in <string>'s in plist file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67924 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-28 06:40:54 +00:00
Ted Kremenek f48fbc6cb1 analyzer plist: For PathDiagnosticControlFlowPieces, now output an array of
start-end points, where start and end are source ranges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67847 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-27 15:53:20 +00:00
Ted Kremenek ca1bada92c Emit aggregate "location" for PathDiagnostic to plist. This fixes <rdar://problem/6729558>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67845 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-27 15:31:11 +00:00
Ted Kremenek babdd7b56d BugReporter:
- Added an internal helper class 'PathDiagnosticBuilder' which now bundles the
  'ExecutionContinues' methods.
- Added preliminary diagnostics for short-circuit '&&' and '||'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-27 05:06:10 +00:00
Ted Kremenek 61dc71ab04 Plist diagnostics: distinguish between regular and extended messages for "events".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 00:42:56 +00:00
Ted Kremenek 082cb8d7bd PathDiagnostics:
- PathDiagnosticControlFlowPiece now consists of a "start" and "end" location
  to indicating the branch location and where the branch goes.

BugReporter:
- Updated BugReporter to construct PathDiagnosticControlFlowPiece objects with
  "end" locations.

PlistDiagnostics:
- Plists now contain the bug "type" (not just bug "category")
- Plists now encode control-flow pieces differently than events; now the
  "start" and "end" locations are recorded


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66818 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 18:41:53 +00:00
Ted Kremenek 0008683bee Handle "Macro" PathDiagnosticPiece kind when getting string identifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 02:49:29 +00:00
Ted Kremenek ae3487f787 Plist diagnostics now include PathDiagnostPiece::Kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65878 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 21:44:02 +00:00
Ted Kremenek 3d7f2bc5a5 For now, do not output the 'DisplayHint' in plist files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 19:40:15 +00:00
Daniel Dunbar e1bd4e6d7c Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*
driver taking lib/Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 06:16:29 +00:00