- Nov 04, 2008
-
-
Sebastian Redl authored
Some cleanup of the cast checkers. Don't canonicalize types when not needed. Use distinct diagnostics for distinct errors. llvm-svn: 58700
-
Douglas Gregor authored
Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr llvm-svn: 58698
-
Douglas Gregor authored
Create a new expression class, CXXThisExpr, to handle the C++ 'this' primary expression. Remove CXXThis from PredefinedExpr llvm-svn: 58695
-
Douglas Gregor authored
llvm-svn: 58692
-
Douglas Gregor authored
Diagnose use of 'this' in a C++ default argument. Thanks to Eli for correcting my bogus assertion about it already being handled llvm-svn: 58691
-
rdar://problem/6339636Steve Naroff authored
Fix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 < FileIDs.size() && "Invalid FileID!", file c:\cygwin\home\Administrator\llvm\tools\clang\include\clang/Basic/SourceManager.h, line 513 llvm-svn: 58654
-
- Nov 03, 2008
-
-
Douglas Gregor authored
llvm-svn: 58649
-
Douglas Gregor authored
X x(5, 7); llvm-svn: 58641
-
Douglas Gregor authored
cope with the case where a user-defined conversion is actually a copy construction, and therefore can be compared against other standard conversion sequences. While I called this a hack before, now I'm convinced that it's the right way to go. Compare overloads based on derived-to-base conversions that invoke copy constructors. Suppress user-defined conversions when attempting to call a user-defined conversion. llvm-svn: 58629
-
Douglas Gregor authored
when appropriate. Conversions for class types now make use of copy constructors. I've replaced the egregious hack allowing class-to-class conversions with a slightly less egregious hack calling these conversions standard conversions (for overloading reasons). llvm-svn: 58622
-
Douglas Gregor authored
reference-collapsing. Implement diagnostic for formation of a reference to cv void. Drop cv-qualifiers added to a reference type when the reference type comes from a typedef. llvm-svn: 58612
-
- Nov 02, 2008
-
-
Sebastian Redl authored
llvm-svn: 58570
-
- Oct 31, 2008
-
-
Douglas Gregor authored
llvm-svn: 58538
-
Douglas Gregor authored
conversions. Notes: - Overload resolution for converting constructors need to prohibit user-defined conversions (hence, the test isn't -verify safe yet). - We still use hacks for conversions from a class type to itself. This will be the case until we start implicitly declaring the appropriate special member functions. (That's next on my list) llvm-svn: 58513
-
Sebastian Redl authored
llvm-svn: 58509
-
Sanjiv Gupta authored
etc more generic. For some targets, long may not be equal to pointer size. For example: PIC16 has int as i16, ptr as i16 but long as i32. Also fixed a few build warnings in assert() functions in CFRefCount.cpp, CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp. llvm-svn: 58501
-
Douglas Gregor authored
Notes: - Constructors are never found by name lookup, so they'll never get pushed into any scope. Instead, they are stored as an OverloadedFunctionDecl in CXXRecordDecl for easy overloading. - There's a new action isCurrentClassName that determines whether an identifier is the name of the innermost class currently being defined; we use this to identify the declarator-id grammar rule that refers to a type-name. - MinimalAction does *not* support parsing constructors. - We now handle virtual and explicit function specifiers. llvm-svn: 58499
-
- Oct 30, 2008
-
-
Douglas Gregor authored
llvm-svn: 58404
-
- Oct 29, 2008
-
-
Douglas Gregor authored
- Allows definitions of overloaded functions :) - Eliminates extraneous error messages when we have a definition of a function that isn't an overload but doesn't have exactly the same type as the original. llvm-svn: 58382
-
Douglas Gregor authored
llvm-svn: 58381
-
Douglas Gregor authored
Temporary disable the const-object-declaration-without-initializer check, because it depends on linkage-specifier semantics we don't yet have llvm-svn: 58377
-
Douglas Gregor authored
ImplicitConversionSequence and, when doing so, following the specific rules of [over.best.ics]. The computation of the implicit conversion sequences implements C++ [over.ics.ref], but we do not (yet) have ranking for implicit conversion sequences that use reference binding. llvm-svn: 58357
-
Douglas Gregor authored
of copy initialization. Other pieces of the puzzle: - Try/Perform-ImplicitConversion now handles implicit conversions that don't involve references. - Try/Perform-CopyInitialization uses CheckSingleAssignmentConstraints for C. PerformCopyInitialization is now used for all argument passing and returning values from a function. - Diagnose errors with declaring references and const values without an initializer. (Uses a new Action callback, ActOnUninitializedDecl). We do not yet have implicit conversion sequences for reference binding, which means that we don't have any overloading support for reference parameters yet. llvm-svn: 58353
-
- Oct 28, 2008
-
-
Douglas Gregor authored
llvm-svn: 58331
-
Douglas Gregor authored
- Do not allow expressions to ever have reference type - Extend Expr::isLvalue to handle more cases where having written a reference into the source implies that the expression is an lvalue (e.g., function calls, C++ casts). - Make GRExprEngine::VisitCall treat the call arguments as lvalues when they are being bound to a reference parameter. llvm-svn: 58306
-
Daniel Dunbar authored
llvm-svn: 58304
-
- Oct 27, 2008
-
-
Daniel Dunbar authored
llvm-svn: 58281
-
Douglas Gregor authored
- CastExpr is the root of all casts - ImplicitCastExpr is (still) used for all explicit casts - ExplicitCastExpr is now the root of all *explicit* casts - ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++ - CXXFunctionalCastExpr inherits from ExplicitCastExpr - CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all of the C++ named cast expression types (static_cast, dynamic_cast, etc.) - Added classes CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, and CXXConstCastExpr to Also, fixed returned-stack-addr.cpp, which broke once when we fixed reinterpret_cast to diagnose double->int* conversions and again when we eliminated implicit conversions to reference types. The fix is in both testcase and SemaChecking.cpp. Most of this patch is simply support for the renaming. There's very little actual change in semantics. llvm-svn: 58264
-
Steve Naroff authored
This simplifies debug of this particular diagnostic (and removes some code clutter). llvm-svn: 58242
-
rdar://problem/6315646Steve Naroff authored
Fix <rdar://problem/6315646> clang on xcode: error: invalid operands to binary expression ('id<NSTableViewDelegate>' and 'XCExtendedArrayController *'). There is still a bug here (as the FIXME in the test case indicates). Prior to this patch, the bug would generate an error. Now, we simply do nothing (which is less harmful until we can get it right). The complete bug fix will require changing ASTContext::mergeTypes(), which I'd like to defer for now. llvm-svn: 58241
-
Chris Lattner authored
llvm-svn: 58218
-
Chris Lattner authored
support as far as I know. llvm-svn: 58217
-
- Oct 26, 2008
-
-
Argyrios Kyrtzidis authored
Don't give a default argument to ASTContext::getFunctionType for the TypeQuals parameter, it causes subtle bugs where TypeQuals, while necessary, are omitted from the call. -Remove the default argument. -Update all call sites of ASTContext::getFunctionType. llvm-svn: 58187
-
Oscar Fuentes authored
must be under the `tools' subdirectory of the LLVM *source* tree. llvm-svn: 58180
-
- Oct 24, 2008
-
-
Argyrios Kyrtzidis authored
-Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier. llvm-svn: 58120
-
Douglas Gregor authored
llvm-svn: 58100
-
Douglas Gregor authored
llvm-svn: 58096
-
Douglas Gregor authored
llvm-svn: 58094
-
Douglas Gregor authored
conversions. Added PerformImplicitConversion, which follows an implicit conversion sequence computed by TryCopyInitialization and actually performs the implicit conversions, including the extra check for ambiguity mentioned above. llvm-svn: 58071
-
Daniel Dunbar authored
created with LHS and RHS whose types didn't match. llvm-svn: 58049
-