summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-071-43/+43
| | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckAssignmentOperands() DiagnoseSelfAssignment() checkArithmeticNull() llvm-svn: 139215
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-071-53/+53
| | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckVectorCompareOperands() CheckBitwiseOperands() CheckLogicalOperands() llvm-svn: 139214
* In Microsoft mode, if we are inside a template class member function and we ↵Francois Pichet2011-09-071-0/+2
| | | | | | | | can't resolve a function call then create a type-dependent CallExpr even if the function has no type dependent arguments. The goal is to postpone name lookup to instantiation time to be able to search into type dependent base classes. With this patch in, clang will generate only 37 errors (down from 212) when parsing a typical MFC source file. llvm-svn: 139210
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-99/+101
| | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckCompareOperands() llvm-svn: 139187
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-23/+23
| | | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: checkEnumComparison() diagnoseDistinctPointerComparison() convertPointersToCompositeType() diagnoseFunctionPointerToVoidComparison() llvm-svn: 139184
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-36/+36
| | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: DiagnoseBadShiftValues() CheckShiftOperands() llvm-svn: 139183
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-55/+57
| | | | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: diagnoseArithmeticOnTwoVoidPointers() checkArithmeticBinOpPointerOperands() diagnosePointerIncompatibility() CheckAdditionOperands() CheckSubtractionOperands() llvm-svn: 139182
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-64/+64
| | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckVectorOperands() CheckMultiplyDivideOperands() CheckRemainderOperands() llvm-svn: 139181
* Implement the Named Return Value Optimization (NRVO) for blocks.Douglas Gregor2011-09-061-0/+2
| | | | llvm-svn: 139178
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-36/+36
| | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckTransparentUnionArgumentConstraints() CheckSingleAssignmentConstraints() InvalidOperands() llvm-svn: 139176
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-57/+57
| | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckAssignmentConstraints() llvm-svn: 139173
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-32/+30
| | | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: checkPointerTypesForAssignment() checkBlockPointerTypesForAssignment() checkObjCPointerTypesForAssignment() CheckAssignmentConstraints() llvm-svn: 139170
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-20/+21
| | | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: DiagnoseConditionalForNull() CheckConditionalOperands() IsArithmeticBinaryExpr() DiagnoseConditionalPrecedence() llvm-svn: 139167
* Spelling.Benjamin Kramer2011-09-061-7/+7
| | | | llvm-svn: 139165
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-56/+55
| | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: handleIntegerConversion() UsualArithmeticConversions() llvm-svn: 139164
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-35/+32
| | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: handleFloatConversion() handleComplexIntConvsersion() llvm-svn: 139153
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-23/+24
| | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: handleComplexFloatToComplexFloatConverstion() handleComplexFloatConversion() llvm-svn: 139151
* Pass 0 instead of a empty TemplateArgumentListInfo when creating a ↵Francois Pichet2011-09-041-1/+2
| | | | | | | | CXXDependentScopeMemberExpr to handle a "this->" fixit (lookup into dependent bases of class template) Otherwise the fixit doesn't really work for subsequent lookup. llvm-svn: 139105
* More unused variable removal.Benjamin Kramer2011-09-031-3/+1
| | | | llvm-svn: 139080
* Make helpers static, remove unused variables.Benjamin Kramer2011-09-031-4/+0
| | | | llvm-svn: 139078
* Fix some indenting issues in SemaExpr.cppRichard Trieu2011-09-021-4/+3
| | | | llvm-svn: 139042
* Refactor UsualArithmeticConversions() in SemaExpr.cpp into several functions.Richard Trieu2011-09-021-251/+291
| | | | llvm-svn: 139033
* Move the warning for different enum comparisons and the warning for using ↵Richard Trieu2011-09-021-61/+88
| | | | | | NULL as a non-pointer in a binary operation into separate functions. llvm-svn: 138995
* Reduce code duplication for pointer comparisons in CheckCompareOperands().Richard Trieu2011-09-021-72/+84
| | | | llvm-svn: 138994
* Pull out incomplete pointer type checking code, used from arithmetic ↵Richard Trieu2011-09-021-24/+22
| | | | | | checking functions, into its own function. llvm-svn: 138993
* Refactor CheckConditionalOperands() by moving chunks of code to helper ↵Richard Trieu2011-09-021-163/+227
| | | | | | functions making a slimmer function. llvm-svn: 138992
* Refactor CheckAddressOfOperand() by pulling out redundant code and moving ↵Richard Trieu2011-09-021-9/+14
| | | | | | hard coding strings from SemaExpr.cpp to DiagnosticSemaKinds.td. llvm-svn: 138987
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-10/+10
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Refactor CheckAdditionOperands(), CheckSubtractionOperands(), and ↵Richard Trieu2011-09-011-21/+29
| | | | | | CheckIncrementDecrementOperand() in SemaExpr.cpp to move reused code to separate functions. llvm-svn: 138975
* objective-c: this patch (re)introduces objective-c's default propertyFariborz Jahanian2011-08-311-97/+0
| | | | | | | | | | synthesis. This new feature is currently placed under -fobjc-default-synthesize-properties option and is off by default pending further testing. It will become the default feature soon. // rdar://8843851 llvm-svn: 138913
* Don't assert when diagnosing a missing cast of an unknown-anytypeJohn McCall2011-08-311-1/+6
| | | | | | | | message send to an unknown method. rdar://problem/9416370, redux. llvm-svn: 138893
* Declare and define implicit move constructor and assignment operator.Sebastian Redl2011-08-301-11/+19
| | | | | | | | | This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. llvm-svn: 138821
* Update the comment on the default-argument conversion fix; thanks toJohn McCall2011-08-291-6/+10
| | | | | | Johannes Schaub for talking me around to sense. llvm-svn: 138784
* Disable the l-value to r-value conversion on C++ class types passedJohn McCall2011-08-271-3/+9
| | | | | | | | | | | to varargs functions in unevaluated contexts. AFAICT, there is no standards justification for this, but it matches what other compilers do and therefore preserves compatibility with certain template metaprogramming idioms. Should fix self-host. llvm-svn: 138715
* The lvalue-to-rvalue on structs in C++ is actually partJohn McCall2011-08-271-17/+13
| | | | | | | of default argument promotion and needs to happen unconditionally. This is particularly semantically important in C++0x. llvm-svn: 138691
* Don't assert on taking the address of a non-type template parameter. Fixes ↵Eli Friedman2011-08-261-1/+1
| | | | | | PR10766. llvm-svn: 138648
* In -Wno-error=non-pod-varargs, initialize a temporary withJohn McCall2011-08-261-2/+11
| | | | | | | the crazy comma expression so that we get an r-value in the varargs position. llvm-svn: 138638
* Switch this code to use the more idiomatic 'dyn_cast' pattern.Chandler Carruth2011-08-161-4/+2
| | | | llvm-svn: 137780
* Add fixit notes for -Wconstant-logical-operand.Matt Beaumont-Gay2011-08-151-3/+18
| | | | llvm-svn: 137620
* The current warning in -Wnull-arithmetic for comparisons between NULL and ↵Richard Trieu2011-08-111-3/+4
| | | | | | | | | | | | | | | | | non-pointers is not very helpful. This patch will update the wording to be more helpful to users. Old warning: warning: use of NULL in arithmetic operation [-Wnull-arithmetic] return 10 <= NULL; ^ ~~~~ New warning: warning: comparison between NULL and non-pointer ('int' and NULL) [-Wnull-arithmetic] return 10 <= NULL; ~~ ^ ~~~~ llvm-svn: 137377
* Encapsulate the Objective-C id/Class/SEL "redefinition" types inDouglas Gregor2011-08-111-8/+10
| | | | | | | | | ASTContext with accessors/mutators. The only functional change is that the AST writer won't bother writing the id/Class/SEL redefinition type if it hasn't been explicitly set; previously, it ended up being written as a synonym for the built-in id/Class/SEL. llvm-svn: 137349
* Refactoring of DiagnoseBitwisePrecedence() in SemaExpr.cpp to reduce code ↵Richard Trieu2011-08-101-26/+22
| | | | | | duplication. llvm-svn: 137259
* Change an assert into a check. I'm pretty sure there was a pointJohn McCall2011-08-101-3/+13
| | | | | | | | in time when this assert was valid, but it's not valid now. Also teach this code to correctly introduce function-to-pointer decay. llvm-svn: 137201
* Make sure FunctionDecls aren't considered during overload resolution if thereKaelyn Uhrain2011-08-081-4/+5
| | | | | | are explicit template args. llvm-svn: 137054
* Perform array bounds checking in more situations and properly handle specialKaelyn Uhrain2011-08-051-5/+29
| | | | | | | | | | | | | | | | case situations with the unary operators & and *. Also extend the array bounds checking to work with pointer arithmetic; the pointer arithemtic checking can be turned on using -Warray-bounds-pointer-arithmetic. The changes to where CheckArrayAccess gets called is based on some trial & error and a bunch of digging through source code and gdb backtraces in order to have the check performed under as many situations as possible (such as for variable initializers, arguments to function calls, and within conditional in addition to the simpler cases of the operands to binary and unary operator) while not being called--and triggering warnings--more than once for a given ArraySubscriptExpr. llvm-svn: 136997
* Have the typo correction in DiagnoseEmptyLookup properly handle templateKaelyn Uhrain2011-08-051-5/+9
| | | | | | functions when performing function overload resolution. llvm-svn: 136948
* Fix a small bug where DiagnoseEmptyLookup would no longer print any messagesKaelyn Uhrain2011-08-041-2/+1
| | | | | | | | | when performing typo correction involving any overloaded template functions. The added test cases, while currently demontrating sub-optimal behavior, will not trigger any messages without the 1-line change to SemaExpr.cpp. llvm-svn: 136943
* Improve overloaded function handling in the typo correction code.Kaelyn Uhrain2011-08-031-1/+23
| | | | | | | | Change TypoCorrection to store a set of NamedDecls instead of a single NamedDecl. Also add initial support for performing function overload resolution to Sema::DiagnoseEmptyLookup. llvm-svn: 136807
* Fix formatting of SemaExpr.cpp, mainly fixing lines greater than 80 characters.Richard Trieu2011-08-021-109/+194
| | | | | | No functional change. llvm-svn: 136678
* Introduce a Fix-It for the "missing sentinel" warning, adding anDouglas Gregor2011-07-301-5/+16
| | | | | | | appropriate sentinel at the end of the argument list. Also, put the sentinel warnings under -Wsentinel. Fixes <rdar://problem/8764236>. llvm-svn: 136566
OpenPOWER on IntegriCloud