summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Sema for Captured StatementsTareq A. Siraj2013-04-161-0/+13
| | | | | | | | | | | | | Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic analysis. Currently captures all variables by reference. TODO: templates Author: Ben Langmuir <ben.langmuir@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D433 llvm-svn: 179618
* Basic support for Microsoft property declarations andJohn McCall2013-04-161-0/+5
| | | | | | | | references thereto. Patch by Tong Shen! llvm-svn: 179585
* Add 178663 back.Rafael Espindola2013-04-031-3/+2
| | | | | | | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green before it processed the reverted 178663, so it could not have been the culprit. Revert "Revert 178663." This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41. llvm-svn: 178682
* Revert 178663.Rafael Espindola2013-04-031-2/+3
| | | | | | | | | | Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb Revert "Don't compute a patched/semantic storage class." This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05. llvm-svn: 178681
* Don't compute a patched/semantic storage class.Rafael Espindola2013-04-031-3/+2
| | | | | | | | | | | For variables and functions clang used to store two storage classes. The one "as written" in the code and a patched one, which, for example, propagates static to the following decls. This apparently is from the days clang lacked linkage computation. It is now redundant and this patch removes it. llvm-svn: 178663
* Implement compiler intrinsics needed for compatibility with MSVC 2012 ↵Joao Matos2013-03-271-31/+76
| | | | | | | | <type_traits>. Patch by me and Ryan Molden. llvm-svn: 178111
* Implement special-case name lookup for inheriting constructors: memberRichard Smith2013-03-261-0/+37
| | | | | | | using-declarations with names which look constructor-like are interpreted as constructor names. llvm-svn: 177957
* PR7256: Provide a fixit for incorrect destructor declarationsDavid Blaikie2013-03-201-2/+10
| | | | | | Fix by Ismail Pazarbasi (ismail.pazarbasi@gmail.com), review by Dmitri Gribenko. llvm-svn: 177546
* ArrayRef-ize ASTContext::getFunctionType and Sema::BuildFunctionType.Jordan Rose2013-03-081-3/+2
| | | | | | No (intended) functionality change. llvm-svn: 176726
* Improve LLDB's implicit cast-to-id to work with C++11 auto and any ↵Douglas Gregor2013-03-071-3/+2
| | | | | | Objective-C object type <rdar://problem/13338107>. llvm-svn: 176665
* The meat of this patch is in BuildCXXMemberCalLExpr where we make it useNick Lewycky2013-02-121-3/+7
| | | | | | | | | | | | MarkMemberReferenced instead of marking functions referenced directly. An audit of callers to MarkFunctionReferenced and DiagnoseUseOfDecl also caused a few other changes: * don't mark functions odr-used when considering them for an initialization sequence. Do mark them referenced though. * the function nominated by the cleanup attribute should be diagnosed. * operator new/delete should be diagnosed when building a 'new' expression. llvm-svn: 174951
* Enable overloading of OpenCL events - this is needed for the overloaded ↵Guy Benyei2013-02-071-0/+6
| | | | | | OpenCL builtin functions. llvm-svn: 174630
* Patch to check for integer overflow. It has beenFariborz Jahanian2013-01-241-2/+3
| | | | | | commented on and approved by Richard Smith. llvm-svn: 173377
* Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn onRichard Smith2013-01-171-1/+2
| | | | | | | expressions which have undefined behavior due to multiple unsequenced modifications or an unsequenced modification and use of a variable. llvm-svn: 172690
* Refactor to call ActOnFinishFullExpr on every full expression. TeachRichard Smith2013-01-141-9/+12
| | | | | | | | ActOnFinishFullExpr that some of its checks only apply to discarded-value expressions. This adds missing checks for unexpanded variadic template parameter packs to a handful of constructs. llvm-svn: 172485
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-3/+3
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* s/CPlusPlus0x/CPlusPlus11/gRichard Smith2013-01-021-10/+10
| | | | llvm-svn: 171367
* ArrayRefize a CompoundStmt constructor.Nico Weber2012-12-291-1/+1
| | | | llvm-svn: 171238
* PR13470: Ensure that copy-list-initialization isntantiates asRichard Smith2012-12-191-5/+5
| | | | | | | | | | | | copy-list-initialization (and doesn't add an additional copy step): Fill in the ListInitialization bit when creating a CXXConstructExpr. Use it when instantiating initializers in order to correctly handle instantiation of copy-list-initialization. Teach TreeTransform that function arguments are initializations, and so need this special treatment too. Finally, remove some hacks which were working around SubstInitializer's shortcomings. llvm-svn: 170489
* Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as ↵David Blaikie2012-12-191-8/+8
| | | | | | | | | | | | | | | per review discussion in r170365 This does limit these typedefs to being sequences, but no current usage requires them to be contiguous (we could expand this to a more general iterator pair range concept at some point). Also, it'd be nice if SmallVector were constructible directly from an ArrayRef but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the inverse conversion. (& generalizing over all range-like things, while nice, would require some nontrivial SFINAE I haven't thought about yet) llvm-svn: 170482
* Add missing check for error return from DefaultLvalueConversion. Fixes ↵Eli Friedman2012-12-131-0/+2
| | | | | | <rdar://problem/12857416>. llvm-svn: 170056
* Properly compute triviality for explicitly-defaulted or deleted special members.Richard Smith2012-12-081-23/+28
| | | | | | | | | | | | | | Remove pre-standard restriction on explicitly-defaulted copy constructors with 'incorrect' parameter types, and instead just make those special members non-trivial as the standard requires. This required making CXXRecordDecl correctly handle classes which have both a trivial and a non-trivial special member of the same kind. This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the new triviality computation technology. llvm-svn: 169667
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-9/+9
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Don't return a pointer to an UnresolvedSetImpl in the CXXRecordDecl interface,Argyrios Kyrtzidis2012-11-281-3/+5
| | | | | | expose only the iterators instead. llvm-svn: 168770
* PR14428: When instantiating a 'new' expression, if we had a non-dependentRichard Smith2012-11-261-20/+16
| | | | | | | | initialization, don't rebuild it. Remove a couple of hacks which were trying to work around this. Fix the special case for one-argument CXXConstructExprs to not apply if the one argument is a default argument. llvm-svn: 168582
* Do not cache a pointer to ExprEvalContexts.back().Benjamin Kramer2012-11-151-7/+9
| | | | | | | | | | It may become a dangling pointer if the underlying SmallVector reallocates. Sadly the testcase is really large and doesn't reduce well because of SmallVector's reallocation patterns. Fixes PR14336. llvm-svn: 168045
* s/tranform/transform/Benjamin Kramer2012-11-141-1/+1
| | | | llvm-svn: 167929
* PR13552: Fix the end location of a CXXNewExpr.David Blaikie2012-11-071-3/+4
| | | | | | | | | Spent longer than reasonable looking for a nice way to test this & decided to give up for now. Open to suggestions/requests. Richard Smith suggested adding something to ASTMatchers but it wasn't readily apparent how to test this with that. llvm-svn: 167507
* Add codegen support for __uuidof().Nico Weber2012-10-111-22/+2
| | | | llvm-svn: 165710
* Add FP_CONTRACT support for clang.Lang Hames2012-10-021-1/+2
| | | | | | | | Clang will now honor the FP_CONTRACT pragma and emit LLVM fmuladd intrinsics for expressions of the form A * B + C (when they occur in a single statement). llvm-svn: 164989
* Add the Microsoft __is_interface_class type trait.John McCall2012-09-251-0/+5
| | | | | | Patch by Andy Gibbs! llvm-svn: 164591
* Remove Context argument from TemplateDeductionInfo constructor. It was no ↵Craig Topper2012-09-191-1/+1
| | | | | | longer needed after the unused Context member was removed in r164104. llvm-svn: 164196
* objective-C arc: remove -Warc-abi in its entirety.Fariborz Jahanian2012-09-141-15/+0
| | | | | | // rdar://10554025 llvm-svn: 163917
* Implement C++11 [conv.prom]p4: an enumeration with a fixed underlying type hasRichard Smith2012-09-131-2/+10
| | | | | | | | | integral promotions to both its underlying type and to its underlying type's promoted type. This matters now that boolean conversions aren't permitted in converted constant expressions (a la DR1407): an enumerator with a fixed underlying type of bool still can be. llvm-svn: 163841
* Fix PR13784: instantiation of an abstract class in a conditional operator.David Blaikie2012-09-101-0/+7
| | | | | | | | | | | | A couple of missing "RequireNonAbstractType" calls in conditional operator handling. I looked for opportunities to tie this check in to all relevant callers of PerformCopyInitialization (couldn't be all callers since this is called for base subobject copying too, where it's acceptable to copy abstract types) but the callers varied too much & in many cases had substantial code or conditionals on the RequireNonAbstractType call, the PerformCopyInitialization call, or the code between the two calls. llvm-svn: 163555
* Remove redundant semicolons which are null statements.Dmitri Gribenko2012-09-101-1/+1
| | | | llvm-svn: 163546
* Allow vector types in pseudo-destructor expressions. Fixes PR13798.Douglas Gregor2012-09-101-1/+2
| | | | llvm-svn: 163514
* Improved MSVC __interface support by adding first class support for it, ↵Joao Matos2012-08-311-1/+1
| | | | | | instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins. llvm-svn: 163013
* Push ArrayRef through the Expr hierarchy.Benjamin Kramer2012-08-241-8/+8
| | | | | | No functionality change. llvm-svn: 162552
* Now that ASTMultiPtr is nothing more than a array reference, make it a ↵Benjamin Kramer2012-08-231-22/+14
| | | | | | | | MutableArrayRef. This required changing all get() calls to data() and using the simpler constructors. llvm-svn: 162501
* Remove ASTOwningVector, it doesn't own anything and provides no value over ↵Benjamin Kramer2012-08-231-2/+2
| | | | | | SmallVector. llvm-svn: 162492
* Rip out remnants of move semantic emulation and smart pointers in Sema.Benjamin Kramer2012-08-231-17/+12
| | | | | | | These were nops for quite a while and only lead to confusion. ASTMultiPtr now behaves like a proper dumb array reference. llvm-svn: 162475
* Make __is_convertible_to handle abstract types correctly. PR13591.Eli Friedman2012-08-141-1/+17
| | | | llvm-svn: 161828
* Factor out computation of whether a typeid's expression is potentiallyRichard Smith2012-08-131-1/+1
| | | | | | evaluated into a CXXTypeid member function. No functionality change. llvm-svn: 161779
* Implement final piece of DR963 and also DR587:Richard Smith2012-08-081-27/+60
| | | | | | | | | | | A conditional operator between glvalues of types cv1 T and cv2 T produces a glvalue if the expressions are of the same value kind and one of cv1 and cv2 is a subset of the other. A conditional operator between two null pointer constants is permitted if one of them is of type std::nullptr_t. llvm-svn: 161476
* When building a conditional operator where one operand is a throw-expressionRichard Smith2012-08-071-4/+22
| | | | | | | | | and the other is a glvalue of class type, don't forget to copy-initialize a temporary when performing the lvalue-to-rvalue conversion on the glvalue. Strangely, DefaultLvalueConversions misses this part of the lvalue-to-rvalue conversions. llvm-svn: 161450
* PR13433: In Microsoft mode, don't require function calls within decltypeRichard Smith2012-07-281-0/+5
| | | | | | | | | expressions to have complete return types (or accessible destructors). If the return type is required to be complete for some other reason (for instance, if it is needed by overload resolution), then it will still be required to be complete. This is apparently required in order to parse a MSVC11 header. llvm-svn: 160924
* Final piece of core issue 1330: delay computing the exception specification ofRichard Smith2012-07-271-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a defaulted special member function until the exception specification is needed (using the same criteria used for the delayed instantiation of exception specifications for function temploids). EST_Delayed is now EST_Unevaluated (using 1330's terminology), and, like EST_Uninstantiated, carries a pointer to the FunctionDecl which will be used to resolve the exception specification. This is enabled for all C++ modes: it's a little faster in the case where the exception specification isn't used, allows our C++11-in-C++98 extensions to work, and is still correct for C++98, since in that mode the computation of the exception specification can't fail. The diagnostics here aren't great (in particular, we should include implicit evaluation of exception specifications for defaulted special members in the template instantiation backtraces), but they're not much worse than before. Our approach to the problem of cycles between in-class initializers and the exception specification for a defaulted default constructor is modified a little by this change -- we now reject any odr-use of a defaulted default constructor if that constructor uses an in-class initializer and the use is in an in-class initialzer which is declared lexically earlier. This is a closer approximation to the current draft solution in core issue 1351, but isn't an exact match (but the current draft wording isn't reasonable, so that's to be expected). llvm-svn: 160847
* The delete argument should not be converted to void*.Abramo Bagnara2012-07-091-3/+3
| | | | llvm-svn: 159961
* PR13293: Defer deduction of an auto type with a dependent declarator, such ↵Richard Smith2012-07-081-4/+5
| | | | | | as "auto (*f)(T t)". llvm-svn: 159908
OpenPOWER on IntegriCloud