summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker
Commit message (Collapse)AuthorAgeFilesLines
...
* For CFGAutomaticObjDtor, the type may be reference type, e.g., const A &c = A();Zhongxing Xu2010-11-251-10/+17
| | | | | | Also apply some new coding style. llvm-svn: 120144
* handle CXXFunctionalCastExpr in visitLValue and Environment.Zhongxing Xu2010-11-252-0/+16
| | | | llvm-svn: 120143
* Improve comments.Zhongxing Xu2010-11-251-2/+1
| | | | llvm-svn: 120142
* Add dump method.Zhongxing Xu2010-11-251-0/+4
| | | | llvm-svn: 120141
* When getting CXXThisRegion from CXXMethodDecl, use the qualifiers. This is Zhongxing Xu2010-11-241-1/+7
| | | | | | | | | | | to be consistent with the type of 'this' expr in the method. 此行及以下内容将会被忽略-- M test/Analysis/method-call.cpp M include/clang/Checker/PathSensitive/GRExprEngine.h M lib/Checker/GRCXXExprEngine.cpp llvm-svn: 120094
* Let StackFrameContext represent if the call expr is evaluated as lvalue.Zhongxing Xu2010-11-245-15/+45
| | | | | | This is required for supporting const reference to temporary objects. llvm-svn: 120093
* Use StackFrameContext directly in CallEnter program point. Then we don't needZhongxing Xu2010-11-244-26/+23
| | | | | | to remake the stackframe everytime in GRExprEngine::ProcessCallEnter(). llvm-svn: 120087
* Add an assert() to catch errors using EvalLoad(). Reviewed by kremenek.Zhanyong Wan2010-11-241-1/+2
| | | | llvm-svn: 120073
* Adjust method calls to reflect name changes inTed Kremenek2010-11-2412-110/+117
| | | | | | | | | | ImmutableSet/ImmtuableMap/ImmutableList APIs. Along the way, clean up some method names in the static analyzer so that they are more descriptive and/or start with lowercase letters. llvm-svn: 120071
* Add comments.Zhongxing Xu2010-11-201-1/+2
| | | | llvm-svn: 119900
* Fix a typo in EnvironmentManager::bindExprAndLocation(). Reviewed by kremenek.Zhanyong Wan2010-11-201-1/+2
| | | | llvm-svn: 119899
* Handle CFGAutomaticObjDtor. Zhongxing Xu2010-11-203-1/+38
| | | | llvm-svn: 119897
* Since multiple diagnostics can share one diagnostic client, have the client ↵Argyrios Kyrtzidis2010-11-181-0/+2
| | | | | | | | keeping track of the total number of warnings/errors reported. llvm-svn: 119731
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-181-1/+3
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* Added method for handling CXXOperatorCallExpr differently from CallExpr if ↵Marcin Swiderski2010-11-182-9/+43
| | | | | | | | CXXOperatorCallExpr represents method call. Also fixed returning ExpolodedNodeSet from VisitCXXMethodCallExpr. llvm-svn: 119684
* In EvalArguments allow for evaluation of first argument always as a lvalue. ↵Marcin Swiderski2010-11-171-5/+11
| | | | | | Will be used for CXXOperatorCallExpr that represents method call. llvm-svn: 119567
* Add skeleton for handling various cfg dtors.Zhongxing Xu2010-11-171-0/+32
| | | | llvm-svn: 119491
* do not do post checks. Because at this point we just enter the call.Zhongxing Xu2010-11-171-4/+0
| | | | llvm-svn: 119480
* Remove comments. We are already doing actual method call by inlining it.Zhongxing Xu2010-11-171-3/+0
| | | | llvm-svn: 119477
* Added mapping from 'this' to it's SymbolicRegion in ↵Marcin Swiderski2010-11-171-0/+9
| | | | | | BasicStoreManager::getInitialStore. llvm-svn: 119467
* Add comments.Ted Kremenek2010-11-171-1/+4
| | | | llvm-svn: 119436
* Static analyzer: Catch calls to malloc() withTed Kremenek2010-11-161-3/+54
| | | | | | | | allocation sizes of 0 bytes. Fixes PR 2899. llvm-svn: 119364
* Reverting r119341: doesn't compile, no obvious fix.John McCall2010-11-161-1/+2
| | | | llvm-svn: 119342
* Refactored GRExprEngine::getCXXThisRegion to use CXXMethodDecl::getThisType ↵Marcin Swiderski2010-11-161-2/+1
| | | | | | instead of calculating it by hand. llvm-svn: 119341
* Handle member initializer in C++ ctor. Zhongxing Xu2010-11-163-14/+54
| | | | | | | | | - Add a new Kind of ProgramPoint: PostInitializer. - Still use GRStmtNodeBuilder. But special handling PostInitializer in GRStmtNodeBuilder::GenerateAutoTransition(). - Someday we should clean up the interface of GRStmtNodeBuilder. llvm-svn: 119335
* Basic support for C++ in BasicStore:Marcin Swiderski2010-11-161-6/+11
| | | | | | | - CXXThisRegion treated like VarRegion and ObjCIVarRegion in various places, - Reference treated like pointer in BindDeclInternal. llvm-svn: 119333
* Kill CK_Unknown and flesh out the documentation for the existing CastKinds.John McCall2010-11-161-1/+0
| | | | llvm-svn: 119331
* Add a new expression kind, OpaqueValueExpr, which is useful forJohn McCall2010-11-151-0/+1
| | | | | | | certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow. llvm-svn: 119289
* Adds a README for the Clang static analyzer to document its design and work ↵Zhanyong Wan2010-11-151-0/+117
| | | | | | flow. The contents are taken from email notes by kremenek and xuzhongxing. llvm-svn: 119288
* Relax assertion in SValuator so that we don't crash when analyzing a call ↵Ted Kremenek2010-11-151-1/+12
| | | | | | | | | via a function pointer that casts the return value to something completely different. While we need better reasoning here, we should definately not crash. llvm-svn: 119177
* Assorted work leading towards the elimination of CK_Unknown.John McCall2010-11-151-0/+4
| | | | llvm-svn: 119138
* Add skeleton for handling other kinds of CFGElements.Zhongxing Xu2010-11-152-5/+32
| | | | llvm-svn: 119135
* Add a few more complex-related cast kinds that arise due to arbitraryJohn McCall2010-11-141-1/+6
| | | | | | | | | | implicit conversions; the last batch was specific to promotions. I think this is the full set we need. I do think dividing the cast kinds into floating and integral is probably a good idea. Annotate a *lot* more C casts with useful cast kinds. llvm-svn: 119036
* Introduce five new cast kinds for various conversions into andJohn McCall2010-11-131-0/+5
| | | | | | between complex types. llvm-svn: 118994
* Refine IdempotentOperationChecker::PathWasCompletelyAnalyzed() to also checkTed Kremenek2010-11-131-0/+9
| | | | | | BlockEdges, BlockEntrances, and BlockExits for the target block value. llvm-svn: 118984
* Teach IdempotentOperations::PathWasCompletelyAnalyzed to also consider items ↵Ted Kremenek2010-11-131-1/+31
| | | | | | | | | | remaining in the worklist that could have impacted the evaluation of a block. Fixes <rdar://problem/8663596>. llvm-svn: 118983
* Add GRWorkList::VisitItemsInWorkList() to allow a client to introspect the ↵Ted Kremenek2010-11-131-8/+40
| | | | | | | | | contents of a worklist. This API required changing the BFS worklist to use a deque instead of a queue, but that is better for performance reasons anyway. llvm-svn: 118982
* Introduce a null-to-pointer implicit cast kind.John McCall2010-11-131-0/+1
| | | | llvm-svn: 118966
* Make sure to always check the result ofDouglas Gregor2010-11-122-20/+24
| | | | | | | SourceManager::getPresumedLoc(), so that we don't try to make use of an invalid presumed location. Doing so can cause crashes. llvm-svn: 118885
* RegionStore/BasicStore: do not return UndefinedVal for accesses to concrete ↵Ted Kremenek2010-11-112-8/+12
| | | | | | | | | | addresses; instead return UnknownVal. This leads it up to checkers (e.g., DereferenceChecker) to guard against illegal accesses (e.g., null dereferences). Fixes PR 5272 and <rdar://problem/6839683>. llvm-svn: 118852
* Teach AttrNonNullChecker about transparent unions. Fixes crash reported in ↵Ted Kremenek2010-11-091-0/+22
| | | | | | <rdar://problem/8642434>. llvm-svn: 118473
* Only enable the ObjCAtSyncChecker when the translation unit uses Objective-C.Ted Kremenek2010-11-081-1/+3
| | | | llvm-svn: 118414
* Teach the CStringChecker and PthreadLockChecker about non-identifierDouglas Gregor2010-11-012-2/+8
| | | | | | declaration names, from Jim Goodnow II! llvm-svn: 117970
* Now initializer of C++ record type is visited as block-level expr. Zhongxing Xu2010-11-013-23/+22
| | | | | | | Let the destination of AggExprVisitor be an explicit MemRegion. Reenable the test case. llvm-svn: 117908
* Make Clang static analyzer skip function template definitions. This fixes ↵Zhanyong Wan2010-10-311-2/+4
| | | | | | Clang PR 8426, 8427, & 8433. Reviewed by Ted Kremenek and Doug Gregor. llvm-svn: 117853
* Don't flag idempotent '+' or '-' warnings for pointer arithmetic (typically ↵Ted Kremenek2010-10-291-0/+7
| | | | | | | | false positives). Fixes <rdar://problem/8601243>. llvm-svn: 117635
* Don't warn about unamed bitfield ivars in the ObjCUnusedIvarsChecker. Fixes ↵Ted Kremenek2010-10-281-1/+3
| | | | | | <rdar://problem/8481311>. llvm-svn: 117521
* Fix lazy symbolication bug in RegionStore involving fields of global ↵Ted Kremenek2010-10-261-4/+14
| | | | | | | | | | | variables. When invalidated, the entire globals memory space gets assigned a symbolic value, but that value was not being used for lazy symbolication of fields of globals. This could result in cases where bogus null dereferences were being reported. Fixes PR 8440. llvm-svn: 117336
* Move 'includeGlobals' as a field into ClusterAnalysis.Ted Kremenek2010-10-261-8/+12
| | | | llvm-svn: 117335
* Tweak null dereference checker to give better diagnostics for null ↵Ted Kremenek2010-10-261-19/+47
| | | | | | dereferences resulting from array accesses. llvm-svn: 117334
OpenPOWER on IntegriCloud