summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Start and end location of a property-dot syntax expressionFariborz Jahanian2010-10-071-3/+6
| | | | | | | must match start and end location of the expression as expected by the rewriter client. Fixes // rdar: // 8520727 llvm-svn: 115934
* Patch for adding message to unavailable attribute.Fariborz Jahanian2010-10-061-2/+6
| | | | | | | And its documentation. Finishes off // rdar: // 6734520. llvm-svn: 115862
* Simplified code for deprecated attribute wih message a little.Fariborz Jahanian2010-10-061-1/+1
| | | | llvm-svn: 115856
* Add message to attribute(deprecated).Fariborz Jahanian2010-10-061-2/+4
| | | | | | | attribute(unavailable) to do next. // rdar:// 6734520. llvm-svn: 115842
* Register the __builtin_va_list_type node when we parse it, rather thanDouglas Gregor2010-10-051-2/+0
| | | | | | | | waiting until we think we need it: we didn't catch all of the places where we actually needed it, and we probably wouldn't ever. Fixes a C++ PCH crasher. llvm-svn: 115621
* Patch implements passing arrays to functions expectingFariborz Jahanian2010-09-241-6/+5
| | | | | | vla. Implements pr7827. llvm-svn: 114737
* Fix a hard-to-reproduce crash-on-invalid, where we weren't checking for a ↵Douglas Gregor2010-09-221-1/+4
| | | | | | valid result from ActOnIdExpression llvm-svn: 114548
* Check in support for OpenCL conditional operator on vector types.Nate Begeman2010-09-201-3/+35
| | | | llvm-svn: 114371
* Check that an overloaded function name, when used by the ! operator,Douglas Gregor2010-09-201-0/+7
| | | | | | | actually resolves to a particular function. Fixes PR8181, from Faisal Vali! llvm-svn: 114331
* Implement -Wunused-label.Argyrios Kyrtzidis2010-09-191-1/+5
| | | | llvm-svn: 114315
* Problem with gnu conditional extension with missingFariborz Jahanian2010-09-181-4/+9
| | | | | | | | | | | | | | LHS and when conditional expression is an array. Since it will be decayed, saved expression must be saved with decayed expression. This is necessary to preserve semantics of this extension (and prevent an IRGen crash which expects an array to always be decayed). I am sure there will be other cases in c++ (aggregate conditionals for example) when saving of the expression must happen after some transformation on conditional expression has happened. Doug, please review. Fixes // rdar://8446940 llvm-svn: 114296
* Sema/transparent_union: Make sure to add implicit cast when constructingDaniel Dunbar2010-09-171-0/+1
| | | | | | implicit union values for the transparent_union extension. llvm-svn: 114236
* Only assignment operator triggers property setter call.Fariborz Jahanian2010-09-171-1/+1
| | | | | | Fixes radar 8437253. llvm-svn: 114207
* For self-comparison warning, check the source location of both the LHS and ↵Ted Kremenek2010-09-161-2/+4
| | | | | | | | | | | RHS to see if they are expanded from macros (and if so, omit the warning). Previously we were just looking at the location of the binary expression. Fixes <rdar://problem/8435950>. llvm-svn: 114044
* RHS of property expression assignment requiresFariborz Jahanian2010-09-141-13/+32
| | | | | | | copy initialization before passing it to a setter. Fixes radar 8427922. llvm-svn: 113885
* When marking the declarations in a default argument expression asDouglas Gregor2010-09-141-2/+13
| | | | | | | | | "used", at the time that the default argument itself is used, also mark destructors that will be called by this expression. This fixes a regression that I introduced in r113700, which broke WebKit, and fixes <rdar://problem/8427926>. llvm-svn: 113883
* Congruent diagnostic for void* arithmetic.Abramo Bagnara2010-09-131-1/+5
| | | | llvm-svn: 113740
* Teach the EvaluatedExprVisitor and its client, which marksDouglas Gregor2010-09-111-0/+6
| | | | | | | | declarations in potentially-evaluated subexpressions, about recursion. Fixes the release-mode self-host failure I introduced in r113700. llvm-svn: 113708
* When parsing default function arguments, do not mark any declarationsDouglas Gregor2010-09-111-40/+98
| | | | | | | | | | | | | | | | | | | | | | used in the default function argument as "used". Instead, when we actually use the default argument, make another pass over the expression to mark any used declarations as "used" at that point. This addresses two kinds of related problems: 1) We were marking some declarations "used" that shouldn't be, because we were marking them too eagerly. 2) We were failing to mark some declarations as "used" when we should, if the first time it was instantiated happened to be an unevaluated context, we wouldn't mark them again at a later point. I've also added a potentially-handy visitor class template EvaluatedExprVisitor, which only visits the potentially-evaluated subexpressions of an expression. I bet this would have been useful for noexcept... Fixes PR5810 and PR8127. llvm-svn: 113700
* property reference expression used on lhs of assignmentFariborz Jahanian2010-09-091-0/+2
| | | | | | | | follows objective's semantics and is not overload'able with an assignment operator. Fixes a crash and a missing diagnostics. Radar 8379892. llvm-svn: 113555
* Eliminate the comma locations from all of the Sema routines that dealDouglas Gregor2010-09-091-8/+6
| | | | | | | | with comma-separated lists. We never actually used the comma locations, nor did we store them in the AST, but we did manage to waste time during template instantiation to produce fake locations. llvm-svn: 113495
* PR8023: Don't crash on invalid uses of __real__ on class types in C++.Eli Friedman2010-09-051-1/+1
| | | | llvm-svn: 113124
* Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.John McCall2010-09-031-3/+0
| | | | llvm-svn: 112945
* AST work to support [C++] [IRgen] for ?: with missing LHSFariborz Jahanian2010-08-311-4/+7
| | | | | | | This is also pr7726 and wip. No change in functionality at this time. llvm-svn: 112612
* Revert my user-defined literal commits - r1124{58,60,67} pendingAlexis Hunt2010-08-301-13/+6
| | | | | | some issues being sorted out. llvm-svn: 112493
* Fix an corner-case assertion introduced by the refactoring in r112258;Douglas Gregor2010-08-301-0/+2
| | | | | | | when we're taking the address of a unresolvable value, it might be an implicit member access. Fixes some Boost.Spirit regressions. llvm-svn: 112487
* Add some braces for sanity and GCC silence. These became unbalanced in r112122,Chandler Carruth2010-08-301-1/+2
| | | | | | so please review echristo and let me know if the logic is wrong now. llvm-svn: 112466
* Implement C++0x user-defined string literals.Alexis Hunt2010-08-291-6/+13
| | | | | | | | | | The extra data stored on user-defined literal Tokens is stored in extra allocated memory, which is managed by the PreprocessorLexer because there isn't a better place to put it that makes sure it gets deallocated, but only after it's used up. My testing has shown no significant slowdown as a result, but independent testing would be appreciated. llvm-svn: 112458
* Fix the memory leak of FloatingLiteral/IntegerLiteral.Argyrios Kyrtzidis2010-08-281-3/+3
| | | | | | | | | | | For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers. Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with the APFloat/APInt values will never get freed. I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral. Fixes rdar://7637185 llvm-svn: 112361
* perform cheap test firstGabor Greif2010-08-281-1/+1
| | | | llvm-svn: 112346
* fix PR8007Gabor Greif2010-08-281-1/+6
| | | | | | | reordering and redefinition issues still may linger, I plan to nail them next llvm-svn: 112333
* Propagate whether an id-expression is the immediate argument ofJohn McCall2010-08-271-37/+61
| | | | | | | | | | | | | | | | | | | an '&' expression from the second caller of ActOnIdExpression. Teach template argument deduction that an overloaded id-expression doesn't give a valid type for deduction purposes to a non-static member function unless the expression has the correct syntactic form. Teach ActOnIdExpression that it shouldn't try to create implicit member expressions for '&function', because this isn't a permitted form of use for member functions. Teach CheckAddressOfOperand to diagnose these more carefully. Some of these cases aren't reachable right now because earlier diagnostics interrupt them. llvm-svn: 112258
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-1/+1
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* With lax vector conversions (the default) make sure we convert between twoEric Christopher2010-08-261-2/+7
| | | | | | | | | vectors that are the same size. Fix up testcases accordingly and add a new one to make sure we still error if lax vector conversions are disabled. Fixes rdar://8328190 llvm-svn: 112122
* Split out a header to hold APIs meant for the Sema implementation from Sema.h.John McCall2010-08-251-1/+1
| | | | | | | Clients of Sema don't need to know (for example) the list of diagnostics we support. llvm-svn: 112093
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-243/+243
| | | | | | to the new constants. llvm-svn: 112047
* Recursive functions should be marked when used from another function. Fixes ↵Argyrios Kyrtzidis2010-08-251-1/+4
| | | | | | http://llvm.org/PR7923. llvm-svn: 112045
* More incremental progress towards not including Expr.h in Sema.h.John McCall2010-08-251-5/+5
| | | | llvm-svn: 112044
* Rename *PendingImplicitInstantiations to *PendingInstantiations. NoChandler Carruth2010-08-251-3/+2
| | | | | | functionality changed. llvm-svn: 112040
* Split FunctionScopeInfo and BlockScopeInfo into their own header.John McCall2010-08-251-2/+4
| | | | llvm-svn: 112038
* Remove AnalysisBasedWarnings.h's dependency on Type.hJohn McCall2010-08-251-3/+4
| | | | llvm-svn: 112027
* When trying to resolve the address of an overloaded expression,John McCall2010-08-241-10/+14
| | | | | | | | only form pointers-to-member if the expression has the appropriate form. This avoids assertions later on on invalid code, but also allows us to properly resolve mixed-staticity overloads. llvm-svn: 111987
* It is not error in c++ to take address ofFariborz Jahanian2010-08-241-1/+4
| | | | | | register variable (c++03 7.1.1P3). radar 8108252. llvm-svn: 111977
* Struggle mightily against header inclusion in Sema.h.John McCall2010-08-241-0/+1
| | | | llvm-svn: 111904
* OwningExprResult -> ExprResult. This patch brought to you byJohn McCall2010-08-241-73/+73
| | | | | | | M-x query-replace-regexp \(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result llvm-svn: 111903
* Abstract out passing around types and kill off ActionBase.John McCall2010-08-241-7/+7
| | | | llvm-svn: 111901
* PR7971: Compute the correct type for an address-of expression containing anEli Friedman2010-08-241-1/+1
| | | | | | UnresolvedMemberExpr. llvm-svn: 111899
* Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).John McCall2010-08-231-135/+96
| | | | llvm-svn: 111863
* Relax the construction of a definition for implicit, trivial defaultChandler Carruth2010-08-231-2/+4
| | | | | | | | | | | | | | | constructors. We perform semantic checking when creating the definition, and this isn't needed in certain contexts (value initialization) but is in others (default initialization). This fixes PR7948. We add explicit code to the default initialization path to ensure the definition is both present and valid. Doug, please review. I think this follows your latest suggestion, and it ended up remarkably cleaner than I anticipated. Also let me know if similar logic should be followed for destructors and copy-constructors. llvm-svn: 111802
* Push DeclGroupRefs and TemplateNames in an opaque but type-safe wayJohn McCall2010-08-231-2/+1
| | | | | | through the parser. llvm-svn: 111800
OpenPOWER on IntegriCloud