summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add some code to accurately perform odr-used marking for variables per the ↵Eli Friedman2012-02-021-0/+4
| | | | | | C++11 rules. llvm-svn: 149641
* Split Sema::MarkDeclarationReferenced into multiple functions; the ↵Eli Friedman2012-02-021-11/+11
| | | | | | additional entry points are needed to implement C++11 odr-use marking correctly. No functional change in this patch; I'll actually make the change which fixes the odr-use marking in a followup patch. llvm-svn: 149586
* Diagnose the restriction on default arguments in C++11 [expr.prim.lambda]p5.Douglas Gregor2012-02-011-1/+7
| | | | llvm-svn: 149517
* Introduce the lambda scope before determining explicit captures, whichDouglas Gregor2012-02-011-108/+100
| | | | | | | | | | | | | cleans up and improves a few things: - We get rid of the ugly dance of computing all of the captures in data structures that clone those of CapturingScopeInfo, centralizing the logic for accessing/updating these data structures - We re-use the existing capture logic for 'this', which actually works now. Cleaned up some diagnostic wording in minor ways as well. llvm-svn: 149516
* Improve checking of explicit captures in a C++11 lambda expression:Douglas Gregor2012-02-011-14/+56
| | | | | | | | | | | | | | - Actually building the var -> capture mapping properly (there was an off-by-one error) - Keeping track of the source location of each capture - Minor QoI improvements, e.g, highlighing the prior capture if there are multiple captures, pointing at the variable declaration we found if we reject it. As part of this, add standard citations for the various semantic checks we perform, and note where we're not performing those checks as we should. llvm-svn: 149462
* Diagnose attempts to explicitly capture a __block variable in a lambda.Douglas Gregor2012-02-011-3/+8
| | | | llvm-svn: 149458
* Added source location for the template keyword in AST template-id expressions.Abramo Bagnara2012-01-271-4/+5
| | | | llvm-svn: 149127
* Improve efficiency of Sema::MaybeBindToTemporary by working with thePeter Collingbourne2012-01-261-4/+19
| | | | | | | canonical type directly and adding a fast path for the common case that the type is directly a RecordType. llvm-svn: 149039
* Slight refactoring; catch yet another case where we were missing an ↵Eli Friedman2012-01-261-6/+1
| | | | | | lvalue-to-rvalue conversion. llvm-svn: 149003
* Fix r148920 to what I actually meant to commit.Eli Friedman2012-01-251-1/+3
| | | | llvm-svn: 148921
* Add missing check for placeholders.Eli Friedman2012-01-251-4/+10
| | | | llvm-svn: 148920
* Make sure we correctly treat __is_convertible_to as an unevaluated context. ↵Eli Friedman2012-01-251-2/+3
| | | | | | PR11833. llvm-svn: 148893
* Switch PerformImplicitConversion over to use DefaultLvalueConversion for ↵Eli Friedman2012-01-241-3/+5
| | | | | | lvalue-to-rvalue conversion. llvm-svn: 148874
* Add a new warning, -Wover-aligned, which detects attempts to use the defaultNick Lewycky2012-01-241-0/+16
| | | | | | | allocator to construct an object which declares more alignment than the default allocator actually provides. Fixes PR9527! llvm-svn: 148857
* Minor fixups for auto deduction of initializer lists.Sebastian Redl2012-01-231-1/+2
| | | | | | | | Fix some review comments. Add a test for deduction when std::initializer_list isn't available yet. Fix redundant error messages. This fixes and outstanding FIXME too. llvm-svn: 148735
* Add a source range to the ms path. Spotted by David Blaikie.Nico Weber2012-01-231-1/+1
| | | | llvm-svn: 148683
* In microsoft mode, downgrade pseudo-destructors on void from error to warning.Nico Weber2012-01-231-2/+5
| | | | | | This matches cl.exe's behavior and fixes PR11791. llvm-svn: 148682
* Make sure the AST correctly represents lvalue-to-rvalue conversions where ↵Eli Friedman2012-01-231-2/+1
| | | | | | appropriate. llvm-svn: 148673
* Remove PotentiallyPotentiallyEvaluated, and replace it with a much simpler ↵Eli Friedman2012-01-201-16/+6
| | | | | | and less error-prone way of handling the relevant cases. Towards marking of whether a declaration is used more accurately. llvm-svn: 148522
* Convert DiagnoseEmptyLookup to use correction callbacks.Kaelyn Uhrain2012-01-181-2/+4
| | | | | | | | | | | | No new unit tests yet as there is no behavioral change (except for slightly more specific filtering in Sema::ActOnStartOfLambdaDefinition). Tests will be added as the code paths are traced in greater depth to determine how to improve the results--there are at least one or two known bugs that require those improvements. This commit lays the groundwork for those changes. llvm-svn: 148382
* Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie2012-01-171-2/+2
| | | | | | appropriate or when GCC requires it) llvm-svn: 148292
* Add some calls to MarkDeclarationReferenced, towards a point where every ↵Eli Friedman2012-01-161-0/+3
| | | | | | declaration which is used is marked as used. llvm-svn: 148253
* In Objective-C++, actually compute the base type of a member accessDouglas Gregor2012-01-121-12/+17
| | | | | | | | expression for an Objective-C object or pointer type, so that we don't attempt to treat the member name as a template. Fixes <rdar://problem/10672501>. llvm-svn: 148028
* Start refactoring code for capturing variables and 'this' so that it is ↵Eli Friedman2012-01-111-38/+38
| | | | | | shared between lambda expressions and block literals. llvm-svn: 147917
* Do placeholder conversions on array bounds in both declarators andJohn McCall2012-01-111-4/+7
| | | | | | new-expressions. llvm-svn: 147900
* More lambda work: semantic analysis of capturing 'this'. It's a bit ↵Eli Friedman2012-01-071-32/+72
| | | | | | complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.) llvm-svn: 147723
* Lambdas: semantic analysis of explicit captures.Eli Friedman2012-01-071-5/+78
| | | | | | This patch (and some of my other commits related to lambdas) is heavily based off of John Freeman's work-in-progress patches. llvm-svn: 147706
* More lambda work. Fixes a minor bug Richard pointed out, makes lookup for ↵Eli Friedman2012-01-061-13/+53
| | | | | | lambda parameters work correctly, recording more information into the AST. llvm-svn: 147650
* More lambda work. Tweak the Sema interface slightly. Start adding the ↵Eli Friedman2012-01-051-12/+60
| | | | | | pieces to build the lambda class and its call operator. Create an actual scope for the lambda body. llvm-svn: 147595
* Add an explicit LambdaExprContext to Declarator, to parallel ↵Eli Friedman2012-01-041-2/+4
| | | | | | BlockLiteralContext. Use it to ensure semantic analysis of types isn't confused by the lack of a type specifier. llvm-svn: 147522
* Stub out the Sema interface for lambda expressions, and change the parser to ↵Eli Friedman2012-01-041-0/+35
| | | | | | use it. Unconditionally error on lambda expressions because they don't work in any meaningful way yet. llvm-svn: 147515
* Support decltype in pseudo destructors and dependent destructor calls.David Blaikie2011-12-161-33/+50
| | | | | | Reviewed by Eli Friedman. llvm-svn: 146738
* In debugger support mode, if we have a top-level message sendDouglas Gregor2011-12-151-0/+9
| | | | | | | expression with an unknown result type, assume that the result type is 'id'. Fixes <rdar://problem/10400663>. llvm-svn: 146622
* Fix/test decltype dtor calls with invalid base expression.David Blaikie2011-12-121-1/+1
| | | | llvm-svn: 146354
* Decltype in non-pseudo (& non-dependent) dtor calls.David Blaikie2011-12-081-0/+16
| | | | llvm-svn: 146155
* Implement support for the __is_final type trait, to determine whetherDouglas Gregor2011-12-031-0/+7
| | | | | | | a class is marked 'final', from Alberto Ganesh Barbati! Fixes PR11462. llvm-svn: 145775
* Revert r145244. It causes us to create broken ASTs with missing type informationRichard Smith2011-11-291-68/+64
| | | | | | | | | | for some cast expressions. Original commit message: Removed useless ImplicitCast nodes in explicit cstyle and static casts llvm-svn: 145447
* Removed useless ImplicitCast nodes in explicit cstyle and static castsNicola Gigante2011-11-281-64/+68
| | | | llvm-svn: 145244
* In Sema::MaybeBindToTemporary, create a CXXBindTemporaryExpr for anPeter Collingbourne2011-11-271-1/+2
| | | | | | array of objects with non-trivial destructors. PR11365. llvm-svn: 145203
* Added missing ImplicitCastExpr around conversion operator call.Abramo Bagnara2011-11-161-1/+7
| | | | llvm-svn: 144850
* Fixed missing cast and wrong cast kind in delete expression.Abramo Bagnara2011-11-161-2/+5
| | | | llvm-svn: 144796
* In ARC, don't reclaim objects of Class type.John McCall2011-11-141-0/+4
| | | | llvm-svn: 144561
* There's no good reason to track temporaries in ExprWithCleanups,John McCall2011-11-101-18/+18
| | | | | | | but it is sometimes useful to track blocks. Do so. Also optimize the storage of these expressions. llvm-svn: 144263
* Rip out CK_GetObjCProperty.John McCall2011-11-071-5/+0
| | | | llvm-svn: 143910
* Enable function call and some overload resolution with parameters of ↵Sebastian Redl2011-11-011-0/+1
| | | | | | aggregate class type and initializer list arguments. llvm-svn: 143462
* Restore r142914 and r142915, now with missing file and apparentJohn McCall2011-10-251-17/+11
| | | | | | GCC compiler workaround. llvm-svn: 142931
* Revert r142914 and r142915, due to possibly missing file.NAKAMURA Takumi2011-10-251-11/+17
| | | | | | r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." llvm-svn: 142921
* Introduce a placeholder type for "pseudo object"John McCall2011-10-251-17/+11
| | | | | | | | | | | | | | | expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. llvm-svn: 142914
* Check for unexpanded parameter packs in the name that guards aDouglas Gregor2011-10-251-3/+17
| | | | | | | | | Microsoft __if_exists/__if_not_exists statement. Also note that we weren't traversing DeclarationNameInfo *at all* within the RecursiveASTVisitor, which would be rather fatal for variadic templates. llvm-svn: 142906
* Implement support for dependent Microsoft __if_exists/__if_not_existsDouglas Gregor2011-10-251-7/+15
| | | | | | | | | | statements. As noted in the documentation for the AST node, the semantics of __if_exists/__if_not_exists are somewhat different from the way Visual C++ implements them, because our parsed-template representation can't accommodate VC++ semantics without serious contortions. Hopefully this implementation is "good enough". llvm-svn: 142901
OpenPOWER on IntegriCloud