summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* More complex float evaluator support.Anders Carlsson2008-11-161-0/+45
| | | | llvm-svn: 59428
* rename Expr::tryEvaluate to Expr::Evaluate.Chris Lattner2008-11-166-15/+15
| | | | llvm-svn: 59426
* Add very limited support for evaluating complex floats.Anders Carlsson2008-11-161-1/+46
| | | | llvm-svn: 59425
* Trivial tidyingChris Lattner2008-11-161-2/+0
| | | | llvm-svn: 59424
* fix folding of comma if given a non-constant operand.Nuno Lopes2008-11-161-3/+4
| | | | | | Eli please take a look, as I'm not sure if this gets the extension warning in the right place llvm-svn: 59422
* make IntExprEvaluator fold the ?: operatorNuno Lopes2008-11-161-0/+9
| | | | llvm-svn: 59421
* More work on the constant evaluator. Eli, it would be great if you could ↵Anders Carlsson2008-11-161-1/+65
| | | | | | have a look at this. llvm-svn: 59420
* Fix PR3077: tokens that come from macro expansions whose macro wasChris Lattner2008-11-161-1/+1
| | | | | | | defined in a system header should be treated as system header tokens even if they are instantiated in a different place. llvm-svn: 59418
* add dump and print methods, add operator<< for APValue.Chris Lattner2008-11-161-0/+97
| | | | llvm-svn: 59411
* Add the ability to evaluate comparison operators with floating point numbers ↵Anders Carlsson2008-11-161-2/+45
| | | | | | as operands. llvm-svn: 59408
* Enhance modularization: return a <state,loc> pair to let GRExprEngine modify theZhongxing Xu2008-11-163-15/+17
| | | | | | environment. llvm-svn: 59407
* More constant expr work.Anders Carlsson2008-11-161-6/+18
| | | | llvm-svn: 59405
* daniel prefers completed thoughts.Chris Lattner2008-11-161-1/+1
| | | | llvm-svn: 59404
* Enhances SCA to process untyped region to typed region conversion.Zhongxing Xu2008-11-164-2/+113
| | | | | | | | | | | | - RegionView and RegionViewMap is introduced to assist back-mapping from super region to subregions. - GDM is used to carry RegionView information. - AnonTypedRegion is added to represent a typed region introduced by pointer casting. Later AnonTypedRegion can be used in other similar cases, e.g., malloc()'ed region. - The specific conversion is delegated to store manager. llvm-svn: 59382
* Start implementing support for @synchonized with the darwin ObjC API.Chris Lattner2008-11-156-2/+134
| | | | | | Patch by Fariborz! llvm-svn: 59377
* Check in code that uses tryEvaluate for emitting constant exprs (not used yet).Anders Carlsson2008-11-151-0/+29
| | | | llvm-svn: 59375
* Handle padding in the constant CFString struct. Fixes PR3046.Anders Carlsson2008-11-151-8/+46
| | | | llvm-svn: 59372
* Use IgnoreParenCasts. No functionality change.Anders Carlsson2008-11-151-10/+1
| | | | llvm-svn: 59371
* Use the allocator of ExplodedGraph. The whole static analysis module uses it.Zhongxing Xu2008-11-151-1/+4
| | | | llvm-svn: 59359
* Fix silly bug spotted by Daniel DunbarAnders Carlsson2008-11-151-1/+1
| | | | llvm-svn: 59358
* Improve zero value generation.Zhongxing Xu2008-11-151-2/+1
| | | | llvm-svn: 59356
* Reduce permissiveness of assertion.Ted Kremenek2008-11-151-2/+1
| | | | llvm-svn: 59354
* Reverted part of r59335: ↵Ted Kremenek2008-11-151-23/+37
| | | | | | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20081110/009243.html In that patch I added a bogus type promotion for unary '!'. The real bug was more fallout from edges cases with compound assignments and conjured symbolic values. Now the conjured value has the type of the LHS expression, and we do a promotion to the computation type. We also now correctly do a conversion from the computation type back to the LHS type. llvm-svn: 59349
* Re-enable an assertion that I mistakenly removed.Ted Kremenek2008-11-151-7/+1
| | | | llvm-svn: 59348
* Handle complex return values.Anders Carlsson2008-11-151-1/+6
| | | | llvm-svn: 59345
* Use the correct QualType when creating the '0' constant.Ted Kremenek2008-11-151-1/+1
| | | | llvm-svn: 59343
* Implement FIXME in GRExprEngine::VisitUnaryOperator() to handle implicit ↵Ted Kremenek2008-11-154-16/+54
| | | | | | conversions caused by the '!' operator. This required adding some logic to GRSimpleVals to reason about nonloc::LocAsInteger SVals. This code appears to work fine, but it should eventually be cleaned up. llvm-svn: 59335
* Flush llvm::errs() when printing out SVals.Ted Kremenek2008-11-151-1/+1
| | | | llvm-svn: 59334
* Implement parsing and semantic checking of the 'mutable' keyword.Sebastian Redl2008-11-144-8/+50
| | | | | | Thanks to Doug for the review. Actual effects of mutable to follow. llvm-svn: 59331
* Use ReadPtr, not ReadUIntPtr through a reinterpret_cast.Argyrios Kyrtzidis2008-11-141-2/+2
| | | | | | Thanks to Sebastian for the suggestion. llvm-svn: 59330
* Minor tweaks to liveness analysis:Ted Kremenek2008-11-141-0/+7
| | | | | | | - Block-expression for 'ObjCForCollectionStmt' is not alive before it occurs - Recursively visit 'element' expression for ObjCForCollectionStmt to get liveness for referenced block-level expressions and variables. llvm-svn: 59316
* Second attempt at implementation transfer function support for ↵Ted Kremenek2008-11-141-35/+52
| | | | | | ObjCForCollectionStmt. We now assume that the 'element' expression can be any lvalue. llvm-svn: 59313
* Flow-sensitive uninitialized values analysis: properly handle the 'element' ↵Ted Kremenek2008-11-141-3/+10
| | | | | | expression of ObjCForCollectionStmt (can be anything). llvm-svn: 59312
* Add a new expression node, CXXOperatorCallExpr, which expresses aDouglas Gregor2008-11-149-16/+139
| | | | | | | | | | | | | | | | | | | function call created in response to the use of operator syntax that resolves to an overloaded operator in C++, e.g., "str1 + str2" that resolves to std::operator+(str1, str2)". We now build a CXXOperatorCallExpr in C++ when we pick an overloaded operator. (But only for binary operators, where we actually implement overloading) I decided *not* to refactor the current CallExpr to make it abstract (with FunctionCallExpr and CXXOperatorCallExpr as derived classes). Doing so would allow us to make CXXOperatorCallExpr a little bit smaller, at the cost of making the argument and callee accessors virtual. We won't know if this is going to be a win until we can parse lots of C++ code to determine how much memory we'll save by making this change vs. the performance penalty due to the extra virtual calls. llvm-svn: 59306
* Don't require us to manually number the statements and expressions in ↵Douglas Gregor2008-11-142-4/+4
| | | | | | StmtNodes.def. We don't need stable numbers yet, renumbering is a pain, and LAST_STMT had the wrong value anyway. llvm-svn: 59300
* Improve comments.Zhongxing Xu2008-11-141-1/+1
| | | | llvm-svn: 59294
* Handle the case where 'element' in ObjCforCollectionstmt is not a DeclStmt ↵Ted Kremenek2008-11-141-5/+8
| | | | | | or DeclRefExpr. llvm-svn: 59290
* Fix CFG construction for ObjCForCollectionStmt: 'element' expression can be ↵Ted Kremenek2008-11-141-20/+44
| | | | | | anything that evaluates to an lvalue llvm-svn: 59289
* Rename header file.Ted Kremenek2008-11-142-4/+4
| | | | | | Update include files. llvm-svn: 59284
* Some cleanup for the implementation of built-in operatorDouglas Gregor2008-11-133-27/+59
| | | | | | candidates. Thanks to Chris for the review! llvm-svn: 59260
* Fix a couple of suboptimalities in error recovery.Chris Lattner2008-11-131-8/+11
| | | | | | | | | | | | | | | | | | | 1. In the top level of ParseStatementOrDeclaration, don't eat a } if we just parsed a statement if it list there. Also, don't even bother emitting an error about a missing semicolon if the statement had a bug (an rbrace is fine). 2. In do/while parsing, don't require a 'while' to be present if the do body didn't parse. This allows us to generate a clean diagnostic for this code: t.c:1:22: error: expected expression void foo (void) { do . while (0); } ^ Thanks to Neil for pointing this out. llvm-svn: 59256
* don't highlight field name, just put a caret on it.Chris Lattner2008-11-131-2/+2
| | | | llvm-svn: 59255
* Using llvm::OwningPtr<> for CurLexer and CurTokenLexer. This makes both the ↵Ted Kremenek2008-11-132-18/+13
| | | | | | ownership semantics of these objects explicit within the Preprocessor and also tightens up the code (explicit deletes not needed). llvm-svn: 59249
* Use PushIncludeMacroStack/PopMacroStack instead of manually pushing/popping ↵Ted Kremenek2008-11-131-14/+6
| | | | | | from IncludeMacroStack. This is both cleaner and makes the include stack transparently extensible. llvm-svn: 59248
* - Revert r59229 and r59232: AllocRegion should be immutable.Ted Kremenek2008-11-131-20/+0
| | | | | | - Temporarily disabled test Analysis/array-struct.c for region store. llvm-svn: 59245
* Process array base expression of any type.Zhongxing Xu2008-11-131-0/+8
| | | | llvm-svn: 59240
* Array index might be unsigned. We have to generate a temporary signed value forZhongxing Xu2008-11-131-0/+12
| | | | | | it to be evaluated by APSInt::operators. llvm-svn: 59238
* Incomplete struct pointer can be used as a function argument.Zhongxing Xu2008-11-131-1/+7
| | | | llvm-svn: 59235
* Lift the pointer to alloca'ed region to the pointer to its first element.Zhongxing Xu2008-11-131-1/+21
| | | | | | | This is required by some operations, e.g., *p = 1; p[0] = 1;. Also set the AllocaRegion's type during the cast. llvm-svn: 59232
* Change AllocaRegion to subclass TypedRegion. We need to know ElementRegion'sZhongxing Xu2008-11-131-2/+12
| | | | | | type when assigning to it. llvm-svn: 59229
OpenPOWER on IntegriCloud