summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CheckObjCUnusedIVars.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek2010-01-251-162/+0
| | | | | | | | | | | | | | | | | | | | | | | | | (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
* Port BugReporter and BugType to StringRef.Benjamin Kramer2009-11-291-1/+1
| | | | llvm-svn: 90086
* Cleanup includes and forward decls.Benjamin Kramer2009-11-281-0/+1
| | | | llvm-svn: 90034
* Unused ivar checker: ivars referenced by lexically nested functions should ↵Ted Kremenek2009-11-201-1/+32
| | | | | | not be flagged as unused. Fixes <rdar://problem/7254495>. llvm-svn: 89448
* Unused ivars checker: also check methods in categories that are defined in ↵Ted Kremenek2009-10-281-0/+8
| | | | | | the same translation unit. Fixes <rdar://problem/6260004>. llvm-svn: 85442
* Pull ivar scanning logic into another utility function. This refactoring ↵Ted Kremenek2009-10-281-10/+17
| | | | | | | | will enable scanning categories as well (WIP). No functionality change yet. llvm-svn: 85423
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-12/+12
| | | | llvm-svn: 81346
* Remove 'AnalysisContext::setDecl()', as we the Decl associated with anTed Kremenek2009-08-211-1/+2
| | | | | | | AnalysisContext should never change. Along the way, propagate some constness around. llvm-svn: 79701
* Fix: <rdar://problem/7075531> static analyzer wrongly detects unused ivars ↵Ted Kremenek2009-08-071-2/+8
| | | | | | used in blocks llvm-svn: 78409
* Constify some pointers. No functionality change.Ted Kremenek2009-08-071-15/+16
| | | | llvm-svn: 78407
* remove dead code.Zhongxing Xu2009-06-301-3/+0
| | | | llvm-svn: 74517
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-301-4/+4
| | | | | | | Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
* Remove the ASTContext parameter from the getBody() methods of Decl and ↵Argyrios Kyrtzidis2009-06-301-1/+1
| | | | | | | | subclasses. Timings showed no significant difference before and after the commit. llvm-svn: 74504
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-301-1/+1
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
* Remove uses of std::ostream from libAnalysis.Ted Kremenek2009-06-241-3/+2
| | | | llvm-svn: 74136
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-181-1/+1
| | | | llvm-svn: 73702
* Eliminate the three SmallVectors in ObjCImplDecl (for instanceDouglas Gregor2009-04-231-6/+7
| | | | | | | | | | | methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). llvm-svn: 69849
* FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor2009-04-181-1/+1
| | | | | | | | lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
* More title-casing of bug type names.Ted Kremenek2009-04-021-1/+1
| | | | llvm-svn: 68275
* Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner2008-11-241-2/+2
| | | | | | | | | | | uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. llvm-svn: 59947
* The "unused ivar" check now has a category: "Optimization"Ted Kremenek2008-09-211-1/+1
| | | | llvm-svn: 56402
* Have the UnusedIvar check skip ivars with setters/getters created by ↵Ted Kremenek2008-07-251-4/+26
| | | | | | @synthesize. llvm-svn: 54050
* Properly skip IBOutlets when checking for unused ivars.Ted Kremenek2008-07-231-4/+6
| | | | | | | Refine the error message of unused ivars. Added test case. llvm-svn: 53957
* Ivar access mode ObjCIvarDecl::None == ObjCIvarDecl::Protected, not private.Ted Kremenek2008-07-231-2/+1
| | | | llvm-svn: 53953
* Add prototype implementation of unused ivar check.Ted Kremenek2008-07-231-0/+87
llvm-svn: 53942
OpenPOWER on IntegriCloud