summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix <rdar://problem/6333904> [sema] message lookup on super is incorrectSteve Naroff2008-11-171-1/+17
| | | | | | Missing special lookup rule in Sema::ActOnInstanceMessage(). llvm-svn: 59467
* Updated IdentifierResolver to deal with DeclarationNames. The names ofDouglas Gregor2008-11-1710-65/+173
| | | | | | | | | | | | | | | | | | | | | C++ constructors, destructors, and conversion functions now have a FETokenInfo field that IdentifierResolver can access, so that these special names are handled just like ordinary identifiers. A few other Sema routines now use DeclarationNames instead of IdentifierInfo*'s. To validate this design, this code also implements parsing and semantic analysis for id-expressions that name conversion functions, e.g., return operator bool(); The new parser action ActOnConversionFunctionExpr takes the result of parsing "operator type-id" and turning it into an expression, using the IdentifierResolver with the DeclarationName of the conversion function. ActOnDeclarator pushes those conversion function names into scope so that the IdentifierResolver can find them, of course. llvm-svn: 59462
* Implement rdar://6319320: give a good diagnostic for cases where peopleChris Lattner2008-11-172-1/+13
| | | | | | | are trying to use the old GCC "casts as lvalue" extension. We don't and will hopefully never support this. llvm-svn: 59460
* Fix <rdar://problem/6316324> [sema] spurious warning on comparison of ↵Steve Naroff2008-11-171-1/+9
| | | | | | qualified id. llvm-svn: 59459
* Fix <rdar://problem/6320086> parser rejects block capturing ivar.Steve Naroff2008-11-171-1/+4
| | | | llvm-svn: 59444
* Some cleanups for C++ operator overloadingDouglas Gregor2008-11-173-69/+45
| | | | llvm-svn: 59443
* Simplify error messages for two-parameter overloaded increment/decrement ↵Douglas Gregor2008-11-171-11/+4
| | | | | | operators llvm-svn: 59442
* Introduction the DeclarationName class, as a single, general method ofDouglas Gregor2008-11-1718-102/+354
| | | | | | | | representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. llvm-svn: 59441
* A few corrections to the expr constant work. Not enabled at the Eli Friedman2008-11-171-2/+3
| | | | | | moment. llvm-svn: 59435
* More expr constant work. (Off by default).Anders Carlsson2008-11-171-8/+25
| | | | llvm-svn: 59433
* Address some comments Eli had.Anders Carlsson2008-11-161-11/+6
| | | | llvm-svn: 59430
* use HandleConversionToBool() to check if a given cond is foldable (per Eli's ↵Nuno Lopes2008-11-161-3/+3
| | | | | | comment) llvm-svn: 59429
* 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
OpenPOWER on IntegriCloud