summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> ↵Argyrios Kyrtzidis2010-12-2286-31048/+0
| | | | | | libclangGRCore llvm-svn: 122421
* [analyzer] Refactoring: include/clang/Checker -> include/clang/GRArgyrios Kyrtzidis2010-12-2280-220/+220
| | | | llvm-svn: 122420
* If the unary operator is prefix and an lvalue (in C++), bindZhongxing Xu2010-12-221-5/+10
| | | | | | the location (l-value) to it. llvm-svn: 122396
* The base type is not always pointer type. We may cast to a base reference.Zhongxing Xu2010-12-221-2/+8
| | | | llvm-svn: 122393
* Always blast through no-op casts when getting expr SVals.Zhongxing Xu2010-12-221-6/+1
| | | | llvm-svn: 122390
* After inlining the CXXConstructExpr, bind the temporary object region to it.Zhongxing Xu2010-12-222-11/+22
| | | | | | | | | | | This change is necessary when the variable is a const reference and we need the l-value of the construct expr. After that, when binding the variable, recover the lazy compound value when the variable is not a reference. In Environment, use the value of a no-op cast expression when it has one. Otherwise, blast-through it. llvm-svn: 122388
* Rename 'VisitLocation' to 'visitLocation'.Ted Kremenek2010-12-204-13/+9
| | | | llvm-svn: 122271
* Rename 'Generate[Node,Sink]' to 'generate[Node,Sink]'.Ted Kremenek2010-12-2033-74/+74
| | | | llvm-svn: 122270
* If the initializer is an rvalue and the variable is a const reference,Zhongxing Xu2010-12-191-3/+6
| | | | | | create a temporary object for it. llvm-svn: 122161
* The evaluation of dereference and address-of is identical.Zhongxing Xu2010-12-181-14/+1
| | | | llvm-svn: 122146
* Replace all uses of PathV1::get{Basename,Dirname,Suffix} with their PathV2 ↵Michael J. Spencer2010-12-181-2/+2
| | | | | | equivalents. llvm-svn: 122140
* Replace all uses of PathV1::getLast with PathV2::filename.Michael J. Spencer2010-12-181-1/+1
| | | | llvm-svn: 122117
* Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.Michael J. Spencer2010-12-171-1/+1
| | | | llvm-svn: 122087
* Remove explicit summaries from retain/releaseTed Kremenek2010-12-171-26/+0
| | | | | | | checker that are automatically handled now by the Cocoa conventions logic. llvm-svn: 122047
* Move CocoaConventions.[h,cpp] from libCheckerTed Kremenek2010-12-173-174/+1
| | | | | | | | | to libAnalysis. Similar to Format (format string checking), CocoaConventions has the potential to serve clients other than the static analyzer. llvm-svn: 122040
* Revise Cocoa conventions detection: 'copy' and 'mutableCopy'Ted Kremenek2010-12-171-54/+30
| | | | | | | | only indicates the create rule if it starts at the beginning of the method name, not within the method name. llvm-svn: 122036
* Rename several methods/functions in the analyzerTed Kremenek2010-12-171-12/+12
| | | | | | | to start with lowercase characters. No functionality change. llvm-svn: 122035
* Start migration of static analyzer to using theTed Kremenek2010-12-167-458/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit lvalue-to-rvalue casts that John McCall recently introduced. This causes a whole bunch of logic in the analyzer for handling lvalues to vanish. It does, however, raise a few issues in the analyzer w.r.t to modeling various constructs (e.g., field accesses to compound literals). The .c/.m analysis test cases that fail are due to a missing lvalue-to-rvalue cast that will get introduced into the AST. The .cpp failures were more than I could investigate in one go, and the patch was already getting huge. I have XFAILED some of these tests, and they should obviously be further investigated. Some highlights of this patch include: - CFG no longer requires an lvalue bit for CFGElements - StackFrameContext doesn't need an 'asLValue' flag - The "VisitLValue" path from GRExprEngine has been eliminated. Besides the test case failures (XFAILed), there are surely other bugs that are fallout from this change. llvm-svn: 121960
* Added missing IgnoreParens().Abramo Bagnara2010-12-141-6/+12
| | | | llvm-svn: 121795
* It's kindof silly that ExtQuals has an ASTContext&, and we can use thatJohn McCall2010-12-103-5/+5
| | | | | | | | | | space better. Remove this reference. To make that work, change some APIs (most importantly, getDesugaredType()) to take an ASTContext& if they need to return a QualType. Simultaneously, diminish the need to return a QualType by introducing some useful APIs on SplitQualType, which is just a std::pair<const Type *, Qualifiers>. llvm-svn: 121478
* Remove the TypesCompatibleExprClass AST node. Merge its functionality into ↵Francois Pichet2010-12-082-2/+1
| | | | | | BinaryTypeTraitExpr. llvm-svn: 121298
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-072-6/+6
| | | | | | | | zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121121
* Type traits intrinsic implementation: __is_base_of(T, U)Francois Pichet2010-12-071-0/+1
| | | | | | New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics. llvm-svn: 121074
* Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoreticalJohn McCall2010-12-064-7/+7
| | | | | | reason this is limited to C++, and it's certainly not limited to temporaries. llvm-svn: 120996
* Mark SVal constructors 'explicit'.Ted Kremenek2010-12-051-1/+1
| | | | llvm-svn: 120970
* Rename Environment::LookupExpr() toTed Kremenek2010-12-051-1/+10
| | | | | | | Environment::lookupExpr() and move its implementation out-of-line. llvm-svn: 120969
* More anonymous struct/union redesign. This one deals with anonymous field ↵Francois Pichet2010-12-041-2/+2
| | | | | | | | | | | | | | | | used in a constructor initializer list: struct X { X() : au_i1(123) {} union { int au_i1; float au_f1; }; }; clang will now deal with au_i1 explicitly as an IndirectFieldDecl. llvm-svn: 120900
* Although we currently have explicit lvalue-to-rvalue conversions, they'reJohn McCall2010-12-045-11/+18
| | | | | | | | | | | | | | | | | | | not actually frequently used, because ImpCastExprToType only creates a node if the types differ. So explicitly create an ICE in the lvalue-to-rvalue conversion code in DefaultFunctionArrayLvalueConversion() as well as several other new places, and consistently deal with the consequences throughout the compiler. In addition, introduce a new cast kind for loading an ObjCProperty l-value, and make sure we emit those nodes whenever an ObjCProperty l-value appears that's not on the LHS of an assignment operator. This breaks a couple of rewriter tests, which I've x-failed until future development occurs on the rewriter. Ted Kremenek kindly contributed the analyzer workarounds in this patch. llvm-svn: 120890
* Minor refactoring; have BugReport::getRanges return a pair of iterator, no ↵Argyrios Kyrtzidis2010-12-042-13/+13
| | | | | | functionality change. llvm-svn: 120873
* Fix an insidious bug in BugReporter whereTed Kremenek2010-12-031-54/+54
| | | | | | | | | a node in the trimmed graph might not always correctly map back to the original error node. This could cause a crash in some cases when flagging memory leaks. llvm-svn: 120795
* Also include the pointer address of the ExplodedNodeTed Kremenek2010-12-031-3/+2
| | | | | | when generating DOT output for an ExplodedGraph. llvm-svn: 120794
* Also show notes about the taken path in TextPathDiagnostics.Argyrios Kyrtzidis2010-12-031-7/+4
| | | | llvm-svn: 120783
* Remove leftover code and use the text path diagnostic client even without a ↵Argyrios Kyrtzidis2010-12-032-9/+5
| | | | | | | | specified output file since it just uses diagnostic notes. llvm-svn: 120773
* Introduce TextPathDiagnostics, a simple PathDiagnosticClient that outputs as ↵Argyrios Kyrtzidis2010-12-032-0/+81
| | | | | | | | diagnostic notes the sequence of events; useful for testing. llvm-svn: 120770
* Handle any number of SourceRanges inside BugReporter::FlushReport.Argyrios Kyrtzidis2010-12-031-6/+4
| | | | llvm-svn: 120769
* Rename Create[*]DiagnosticClient -> create[*]DiagnosticClient.Argyrios Kyrtzidis2010-12-033-5/+5
| | | | llvm-svn: 120768
* Merge ValueManager into SValBuilder.Ted Kremenek2010-12-0226-668/+601
| | | | llvm-svn: 120696
* Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ↵John McCall2010-12-022-10/+2
| | | | | | | | ObjCPropertyRefExpr into the latter. llvm-svn: 120643
* Rename all 'AssumeXXX' methods in libCheckerTed Kremenek2010-12-0123-127/+128
| | | | | | to 'assumeXXX'. llvm-svn: 120614
* Rename all 'EvalXXX' methods in libChecker toTed Kremenek2010-12-0123-283/+283
| | | | | | 'evalXXX'. llvm-svn: 120609
* Rename 'SValuator' to 'SValBuilder'. The new nameTed Kremenek2010-12-0118-74/+74
| | | | | | reflects what the class actually does. llvm-svn: 120605
* Restore the lvalue-to-rvalue conversion patch with a minimal fix.John McCall2010-12-011-0/+1
| | | | llvm-svn: 120555
* L-value to r-value conversion is not ready for prime-time.John McCall2010-11-301-1/+0
| | | | llvm-svn: 120433
* Introduce an r-value to l-value cast kind. I'm not promising anythingJohn McCall2010-11-301-0/+1
| | | | | | about the reliability of this yet. llvm-svn: 120422
* Merge System into Support.Michael J. Spencer2010-11-292-3/+3
| | | | llvm-svn: 120297
* Do not use StripCasts() in this context.Zhongxing Xu2010-11-261-2/+5
| | | | llvm-svn: 120178
* Should not use StripCasts() in this context.Zhongxing Xu2010-11-261-7/+4
| | | | llvm-svn: 120177
* Rename CXXObjectRegion to CXXTempObjectRegion.Zhongxing Xu2010-11-265-16/+17
| | | | llvm-svn: 120176
* Regionstore: support derived-to-base cast by creating a CXXBaseObjectRegion.Zhongxing Xu2010-11-263-3/+52
| | | | llvm-svn: 120173
* Add a fixme.Zhongxing Xu2010-11-261-0/+1
| | | | llvm-svn: 120172
OpenPOWER on IntegriCloud