- Nov 04, 2008
-
-
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
-
- 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
-
- 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
-
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
llvm-svn: 58381
-
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 23, 2008
-
-
Douglas Gregor authored
llvm-svn: 58040
-
- Oct 22, 2008
-
-
Douglas Gregor authored
Factored the QualTypeOrdering predicate into its own header (TypeOrdering.h), now that it is used in two places. llvm-svn: 58001
-
Douglas Gregor authored
don't have duplicated direct base classes. Seriliazation of base class specifiers is not yet implemented. llvm-svn: 57991
-
- Oct 21, 2008
-
-
Douglas Gregor authored
llvm-svn: 57909
-
- Oct 15, 2008
-
-
Argyrios Kyrtzidis authored
typedef int f(); struct S { f *x; // incorrectly assuming this is function decl, leading to failed assertions. }; llvm-svn: 57598
-
- Oct 14, 2008
-
-
Argyrios Kyrtzidis authored
llvm-svn: 57514
-
Argyrios Kyrtzidis authored
llvm-svn: 57511
-
- Oct 09, 2008
-
-
Argyrios Kyrtzidis authored
class C { static const int number = 50; static int arr[number]; }; Here's how it worked: -GetTypeForDeclarator was called from both Sema::ActOnCXXMemberDeclarator and Sema::ActOnDeclarator. -VariableArrayTypes are not uniqued so two VariableArrayTypes were created with the same DeclRefExpr. -On exit they both tried to destroy that one DeclRefExpr. The fix is not to use GetTypeForDeclarator from the Sema::ActOnCXXMemberDeclarator. llvm-svn: 57313
-
- Oct 07, 2008
-
-
Argyrios Kyrtzidis authored
Simplify handling of direct initializers by letting Sema::AddInitializerToDecl handle conversions, instead of using Sema::ActOnCXXTypeConstructExpr. Additional benefit is that diagnostics are the same for both direct-initialization and copy-initialization. In the case of "int x( expression );": -The Init expression of VarDecl 'x' will be the expression inside the parentheses. -VarDecl::hasCXXDirectInitializer for VarDecl 'x' will return true to let clients distinguish from "int x = expression ;". llvm-svn: 57219
-
- Oct 06, 2008
-
-
Ted Kremenek authored
Use "unsigned" instead of "int" for i to remove a "comparison between unsigned and signed" warning (potential integer overflow). llvm-svn: 57201
-
Argyrios Kyrtzidis authored
Add a FIXME until class constructors are supported. llvm-svn: 57188
-
Argyrios Kyrtzidis authored
This is how this kind of initializers appear in the AST: -The Init expression of the VarDecl is a functional type construction (of the VarDecl's type). -The new VarDecl::hasCXXDirectInitializer() returns true. e.g, for "int x(1);": -VarDecl 'x' has Init with expression "int(1)" (CXXFunctionalCastExpr). -hasCXXDirectInitializer() of VarDecl 'x' returns true. A major benefit is that clients that don't particularly care about which exactly form was the initializer can handle both cases without special case code. Note that codegening works now for "int x(1);" without any changes to CodeGen. llvm-svn: 57178
-
- Oct 03, 2008
-
-
Daniel Dunbar authored
llvm-svn: 56992
-
- Sep 10, 2008
-
-
Argyrios Kyrtzidis authored
llvm-svn: 56042
-
- Aug 11, 2008
-
-
Daniel Dunbar authored
- Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. llvm-svn: 54632
-
Daniel Dunbar authored
- Drop TokenKinds.h from Action.h - Move DeclSpec.h from Sema.h into individual Sema .cpp files llvm-svn: 54625
-
- Aug 09, 2008
-
-
Argyrios Kyrtzidis authored
at which point the C++ struct/class/union is fully parsed. llvm-svn: 54569
-
Argyrios Kyrtzidis authored
Passing right brace location to ActOnFinishCXXClassDef is redundant, since it gets passed to ActOnFinishCXXMemberSpecification too. llvm-svn: 54567
-
- Aug 05, 2008
-
-
Daniel Dunbar authored
ActOnDeclarator. llvm-svn: 54353
-
Daniel Dunbar authored
- ActOnDeclarator now takes an additional parameter which is the AsmLabel if used. Its unfortunate that this bubbles up this high, but we cannot just lump it in as an attribute without mistakenly *accepting* it as an attribute. - The actual asm-label itself is, however, encoded as an AsmLabelAttr on the FunctionDecl. - Slightly improved parser error recovery on malformed asm-labels. - CodeGen support still missing... llvm-svn: 54339
-
- Aug 01, 2008
-
-
Argyrios Kyrtzidis authored
No functionality change. llvm-svn: 54265
-
- Jul 27, 2008
-
-
Chris Lattner authored
ASTContext::getCanonicalType instead (PR2189) llvm-svn: 54105
-
- Jul 01, 2008
-
-
Argyrios Kyrtzidis authored
llvm-svn: 52956
-
- Jun 10, 2008
-
-
Argyrios Kyrtzidis authored
Added TagKind enum. Added getTagKind() method. Added convenience methods: isEnum(), isStruct(), isUnion(), isClass(). -RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one. llvm-svn: 52160
-
- Jun 06, 2008
-
-
Steve Naroff authored
llvm-svn: 52025
-
rdar://problem/5986085Steve Naroff authored
Second half of "fix" for <rdar://problem/5986085> clang on xcode: error: redefinition of 'XCElementToggler' as different kind of symbol llvm-svn: 52024
-
- May 29, 2008
-
-
Steve Naroff authored
- #include ExprObjC.h in many places llvm-svn: 51703
-