summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* Pull VLA size checker into its own files. Zhongxing Xu2009-11-034-97/+141
| | | | | | | | Split it to two checkers, one for undefined size, the other for zero size, so that we don't need to query the size when emitting the bug report. llvm-svn: 85895
* Implement: <rdar://problem/6250216> Warn against using -[NSAutoreleasePool ↵Ted Kremenek2009-11-035-6/+96
| | | | | | release] in GC mode llvm-svn: 85887
* Move 'static inline' functions GetNullarySelector() and GetUnarySelector() ↵Ted Kremenek2009-11-031-14/+0
| | | | | | from CFRefCount.cpp to ASTContext.h. These functions are likely to be generally useful. llvm-svn: 85886
* Pull AttrNonNullChecker into its own files.Zhongxing Xu2009-11-033-90/+103
| | | | llvm-svn: 85883
* Update CMake file.Zhongxing Xu2009-11-031-0/+1
| | | | llvm-svn: 85879
* Rename NSErrorCheck to NSErrorChecker.Ted Kremenek2009-11-032-13/+13
| | | | llvm-svn: 85877
* Update CMake file.Ted Kremenek2009-11-031-0/+1
| | | | llvm-svn: 85876
* Pull UndefinedArgChecker into its own files.Zhongxing Xu2009-11-032-37/+45
| | | | llvm-svn: 85875
* Pull BadCallChecker into its own files.Zhongxing Xu2009-11-032-43/+46
| | | | llvm-svn: 85868
* retain/release checker: CGBitmapContextCreateWithData() returns an owned object.Ted Kremenek2009-11-031-1/+4
| | | | llvm-svn: 85867
* retain/release checker: Add special handling of CGBitmapContextCreateWithData().Ted Kremenek2009-11-031-0/+11
| | | | | Fixes: <rdar://problem/7358899> llvm-svn: 85864
* Remove GRExprEngine::CheckerVisitLocation(). It was only called in one ↵Ted Kremenek2009-11-021-18/+10
| | | | | | place, so we inlined it in to GRExprEngine::EvalLocation(). llvm-svn: 85838
* Update CMake file.Benjamin Kramer2009-10-311-0/+2
| | | | llvm-svn: 85652
* Move CheckDivZero into its own files.Zhongxing Xu2009-10-312-70/+72
| | | | llvm-svn: 85651
* Move UndefDerefChecker into its own file.Zhongxing Xu2009-10-312-50/+55
| | | | llvm-svn: 85645
* fix 80-col.Zhongxing Xu2009-10-311-1/+1
| | | | llvm-svn: 85642
* Tighten computation of ExprVal using ?: expression. No functionality change.Ted Kremenek2009-10-301-5/+1
| | | | llvm-svn: 85618
* Make checkers run in deterministic order.Ted Kremenek2009-10-301-9/+15
| | | | llvm-svn: 85597
* Move NullDerefChecker.h instead a 'Checkers' subdirectory.Ted Kremenek2009-10-303-3/+3
| | | | llvm-svn: 85596
* Move all logic for the null dereference checker from ↵Ted Kremenek2009-10-303-46/+78
| | | | | | GRExprEngineInternalChecks.cpp to a separate .cpp file. llvm-svn: 85595
* Fix PR5316: make assignment expressions can be visited as lvalue. Then we Zhongxing Xu2009-10-301-25/+22
| | | | | | | can get the correct base lvalue. Revert r85578. llvm-svn: 85579
* Handle loading of field values from LazyCompoundVals in ↵Ted Kremenek2009-10-301-6/+19
| | | | | | | | GRExprEngine::VisitMemberExpr(). This fixes the crash reported in PR 5316. llvm-svn: 85578
* Add an assertion to ensure NullDerefChecker exists.Zhongxing Xu2009-10-291-0/+1
| | | | llvm-svn: 85497
* Fix accidental use of CheckSVal instead of CheckLocation, and add aTed Kremenek2009-10-291-2/+2
| | | | | | small test case to show we handle dereferences of undefined values. llvm-svn: 85492
* Fix an insidious bug in RegionStore::RemoveDeadBindings() pointed outTed Kremenek2009-10-291-2/+23
| | | | | | | | by Zhongxing Xu. RemoveDeadBindings() would falsely prune SymbolicRegions from the store that wrapped derived symbols whose liveness could only be determined after scanning the store. llvm-svn: 85484
* Move NullDeref and UndefDeref into their own checker. Zhongxing Xu2009-10-293-129/+137
| | | | | | | | Add a CheckLocation() interface to Checker. Now ImplicitNullDeref nodes are cached in NullDerefChecker. More cleanups follow. llvm-svn: 85471
* [llvm up]Douglas Gregor2009-10-291-62/+25
| | | | | | | Switch a few ugly switch-on-string-literal constructs to use the new llvm::StringSwitch. llvm-svn: 85461
* 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
* make CallGraph more flexible by letting it accept ASTContext instead of ASTUnit.Zhongxing Xu2009-10-281-3/+1
| | | | | | Patch by Simone Pellegrini. llvm-svn: 85386
* 'error' is usually used as a noreturn function. This can suppress some falseZhongxing Xu2009-10-261-11/+4
| | | | | | | warnings. Eventually we need a way to import externally defined functions summaries. llvm-svn: 85092
* Eliminate QualifiedDeclRefExpr, which captured the notion of aDouglas Gregor2009-10-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | qualified reference to a declaration that is not a non-static data member or non-static member function, e.g., namespace N { int i; } int j = N::i; Instead, extend DeclRefExpr to optionally store the qualifier. Most clients won't see or care about the difference (since QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the number of top-level expression types that clients need to cope with, brings the implementation of DeclRefExpr into line with MemberExpr, and simplifies and unifies our handling of declaration references. Extended DeclRefExpr to (optionally) store explicitly-specified template arguments. This occurs when naming a declaration via a template-id (which will be stored in a TemplateIdRefExpr) that, following template argument deduction and (possibly) overload resolution, is replaced with a DeclRefExpr that refers to a template specialization but maintains the template arguments as written. llvm-svn: 84962
* Rename: CheckBadDiv->CheckDivZero.Zhongxing Xu2009-10-221-7/+8
| | | | llvm-svn: 84824
* Simplify some code. No functionality change.Zhongxing Xu2009-10-211-55/+43
| | | | llvm-svn: 84757
* Remove stale comment and tighten code.Ted Kremenek2009-10-201-6/+1
| | | | llvm-svn: 84697
* Use llvm::OwningPtr in CFGBuilder, fixing a leak on an error path.Ted Kremenek2009-10-201-12/+7
| | | | llvm-svn: 84695
* Add destructor and cleanup code to LocationContext (fixing some leaks). ↵Ted Kremenek2009-10-201-0/+21
| | | | | | | | | Along the way, have AnalysisManager periodically cleanup its AnalysisContextManager and LocationContextManager objects, as they don't need to forever retain all the CFGs ever created when analyzing a file. llvm-svn: 84684
* RegionStore: Use the *default* binding (instead of the *direct* binding) of ↵Ted Kremenek2009-10-201-3/+3
| | | | | | | | | | an Objective-C object region when doing lazy value retrieval of an ivar. This fixes: <rdar://problem/7312221> llvm-svn: 84584
* retain/release checker: allow 'new', 'copy', 'alloc', 'init' prefix to start ↵Ted Kremenek2009-10-201-4/+6
| | | | | | | before '_' when determining Cocoa fundamental rule. Fixes: <rdar://problem/7265711> llvm-svn: 84569
* PR5218: Replace IdentifierInfo::getName with StringRef version, now that clientsDaniel Dunbar2009-10-184-4/+4
| | | | | | are updated. llvm-svn: 84447
* Move misc clients to IdentifierInfo StringRef API.Daniel Dunbar2009-10-181-1/+1
| | | | | | | | | - strcmp -> == - OS.write(II->getName() ...) -> OS << II->getNameStr() - Avoid std::string concatenation - Use getNameStr().str() when an std::string is really needed. llvm-svn: 84437
* Move clients to use IdentifierInfo::getNameStart() instead of getName()Daniel Dunbar2009-10-183-7/+6
| | | | llvm-svn: 84436
* use DenseSet instead of SmallSet.Zhongxing Xu2009-10-181-2/+2
| | | | llvm-svn: 84398
* Simplify more.Daniel Dunbar2009-10-171-9/+5
| | | | llvm-svn: 84342
* Simplify.Daniel Dunbar2009-10-171-25/+4
| | | | llvm-svn: 84341
* Use raw_ostream instead of C stdio.Daniel Dunbar2009-10-171-9/+6
| | | | llvm-svn: 84340
* Simplify.Daniel Dunbar2009-10-171-15/+5
| | | | llvm-svn: 84338
* Minor cleanup: move typedef out of anonymous namespace (which now contains ↵Ted Kremenek2009-10-171-4/+2
| | | | | | nothing) and into RemoveDeadBindings. No functionality change. llvm-svn: 84335
* Per discussion with Ted, the 'FromSuper'/'FromSub' logic is invalid. SimplifyZhongxing Xu2009-10-171-72/+33
| | | | | | | the code to standard worklist algorithm. Always add both sub and super regions of live regions. llvm-svn: 84323
* Fix another static analyzer crash due to a corner case in "folding" symbolic ↵Ted Kremenek2009-10-171-11/+16
| | | | | | values that are constrained to be a constant. llvm-svn: 84320
OpenPOWER on IntegriCloud