summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Replace more uses of 'CurLexer->' with 'CurPPLexer->'. No performance change.Ted Kremenek2008-11-182-5/+5
| | | | llvm-svn: 59482
* Add hooks to use PTHLexer::Lex instead of Lexer::Lex when CurLexer is null.Ted Kremenek2008-11-181-3/+5
| | | | | | | Performance tests on Cocoa.h (using the regular Lexer) shows no performance difference. llvm-svn: 59479
* Added conditional guard 'if (CurLexer)' when using SetCommentRetentionState().Ted Kremenek2008-11-181-6/+6
| | | | | | | | | | | | This is because the PTHLexer will not support this method. Performance testing on preprocessing Cocoa.h shows that this results in a negligible performance difference (less than 1%). I tried making Lexer::SetCommentRetentionState() an out-of-line function (a precursor to making it a virtual function in PreprocessorLexer) and noticed a 1% decrease in speed (it is called in a hot part of the Preprocessor). llvm-svn: 59477
* Change a bunch of uses of 'CurLexer->' to 'CurPPLexer->', which should be theTed Kremenek2008-11-181-40/+40
| | | | | | | | alias for the current PreprocessorLexer. No functionality change. Performance testing shows this results in no performance degradation when preprocessing Cocoa.h. llvm-svn: 59474
* - Add 'CurPPLexer' to Preprocessor to keep track of the currentTed Kremenek2008-11-181-0/+1
| | | | | | | | | PreprocessorLexer, which will either be a 'Lexer' or 'PTHLexer'. - Added stub field 'CurPTHLexer' to keep track of the current PTHLexer. - Modified IncludeStackInfo to track both the current PTHLexer and current PreprocessorLexer. llvm-svn: 59472
* Implement effects of 'mutable', and a few comments from Chris on its parsing.Sebastian Redl2008-11-174-3/+14
| | | | llvm-svn: 59470
* Eliminate all of the placeholder identifiers used for constructors,Douglas Gregor2008-11-1710-128/+128
| | | | | | | | | destructors, and conversion functions. The placeholders were used to work around the fact that the parser and some of Sema really wanted declarators to have simple identifiers; now, the code that deals with declarators will use DeclarationNames. llvm-svn: 59469
* Fold assertion into second valid else branch. This removes a compiler warningTed Kremenek2008-11-171-3/+2
| | | | | | | | where the control reaches the end of a non-void function and also allows the compiler to generate better code. When this assertion is false we can easily add more else cases. llvm-svn: 59468
* 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
OpenPOWER on IntegriCloud