summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker
Commit message (Collapse)AuthorAgeFilesLines
* For 'open' check in UnixAPIChecker, hard code value of 'O_CREAT' on Darwin.Ted Kremenek2010-04-081-18/+34
| | | | | | | This is still not an ideal solution, but should disable the check for other targets where the value of O_CREAT is different. llvm-svn: 100818
* Temporarily only enable 'open' check on Mac OS X to unbreak Windows ↵Ted Kremenek2010-04-081-0/+7
| | | | | | | | buildbot. I'm looking into an alternate fix right now. llvm-svn: 100816
* Add static analyzer check for calls to 'pthread_once()' where the ↵Ted Kremenek2010-04-081-0/+45
| | | | | | | | control-flow has automatic storage. This matches the corresponding check for 'dispatch_once()'. llvm-svn: 100803
* Fix crash in StoreManager::CastRegion() when the base region is a type with ↵Ted Kremenek2010-04-071-7/+8
| | | | | | 0 size. llvm-svn: 100594
* Teach MemRegion::getBaseRegion() about ObjCIvarRegions. We want to treatTed Kremenek2010-04-061-7/+8
| | | | | | | them the same way as fields. This fixes a regression in RegionStore::RemoveDeadbindings() that emerged from going to the cluster-based analysis. llvm-svn: 100570
* Fix PR 6725. It looks like the copy constructor gets elided during inlining.Zhongxing Xu2010-04-061-1/+1
| | | | | | This bug only shows up with GCC 4.4.1 Release-Asserts build. llvm-svn: 100516
* Always assume block-level expressions in the caller are alive when analyzingZhongxing Xu2010-04-051-2/+29
| | | | | | the callee. llvm-svn: 100429
* Since now we process regions in clusters when removing dead bindings, thisZhongxing Xu2010-04-051-8/+0
| | | | | | code can be removed. llvm-svn: 100428
* Use the element type to compute the array size when the base region is a ↵Zhongxing Xu2010-04-011-3/+6
| | | | | | | | VarRegion. Patch by Jordy Rose. llvm-svn: 100099
* Initial support for visiting CXXMemberCallExpr.Zhongxing Xu2010-04-011-5/+88
| | | | llvm-svn: 100098
* Improve C++ constructor handling.Zhongxing Xu2010-04-012-2/+5
| | | | llvm-svn: 100080
* Fix a bug (PR 6699) in RegionStore::RemoveDeadBindings() whereTed Kremenek2010-04-011-32/+31
| | | | | | array values with a non-zero offset would get prematurely pruned from the store. llvm-svn: 100067
* Reinstate my CodeModificationHint -> FixItHint renaming patch, withoutDouglas Gregor2010-03-311-2/+2
| | | | | | the C-only "optimization". llvm-svn: 100022
* Revert r100008, which inexplicably breaks the clang-i686-darwin10 builderDouglas Gregor2010-03-311-2/+2
| | | | llvm-svn: 100018
* Rename CodeModificationHint to FixItHint, since we've been using theDouglas Gregor2010-03-311-2/+2
| | | | | | | term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008
* Introduce a new kind of derived-to-base cast which bypasses the need forJohn McCall2010-03-301-0/+1
| | | | | | | null checks, and make sure we elide null checks when accessing base class members. llvm-svn: 99963
* RegionStore: specially handle loads from integer global variables declared ↵Ted Kremenek2010-03-301-1/+16
| | | | | | | | 'const'. Fixes a false positive reported in PR 6288. llvm-svn: 99922
* Use 'const Optional<SVal>&' to avoid an extra copy.Ted Kremenek2010-03-301-8/+8
| | | | llvm-svn: 99921
* the big refactoring bits of PR3782.Rafael Espindola2010-03-301-1/+1
| | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. llvm-svn: 99920
* Change the analyzer to recognize (but ignore) assignments to isa. Fixes PR ↵Ted Kremenek2010-03-301-0/+5
| | | | | | 6302. llvm-svn: 99904
* Be a bit more consistent in using operator->Rafael Espindola2010-03-291-1/+1
| | | | | | | This patch moves some methods from QualType to Type and changes the users to use -> instead of . llvm-svn: 99805
* Checker: random include cleanup.Benjamin Kramer2010-03-2732-43/+49
| | | | llvm-svn: 99731
* Fix NoReturnFunctionChecker to properly look at a function's typeTed Kremenek2010-03-261-41/+41
| | | | | | when determining if it returns. Fixes <rdar://problem/7796563>. llvm-svn: 99663
* Add methods to remove a GDM entry.Zhongxing Xu2010-03-252-1/+13
| | | | | | Instead of setting the ReturnExpr GDM to NULL, remove it. llvm-svn: 99470
* Use llvm::SmallString instead of std::string.Ted Kremenek2010-03-241-20/+15
| | | | llvm-svn: 99442
* Improve static analyzer diagnostic concerning the use of 'mktemp'Ted Kremenek2010-03-241-3/+2
| | | | llvm-svn: 99441
* Bind the constructed object value to CXXConstructExpr.Zhongxing Xu2010-03-232-7/+24
| | | | llvm-svn: 99271
* update CMakeLists.txtZhongxing Xu2010-03-231-0/+1
| | | | llvm-svn: 99269
* Clear the return expr GDM after using it.Zhongxing Xu2010-03-231-1/+4
| | | | llvm-svn: 99268
* Add a AggExprVisitor class. It contains lots of boilerZhongxing Xu2010-03-232-0/+58
| | | | | | plate code for evaluating expressions of C++ class type. llvm-svn: 99267
* merge line.Zhongxing Xu2010-03-231-4/+1
| | | | llvm-svn: 99259
* Since we now may have basicblocks with the same block is in different function,Zhongxing Xu2010-03-233-12/+46
| | | | | | | change the block counter map from unsigned -> unsigned to <StackFrameContext*, unsigned> -> unsigned. llvm-svn: 99255
* Tweak null dereference diagnostics to give clearer diagnostics whenTed Kremenek2010-03-231-17/+38
| | | | | | a null dereference results from a field access. llvm-svn: 99236
* Improve the diagnostics for the UndefinedAssignmentChecker when anTed Kremenek2010-03-221-11/+27
| | | | | | uninitialized value is used in the LHS of a compound assignment. llvm-svn: 99221
* Sort calls to add_clang_library()Kovarththanan Rajaratnam2010-03-221-8/+8
| | | | llvm-svn: 99191
* Delete the new visitor if an old one already exists.Ted Kremenek2010-03-211-1/+3
| | | | llvm-svn: 99114
* Reapply r99024 (but with the memory issue now fixed).Ted Kremenek2010-03-202-0/+51
| | | | llvm-svn: 99064
* Check if a BugReporterVisitor has already been added to a BugReporterContext.Ted Kremenek2010-03-202-2/+31
| | | | | | This avoids redundant diagnostics. llvm-svn: 99063
* Revert r99024, "Augment path diagnostics to include displaying when a messageDaniel Dunbar2010-03-202-49/+4
| | | | | | expression", statistical evidence indicates it has some kind of memory error. llvm-svn: 99040
* Augment path diagnostics to include displaying when a message expressionTed Kremenek2010-03-202-4/+49
| | | | | | is not evaluated because the receiver is nil. llvm-svn: 99024
* Refactor argument checking in CallAndMessageChecker to be the sameTed Kremenek2010-03-181-119/+123
| | | | | | for both CallExprs and ObjCMessageExprs. llvm-svn: 98800
* Detect pass-by-value arguments that are structs that containTed Kremenek2010-03-181-24/+113
| | | | | | uninitialized data. llvm-svn: 98796
* Tweak dead stores checker to not emit a warning when initializationTed Kremenek2010-03-181-8/+17
| | | | | | | | a scalar variable with a scalar parameter. This is a form of defensive programming. If the variable is unused, it will be caused by -Wunused-variable. llvm-svn: 98795
* Mark CXXThisRegion in the current or parent stack frame context as live so thatZhongxing Xu2010-03-175-8/+30
| | | | | | their bindings are not removed. llvm-svn: 98705
* Add VisitCXXContructExpr logic to the analyzer. This still has not fully workedZhongxing Xu2010-03-162-11/+102
| | | | | | since RemoveDeadBinding mistakenly remove the binding to CXXThisRegion. llvm-svn: 98629
* Allow users to set CPPFLAGS and CXXFLAGS on the make command line.Jeffrey Yasskin2010-03-121-1/+1
| | | | | Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test) llvm-svn: 98399
* Simplify assertion.Ted Kremenek2010-03-101-5/+1
| | | | llvm-svn: 98176
* Remove '#if 0' code. Lazy compound values have proven their worth.Ted Kremenek2010-03-101-39/+0
| | | | llvm-svn: 98175
* Remove the subregion map cache. It is no longer used.Ted Kremenek2010-03-101-8/+0
| | | | llvm-svn: 98161
* Fix stale comment.Ted Kremenek2010-03-101-1/+1
| | | | llvm-svn: 98160
OpenPOWER on IntegriCloud