- Apr 17, 2010
-
-
Benjamin Kramer authored
Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. llvm-svn: 101632
-
- Mar 27, 2010
-
-
Benjamin Kramer authored
llvm-svn: 99731
-
- Feb 08, 2010
-
-
Ted Kremenek authored
llvm-svn: 95545
-
Zhongxing Xu authored
GRState::getSVal(MemRegion*) => Load(). llvm-svn: 95541
-
- Jan 26, 2010
-
-
Ted Kremenek authored
llvm-svn: 94609
-
Ted Kremenek authored
llvm-svn: 94608
-
- Jan 25, 2010
-
-
Ted Kremenek authored
llvm-svn: 94428
-
Ted Kremenek authored
(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
-
- Nov 29, 2009
-
-
Benjamin Kramer authored
llvm-svn: 90086
-
Benjamin Kramer authored
llvm-svn: 90084
-
- Nov 28, 2009
-
-
Kovarththanan Rajaratnam authored
llvm-svn: 90028
-
- Nov 24, 2009
-
-
Ted Kremenek authored
Enhance null dereference diagnostics by indicating what variable (if any) was dereferenced. Addresses <rdar://problem/7039161>. llvm-svn: 89726
-
- Nov 11, 2009
-
-
Ted Kremenek authored
the old builder API. This percolated a bunch of changes up to the Checker class (where CheckLocation has been renamed VisitLocation) and GRExprEngine. ProgramPoint now has the notion of a "LocationCheck" point (with PreLoad and PreStore respectively), and a bunch of the old ProgramPoints that are no longer used have been removed. llvm-svn: 86798
-
- Nov 03, 2009
-
-
Ted Kremenek authored
Merge NullDerefChecker.[h,cpp] and UndefDerefChecker.[h,cpp]. They are essentially two parts of the same check. llvm-svn: 85911
-
Ted Kremenek authored
llvm-svn: 85877
-
- Oct 30, 2009
-
-
Ted Kremenek authored
llvm-svn: 85596
-
- Oct 29, 2009
-
-
Zhongxing Xu authored
llvm-svn: 85497
-
Zhongxing Xu authored
Add a CheckLocation() interface to Checker. Now ImplicitNullDeref nodes are cached in NullDerefChecker. More cleanups follow. llvm-svn: 85471
-
- Sep 22, 2009
-
-
John McCall authored
Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
-
- Sep 09, 2009
-
-
Mike Stump authored
llvm-svn: 81346
-
- Sep 01, 2009
-
-
Ted Kremenek authored
llvm-svn: 80644
-
- Aug 22, 2009
-
-
Ted Kremenek authored
llvm-svn: 79680
-
- Aug 21, 2009
-
-
Zhongxing Xu authored
to untie the ExplodedGraph from a specific Decl. llvm-svn: 79588
-
- Aug 06, 2009
-
-
Zhongxing Xu authored
Some Builders need further cleanup. llvm-svn: 78301
-
-
- Jul 29, 2009
-
-
Ted Kremenek authored
Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. llvm-svn: 77510
-
- Jul 17, 2009
-
-
Ted Kremenek authored
until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. llvm-svn: 76193
-
- Jul 16, 2009
-
-
Ted Kremenek authored
This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
-
- Jul 11, 2009
-
-
Steve Naroff authored
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
-
- Jun 18, 2009
-
-
Ted Kremenek authored
llvm-svn: 73648
-
- Mar 30, 2009
-
-
Ted Kremenek authored
llvm-svn: 68052
-
- Feb 05, 2009
-
-
Ted Kremenek authored
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
-
- Nov 24, 2008
-
-
Chris Lattner authored
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
-
- Oct 17, 2008
-
-
Ted Kremenek authored
- Added new region "SymbolicRegion", which maps symbol values to the region domain. - Enhanced BasicStore::getFieldLValue() to return a FieldRegion (using SymbolicRegion) - Added some utility methods to GRState for fetch svals from the store. - Fixed regression in CheckNSError (we weren't getting the value bound to the parameter) llvm-svn: 57717
-
Zhongxing Xu authored
RVal => SVal LVal => Loc NonLVal => NonLoc lval => loc nonlval => nonloc llvm-svn: 57671
-
Ted Kremenek authored
Remove GRExprEngine::getLVal and RValues::MakeVal. Enhance StoreManager "GetLValue" methods to dispatch for specific kinds of lvalue queries, as opposed to interogating the expression tree (GRExprEngine already does this). Added FIXMEs. In particular, we no longer "assume" that a base pointer in a field/array access is null (this logic was removed). Perhaps we should do this when fetching the lvalue for fields and array elements? llvm-svn: 57657
-
- Oct 04, 2008
-
-
Ted Kremenek authored
This is a big patch, but the functionality change is small and the rest of the patch consists of deltas due to API changes. This patch overhauls the "memory region" abstraction that was prototyped (but never really used) as part of the Store.h. This patch adds MemRegion.h and MemRegion.cpp, which defines the class MemRegion and its subclasses. This classes serve to define an abstract representation of memory, with regions being layered on other regions to to capture the relationships between fields and variables, variables and the address space they are allocated in, and so on. The main motivation of this patch is that key parts of the analyzer assumed that all value bindings were to VarDecls. In the future this won't be the case, and this patch removes lval::DeclVal and replaces it with lval::MemRegionVal. Now all pieces of the analyzer must reason about abstract memory blocks instead of just variables. There should be no functionality change from this patch, but it opens the door for significant improvements to the analyzer such as field-sensitivity and object-sensitivity, both which were on hold until the memory abstraction got generalized. The memory region abstraction also allows type-information to literally be affixed to a memory region. This will allow the some now redundant logic to be removed from the retain/release checker. llvm-svn: 57042
-
- Oct 02, 2008
-
-
Ted Kremenek authored
Expand checking to include functions, not just methods. llvm-svn: 56938
-
- Sep 21, 2008
-
-
Ted Kremenek authored
llvm-svn: 56394
-
- Sep 19, 2008
-
-
Ted Kremenek authored
llvm-svn: 56319
-