- Mar 24, 2009
-
-
Douglas Gregor authored
types; add another use of RequireCompleteType. llvm-svn: 67644
-
- Mar 22, 2009
-
-
Sebastian Redl authored
llvm-svn: 67487
-
- Mar 17, 2009
-
-
Sebastian Redl authored
Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. llvm-svn: 67059
-
- Mar 15, 2009
-
-
Sebastian Redl authored
Convert a bunch of actions to smart pointers, and also bring PrintParserCallbacks a bit more in line with reality. llvm-svn: 67029
-
- Mar 09, 2009
-
-
Douglas Gregor authored
Rename DiagnoseIncompleteType to RequireCompleteType, and update the documentation to reflect the fact that we can instantiate templates here llvm-svn: 66421
-
- Feb 28, 2009
-
-
Douglas Gregor authored
llvm-svn: 65671
-
- Feb 07, 2009
-
-
Ted Kremenek authored
- Made allocation of Stmt objects using vanilla new/delete a *compiler error* by making this new/delete "protected" within class Stmt. - Now the only way to allocate Stmt objects is by using the new operator that takes ASTContext& as an argument. This ensures that all Stmt nodes are allocated from the same (pool) allocator. - Naturally, these two changes required that *all* creation sites for AST nodes use new (ASTContext&). This is a large patch, but the majority of the changes are just this mechanical adjustment. - The above changes also mean that AST nodes can no longer be deallocated using 'delete'. Instead, one most do StmtObject->Destroy(ASTContext&) or do ASTContextObject.Deallocate(StmtObject) (the latter not running the 'Destroy' method). Along the way I also... - Made CompoundStmt allocate its array of Stmt* using the allocator in ASTContext (previously it used std::vector). There are a whole bunch of other Stmt classes that need to be similarly changed to ensure that all memory allocated for ASTs comes from the allocator in ASTContext. - Added a new smart pointer ExprOwningPtr to Sema.h. This replaces the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used 'delete' to free memory instead of a Stmt's 'Destroy' method. Big thanks to Doug Gregor for helping with the acrobatics of making 'new/delete' private and the new smart pointer ExprOwningPtr! llvm-svn: 63997
-
- Jan 29, 2009
-
-
Chris Lattner authored
redundant #includes. Patch by Anders Johnsen! llvm-svn: 63271
-
- Jan 28, 2009
-
-
Sebastian Redl authored
Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same. Make a few style corrections as suggested by Chris. llvm-svn: 63215
-
Sebastian Redl authored
llvm-svn: 63150
-
- Jan 27, 2009
-
-
Chris Lattner authored
.def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! llvm-svn: 63111
-
- Jan 26, 2009
-
-
Sebastian Redl authored
llvm-svn: 63055
-
- Jan 19, 2009
-
-
Douglas Gregor authored
new DiagnoseIncompleteType. It provides additional information about struct/class/union/enum types when possible, either by pointing to the forward declaration of that type or by pointing to the definition (if we're in the process of defining that type). Fixes <rdar://problem/6500531>. llvm-svn: 62521
-
- Dec 17, 2008
-
-
Douglas Gregor authored
Delay semantic analysis of the C++ names casts when the subexpression is type-dependent or the destination type is dependent. llvm-svn: 61165
-
- Nov 24, 2008
-
-
Chris Lattner authored
instead of converting them to strings first. This also fixes a bunch of minor inconsistencies in the diagnostics emitted by clang and adds a bunch of FIXME's to DiagnosticKinds.def. llvm-svn: 59948
-
- Nov 20, 2008
-
-
Chris Lattner authored
llvm-svn: 59712
-
- Nov 18, 2008
-
-
Chris Lattner authored
llvm-svn: 59561
-
- Nov 08, 2008
-
-
Sebastian Redl authored
Move named cast helpers out of Sema, as Chris requested. This requirse making a few functions public that weren't before. llvm-svn: 58906
-
Sebastian Redl authored
llvm-svn: 58873
-
- Nov 06, 2008
-
-
Sebastian Redl authored
llvm-svn: 58804
-
- Nov 05, 2008
-
-
Sebastian Redl authored
llvm-svn: 58770
-
Sebastian Redl authored
llvm-svn: 58769
-
Sebastian Redl authored
llvm-svn: 58762
-
Douglas Gregor authored
for constructor initializations, e.g., class A { }; class B : public A { int m; public: B() : A(), m(17) { }; }; llvm-svn: 58749
-
- 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
Create a new expression class, CXXThisExpr, to handle the C++ 'this' primary expression. Remove CXXThis from PredefinedExpr llvm-svn: 58695
-
- Nov 03, 2008
-
-
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
-
- Nov 02, 2008
-
-
Sebastian Redl authored
llvm-svn: 58570
-
- Oct 31, 2008
-
-
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
-
- Oct 29, 2008
-
-
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
- 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
-
- Oct 27, 2008
-
-
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
-
- Oct 24, 2008
-
-
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
-
- Oct 07, 2008
-
-
Argyrios Kyrtzidis authored
llvm-svn: 57220
-
- Sep 12, 2008
-
-
Douglas Gregor authored
Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character llvm-svn: 56137
-
- Sep 10, 2008
-
-
Argyrios Kyrtzidis authored
Implement Sema support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for). llvm-svn: 56044
-