summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PlistDiagnostics.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move BugReporter.h, PathDiagnostic.h, and BugType.h to ↵Ted Kremenek2010-01-251-1/+1
| | | | | | 'include/Checker/BugReporter' llvm-svn: 94428
* Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek2010-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | (1) libAnalysis is a generic analysis library that can be used by Sema. It defines the CFG, basic dataflow analysis primitives, and inexpensive flow-sensitive analyses (e.g. LiveVariables). (2) libChecker contains the guts of the static analyzer, incuding the path-sensitive analysis engine and domain-specific checks. Now any clients that want to use the frontend to build their own tools don't need to link in the entire static analyzer. This change exposes various obvious cleanups that can be made to the layout of files and headers in libChecker. More changes pending. :) This change also exposed a layering violation between AnalysisContext and MemRegion. BlockInvocationContext shouldn't explicitly know about BlockDataRegions. For now I've removed the BlockDataRegion* from BlockInvocationContext (removing context-sensitivity; although this wasn't used yet). We need to have a better way to extend BlockInvocationContext (and any LocationContext) to add context-sensitivty. llvm-svn: 94406
* Use the llvm coding convention for indentation for switch.Mike Stump2010-01-201-28/+28
| | | | llvm-svn: 93966
* Try to make the output of PlistDiagnostics more deterministic by sorting ↵Ted Kremenek2009-12-031-0/+39
| | | | | | PathDiagnostics before they are emitted. Fixes <rdar://problem/7439668>. llvm-svn: 90478
* Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.Benjamin Kramer2009-11-281-3/+1
| | | | llvm-svn: 90033
* Only flush plist diagnostics once.Ted Kremenek2009-11-131-1/+7
| | | | llvm-svn: 87073
* Fix recently introduced use-after-free error reported in ↵Ted Kremenek2009-11-131-0/+2
| | | | | | <rdar://problem/7387478>. llvm-svn: 87072
* Convert CreateAnalysisConsumer and friends to just take a const ↵Daniel Dunbar2009-11-051-2/+2
| | | | | | Preprocessor&, and simplify. llvm-svn: 86112
* Acting on Daniel's nagging, remove PathDiagnosticClientFactory() andTed Kremenek2009-11-051-26/+29
| | | | | | | | migrate work in the destructors of PathDiagnosticClients from their destructors to FlushReports(). The destructors now currently call FlushReports(); this will be fixed in a subsequent patch. llvm-svn: 86108
* Kill PreprocessorFactory, which was both morally repugnant and totally unused.Daniel Dunbar2009-11-041-3/+1
| | | | llvm-svn: 86076
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-55/+55
| | | | llvm-svn: 81346
* Update clang for raw_fd_ostream no longer requiring F_Force.Dan Gohman2009-08-251-2/+1
| | | | llvm-svn: 79991
* adjust for raw_fd_ostream api change.Chris Lattner2009-08-231-1/+2
| | | | llvm-svn: 79809
* Add missing '"'Daniel Dunbar2009-07-291-1/+1
| | | | llvm-svn: 77416
* (1) Enable PlistDiagnostics to take an option "PathDiagnosticClientFactory"Ted Kremenek2009-07-271-8/+44
| | | | | | | | | | | | | | | 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. llvm-svn: 77264
* Update for raw_fd_ostream API changes. raw_fd_ostream now has aDan Gohman2009-07-151-1/+1
| | | | | | | Force flag to control whether the case of opening an existing file is considered an error. llvm-svn: 75802
* BugReporter/PathDiagnostics:Ted Kremenek2009-04-291-0/+1
| | | | | | | | | - 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 llvm-svn: 70415
* Add PathDiagnosticRange to PathDiagnostics. These simply wrap SourceRange andTed Kremenek2009-04-221-2/+2
| | | | | | | indicate whether or not the range represents an absolute range or should be extended by lexing to the end of the token. llvm-svn: 69834
* Plist diagnostics: Remove deprecated single-point locations in control-flowTed Kremenek2009-04-211-8/+1
| | | | | | pieces. llvm-svn: 69719
* Change Lexer::MeasureTokenLength to take a LangOptions reference.Chris Lattner2009-04-141-39/+55
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 69099
* Fix output of ranges in analyzer plist files.Ted Kremenek2009-04-051-8/+14
| | | | llvm-svn: 68437
* Hack: Add 'PathDiagnostic::flattenLocations()'. Because PlistDiagnosticClientTed Kremenek2009-04-021-0/+4
| | | | | | | can use a PathLocation after any reference Stmts are reclaimed, flattenLocation() converts those references to statements to source ranges. llvm-svn: 68292
* For plist diagnostics, use the extensive PathDiagnostic generation algorithm.Ted Kremenek2009-04-021-1/+1
| | | | llvm-svn: 68264
* - Changed PathDiagnosticPiece::getLocation() to return a PathDiagnosticLocationTed Kremenek2009-04-011-13/+22
| | | | | | | | | 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. llvm-svn: 68193
* Allow two codepaths for PathDiagnostic generation. This patch mainly consists ofTed Kremenek2009-03-311-0/+2
| | | | | | refactoring to make this possible (no functionality change). llvm-svn: 68141
* Properly escape special characters in <string>'s in plist file.Ted Kremenek2009-03-281-12/+34
| | | | llvm-svn: 67924
* analyzer plist: For PathDiagnosticControlFlowPieces, now output an array ofTed Kremenek2009-03-271-0/+21
| | | | | | start-end points, where start and end are source ranges. llvm-svn: 67847
* Emit aggregate "location" for PathDiagnostic to plist. This fixes ↵Ted Kremenek2009-03-271-2/+7
| | | | | | <rdar://problem/6729558>. llvm-svn: 67845
* BugReporter:Ted Kremenek2009-03-271-1/+3
| | | | | | | | - Added an internal helper class 'PathDiagnosticBuilder' which now bundles the 'ExecutionContinues' methods. - Added preliminary diagnostics for short-circuit '&&' and '||' llvm-svn: 67822
* Plist diagnostics: distinguish between regular and extended messages for ↵Ted Kremenek2009-03-191-0/+5
| | | | | | "events". llvm-svn: 67269
* PathDiagnostics:Ted Kremenek2009-03-121-32/+83
| | | | | | | | | | | | | | | | - 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 llvm-svn: 66818
* Handle "Macro" PathDiagnosticPiece kind when getting string identifier.Ted Kremenek2009-03-101-4/+8
| | | | llvm-svn: 66518
* Plist diagnostics now include PathDiagnostPiece::Kind.Ted Kremenek2009-03-021-0/+6
| | | | llvm-svn: 65878
* For now, do not output the 'DisplayHint' in plist files.Ted Kremenek2009-03-021-0/+3
| | | | llvm-svn: 65861
* Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*Daniel Dunbar2009-03-021-0/+239
driver taking lib/Driver. llvm-svn: 65811
OpenPOWER on IntegriCloud