summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CheckObjCInstMethSignature.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek2010-01-251-119/+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
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-15/+15
| | | | llvm-svn: 81346
* Remove 'AnalysisContext::setDecl()', as we the Decl associated with anTed Kremenek2009-08-211-7/+7
| | | | | | | AnalysisContext should never change. Along the way, propagate some constness around. llvm-svn: 79701
* Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris).Steve Naroff2009-07-141-2/+1
| | | | | | I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace. llvm-svn: 75650
* This patch includes a conceptually simple, but very intrusive/pervasive change. Steve Naroff2009-07-101-2/+2
| | | | | | | | | | | | The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. llvm-svn: 75314
* 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
* Eliminate the three SmallVectors in ObjCImplDecl (for instanceDouglas Gregor2009-04-231-4/+4
| | | | | | | | | | | 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
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-091-2/+2
| | | | | | No functionality change (really). llvm-svn: 68726
* More title-casing of bug type names.Ted Kremenek2009-04-021-3/+4
| | | | llvm-svn: 68275
* Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner2008-11-241-3/+3
| | | | | | | | | | | 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
* Rename Selector::getName() to Selector::getAsString(), and addChris Lattner2008-11-241-1/+1
| | | | | | | | | | | | | 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
* Added method "EmitBasicReport" to BugReporter to simplify the emission of ↵Ted Kremenek2008-07-141-10/+2
| | | | | | | | simple bug diagnostics. Refactored error reporting in CheckObjCDealloc and CheckObjCInstMethSignature to use this new bug reporting interface (major code simplification). llvm-svn: 53560
* Tidy up error message.Ted Kremenek2008-07-111-2/+4
| | | | llvm-svn: 53493
* Add new check: -check-objc-methodsigs. This check scans methods inTed Kremenek2008-07-111-0/+125
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
OpenPOWER on IntegriCloud