summaryrefslogtreecommitdiffstats
path: root/clang/Driver/AnalysisConsumer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move <root>/Driver into <root>/tools/clang-cc.Daniel Dunbar2009-03-241-770/+0
| | | | | | Again, I tried to update cmake but it is untested. llvm-svn: 67605
* Display the exploded graph before calling BugReporter.FlushReports(). The latterTed Kremenek2009-03-111-4/+4
| | | | | | | deletes all registered BugTypes from BugReporter, and thus we need to display the graph first. llvm-svn: 66623
* Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*Daniel Dunbar2009-03-021-2/+2
| | | | | | driver taking lib/Driver. llvm-svn: 65811
* Add experimental logic in GRExprEngine::EvalEagerlyAssume() to handleTed Kremenek2009-02-251-1/+7
| | | | | | | | | | | expressions of the form: 'short x = (y != 10);' While we handle 'int x = (y != 10)' lazily, the cast to another integer type currently loses the symbolic constraint. Eager evaluation of the constraint causes the paths to bifurcate and eagerly evaluate 'y != 10' to a constant of 1 or 0. This should address <rdar://problem/6619921> until we have a better (more lazy approach) for handling promotions/truncations of symbolic integer values. llvm-svn: 65480
* Make 'RangeConstraintManager' the default ConstraintManager.Ted Kremenek2009-02-201-1/+1
| | | | llvm-svn: 65173
* Static Analyzer driver/options (partial) cleanup:Ted Kremenek2009-02-171-73/+155
| | | | | | | | | | | | | | - Move all analyzer options logic to AnalysisConsumer.cpp. - Unified specification of stores/constraints/output to be: -analyzer-output=... -analyzer-store=... -analyzer-constraints=... instead of -analyzer-range-constraints, -analyzer-store-basic, etc. - Updated drivers (ccc-analyzer, scan-builds, new ccc) to obey this new interface - Updated test cases to conform to new driver options llvm-svn: 64737
* RangeConstraintManager is not on by default.Ted Kremenek2009-02-161-1/+1
| | | | llvm-svn: 64638
* Patch by Ben Laurie:Ted Kremenek2009-02-141-0/+7
| | | | | | | | | | | | | | | | | | | | ConstraintManager: - constify getSymVal() BasicConstraintManager: - Pull out logic that would be common to ConstraintManagers of a similar nature and put them in a parent class called 'SimpleConstraintManager'. RangeConstraintManager: - Added a new prototype ConstraintManager to track ranges of variables! This ConstraintManager keeps tracks of ranges of concrete integers that a symbolic integer may have. AnalysisConsumer: - Add driver option to use RangeConstraintManager with GRExprEngine-based analyses. llvm-svn: 64558
* AnalysisConsumer: Explicitly destroy the PathDiagnosticClient at the end of ↵Ted Kremenek2009-02-131-8/+9
| | | | | | HandleTranslationUnit to ensure that the client's destructor is called even with --disable-free. llvm-svn: 64422
* Overhaul BugReporter interface and implementation. The new interface cleans upTed Kremenek2009-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | the ownership of BugTypes and BugReports. Now BugReports are owned by BugTypes, and BugTypes are owned by the BugReporter object. The major functionality change in this patch is that reports are not immediately emitted by a call to BugReporter::EmitWarning (now called EmitReport), but instead of queued up in report "equivalence classes". When BugReporter::FlushReports() is called, it emits one diagnostic per report equivalence class. This provides a nice cleanup with the caching of reports as well as enables the BugReporter engine to select the "best" path for reporting a path-sensitive bug based on all the locations in the ExplodedGraph that the same bug could occur. Along with this patch, Leaks are now coalesced into a common equivalence class by their allocation site, and the "summary" diagnostic for leaks now reports the allocation site as the location of the bug (this may later be augmented to also provide an example location where the leak occurs). llvm-svn: 63796
* AnalysisConsumer:Ted Kremenek2009-02-021-10/+4
| | | | | | | - Pass "Actions" vector by reference. - Remove guard against checking macro-generated code. llvm-svn: 63546
* Introduce a new PresumedLoc class to represent the concept of a locationChris Lattner2009-01-271-11/+7
| | | | | | | | | | | | | | | | | | | as reported to the user and as manipulated by #line. This is what __FILE__, __INCLUDE_LEVEL__, diagnostics and other things should follow (but not dependency generation!). This patch also includes several cleanups along the way: - SourceLocation now has a dump method, and several other places that did similar things now use it. - I cleaned up some code in AnalysisConsumer, but it should probably be simplified further now that NamedDecl is better. - TextDiagnosticPrinter is now simplified and cleaned up a bit. This patch is a prerequisite for #line, but does not actually provide any #line functionality. llvm-svn: 63098
* Added clang option '--analyzer-display-progress' to indicate that the ↵Ted Kremenek2009-01-231-10/+18
| | | | | | analyzer should output 'ANALYZE:' messages to display its progress on a source file. llvm-svn: 62875
* When using -analyzer-output-plist always output a plist file even if it ↵Ted Kremenek2009-01-231-1/+10
| | | | | | contains no error reports. llvm-svn: 62871
* Add an option to make 'RemoveDeadBindings' a configurable behavior. This enablesZhongxing Xu2008-12-221-3/+12
| | | | | | us to measure the effect of this optimization. llvm-svn: 61319
* Update Driver to new interface for LiveVariables.Ted Kremenek2008-12-091-1/+1
| | | | llvm-svn: 60732
* Add support for pluggable components of static analyzer.Zhongxing Xu2008-11-271-12/+46
| | | | | | | | | | - Creator function pointers are saved in ManagerRegistry. - The Register* class is used to notify ManagerRegistry new module is available. - AnalysisManager queries ManagerRegistry for configurable module. Then it passes them to GRExprEngine, in turn to GRStateManager. llvm-svn: 60143
* Display the function we are analyzing before running LiveVariables.Ted Kremenek2008-11-241-4/+4
| | | | llvm-svn: 59983
* Rename Selector::getName() to Selector::getAsString(), and addChris Lattner2008-11-241-2/+2
| | | | | | | | | | | | | a new NamedDecl::getAsString() method. Change uses of Selector::getName() to just pass in a Selector where possible (e.g. to diagnostics) instead of going through an std::string. This also adds new formatters for objcinstance and objcclass as described in the dox. llvm-svn: 59933
* Output 'ANALYZE' messages to standard error. This should address the ↵Ted Kremenek2008-11-201-2/+2
| | | | | | intermixing of 'ANALYZE' and the other diagnostics the clang driver emits to standard error. llvm-svn: 59730
* [LLVM up] Update for raw_fd_ostream change. This fixes a FIXME thatDaniel Dunbar2008-11-131-1/+1
| | | | | | | | the Backend output should be done in binary mode. - I'd appreciate it if someone who has a Windows build could verify this. llvm-svn: 59221
* Patch by Nikita Zhuk: Add TranslationUnitActions to AnalysisConsumer.Ted Kremenek2008-11-071-0/+12
| | | | llvm-svn: 58831
* AnalysisManager can now be used to for analyses over TranslationUnits.Ted Kremenek2008-11-051-5/+22
| | | | llvm-svn: 58766
* Hook up the Plist diagnostic client to the driver.Ted Kremenek2008-11-031-6/+13
| | | | | | Fix Plist output. llvm-svn: 58652
* Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'Ted Kremenek2008-11-031-1/+1
| | | | llvm-svn: 58646
* Adjust code format.Zhongxing Xu2008-10-301-2/+1
| | | | llvm-svn: 58420
* Make the analyzer store (memory model) a command line option.Ted Kremenek2008-10-241-4/+18
| | | | llvm-svn: 58056
* Change implementation of NSError** coding-style check to be invoked at the ↵Ted Kremenek2008-09-181-5/+0
| | | | | | end of the retain/release analysis. llvm-svn: 56312
* Implemented one of the checks requested in PR 2600:Ted Kremenek2008-09-181-0/+5
| | | | | | | | "Method accepting NSError** argument should have non-void return value to indicate that an error occurred." Test case written, but the header needs to be delta-debugged reduced. Will commit shortly. llvm-svn: 56297
* Output "ANALYZE:" diagnostics to STDOUT instead of STDERR.Ted Kremenek2008-09-041-2/+2
| | | | llvm-svn: 55750
* Add newline to end of file.Daniel Dunbar2008-08-291-1/+1
| | | | llvm-svn: 55525
* Always print out the function we're analyzing.Ted Kremenek2008-08-281-2/+4
| | | | llvm-svn: 55488
* Ubigraph visualization: represent cached nodes with a different style.Ted Kremenek2008-08-281-3/+14
| | | | llvm-svn: 55463
* Automatically execute ubiviz.Ted Kremenek2008-08-281-3/+28
| | | | | | Cleanup ubigraph files when don't drawing the graphs. llvm-svn: 55459
* Ubigraph-rendered ExplodedGraphs now have arrows and are oriented downward.Ted Kremenek2008-08-271-1/+2
| | | | llvm-svn: 55446
* Added Ubigraph visualization for the static analyzer (this is pretty alpha ↵Ted Kremenek2008-08-271-8/+104
| | | | | | quality). llvm-svn: 55442
* Moved HTMLDiagnostics to lib/Driver.Zhongxing Xu2008-08-241-1/+1
| | | | llvm-svn: 55274
* Fix regression when invoking the MissingDealloc analysis: disable this check ↵Ted Kremenek2008-08-041-0/+3
| | | | | | when in -fobjc-gc-only mode. llvm-svn: 54319
* Add prototype implementation of unused ivar check.Ted Kremenek2008-07-231-0/+5
| | | | llvm-svn: 53942
* Moved registration of basic path-sensitive checks from GRSimpleVals.cpp to ↵Ted Kremenek2008-07-221-5/+10
| | | | | | GRExprEngineInternalChecks.cpp. llvm-svn: 53909
* Provide an "Analysis Scope" for Analyses so checks can either be run on code ↵Ted Kremenek2008-07-151-2/+2
| | | | | | declarations (bodies) or Objective-C @implementation blocks. llvm-svn: 53584
* Break off declaration of Analysis enum into Analyses.def. The driver options inTed Kremenek2008-07-141-51/+18
| | | | | | | | | | | | clang.cpp now #include these definitions to create the command line options, and AnalysisConsumer #includes this file to generate the switch statement to create actions. Renamed -check-objc-methodsigs to -warn-objc-methodsigs. The "missing -dealloc" check is now optional: -warn-objc-missing-dealloc llvm-svn: 53575
* Add new check: -check-objc-methodsigs. This check scans methods inTed Kremenek2008-07-111-2/+13
| | | | | | | | | ObjCImplementationDecls and sees if a ancestor class defines a method with the same selector but with a different type signature. Right now it just compares return types, and mainly looks at differences in primitive values. The checking will be expanded in the future. llvm-svn: 53482
* For the -dealloc checker, check the LangOptions to determine whether or not ↵Ted Kremenek2008-07-031-2/+5
| | | | | | the code is compiled with GC. llvm-svn: 53098
* Have BugReporter::getCFG and BugReporter::getLiveVariables returns pointers ↵Ted Kremenek2008-07-031-20/+34
| | | | | | | | instead of references, because they can both fail on functions we cannot construct full CFGs for yet. llvm-svn: 53081
* Added static analysis check to see if a subclass of NSObject implements ↵Ted Kremenek2008-07-031-9/+35
| | | | | | -dealloc, and whether or not that implementation calls [super dealloc]. llvm-svn: 53075
* Unify the code path for the Dead Stores checker to always use the ↵Ted Kremenek2008-07-021-8/+7
| | | | | | BugReporter interface. llvm-svn: 53054
* Refactored some of the BugReporter interface so that data such as the ↵Ted Kremenek2008-07-021-24/+26
| | | | | | | | ASTContext&, PathDiagnosticClient*, can be provided by an external source. Split BugReporter into BugReporter and GRBugReporter so checkers not based on GRExprEngine can still use the BugReporter mechanism. llvm-svn: 53048
* GRExprEngine now expects the LiveVariables information to be provided by its ↵Ted Kremenek2008-07-021-1/+3
| | | | | | | | creator. This allows an optimization in AnalysisConsumer where the same LiveVariables information is used between multiple analyses. llvm-svn: 53046
* Added version of CheckDeadStores that accepts a client-provided ↵Ted Kremenek2008-07-021-1/+2
| | | | | | | | LiveVariables object. Modified the DeadStores logic in AnalysisConsumer.cpp to use the LiveVariables object created by the AnalysisManager. llvm-svn: 53043
OpenPOWER on IntegriCloud