summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Objective-C++ Sema - Allow static_cast of one objc pointer toFariborz Jahanian2010-05-121-1/+5
| | | | | | another. llvm-svn: 103630
* Whenever we instantiate a function definition or class, enter a newDouglas Gregor2010-05-122-0/+4
| | | | | | | potentially-evaluated expression context, to ensure that used declarations get properly marked. Fixes PR7123. llvm-svn: 103624
* When we emit an error during the implicit definition of a specialDouglas Gregor2010-05-122-5/+41
| | | | | | | | member function (default constructor, copy constructor, copy assignment operator, destructor), emit a note showing where that implicit definition was required. llvm-svn: 103619
* Improve commentary on the indirect-goto jump scope checker and extractJohn McCall2010-05-121-69/+76
| | | | | | a convenience routine to find the innermost common ancestor of two scopes. llvm-svn: 103565
* When checking scopes for indirect goto, be more permissive (but still safe)John McCall2010-05-121-70/+249
| | | | | | | | | | | | | | | | | | | | | | | | | about the permitted scopes. Specifically: 1) Permit labels and gotos to appear after a prologue of variable initializations. 2) Permit indirect gotos to jump out of scopes that don't require cleanup. 3) Diagnose possible attempts to indirect-jump out of scopes that do require cleanup. This requires a substantial reinvention of the algorithm for checking indirect goto. The current algorithm is Omega(M*N), with M = the number of unique scopes being jumped from and N = the number of unique scopes being jumped to, with an additional factor that is probably (worst-case) linear in the depth of scopes. Thus the entire thing is likely cubic given some truly bizarre ill-formed code; on well-formed code the additional factor collapses to an amortized constant (when amortized over the entire function) and so the algorithm is quadratic. Even this requires every label to appear in its own scope, which would be very unusual for indirect-goto code (and extremely unlikely for well-formed code); it is far more likely that all labels will be in the same scope and so the algorithm becomes linear. For such a marginal feature, I am fairly happy with this result. (this is using JumpDiagnostic's definition of scope, where successive variables in a block appear in their own scope) llvm-svn: 103536
* Use end location of DeclStmt to mark stop point. Devang Patel2010-05-121-1/+4
| | | | | | This is meaningful for blocks. This patch fixes bunch of test failures in gdb testsuite. llvm-svn: 103533
* Merged Elaborated and QualifiedName types.Abramo Bagnara2010-05-1127-354/+305
| | | | llvm-svn: 103517
* Speculatively revert r103497, "Do not mark the virtual members of anDaniel Dunbar2010-05-113-89/+10
| | | | | | implicitly-instantiated class as ...", which seems to have broken bootstrap. llvm-svn: 103515
* IRgen/i386/C++: Fix isSingleElementStruct computation for C++ record decls.Daniel Dunbar2010-05-111-0/+24
| | | | | | - Fixes PR7098. llvm-svn: 103514
* Do not mark the virtual members of an implicitly-instantiated class asDouglas Gregor2010-05-113-10/+89
| | | | | | | | referenced unless we see one of them defined (or the key function defined, if it as one) or if we need the vtable for something. Fixes PR7114. llvm-svn: 103497
* VISIBILITY_HIDDEN was renamed LLVM_LIBRARY_VISIBILITY.Duncan Sands2010-05-112-33/+33
| | | | llvm-svn: 103494
* It's bad form to create VarDecl's without DeclContextsDouglas Gregor2010-05-111-1/+3
| | | | llvm-svn: 103484
* The C++98/03 standard is disturbingly silent about out-of-scopeDouglas Gregor2010-05-111-3/+12
| | | | | | | | | | explicit instantiations of template. C++0x clarifies the intent (they're ill-formed in some cases; see [temp.explicit] for details). However, one could squint at the C++98/03 standard and conclude they are permitted, so reduce the error to a warning (controlled by -Wc++0x-compat) in C++98/03 mode. llvm-svn: 103482
* Static data members intialized in-class that have constant values areDouglas Gregor2010-05-111-1/+1
| | | | | | | | value-dependent if their initializers are value-dependent; my recent tweak to these dependent rules overstepped by taking away this value-dependents. Fixes a Boost.GIL regression. llvm-svn: 103476
* Minor refactoring of my last patch.Fariborz Jahanian2010-05-111-4/+5
| | | | llvm-svn: 103475
* Fix indentationDouglas Gregor2010-05-111-1/+1
| | | | llvm-svn: 103465
* A DeclRefExpr that refers to a member function or a static data memberDouglas Gregor2010-05-112-4/+25
| | | | | | | | | | | | | | of the current instantiation is value-dependent. The C++ standard fails to enumerate this case and, therefore, we missed it. Chandler did all of the hard work of reducing the last remaining Boost.PtrContainer failure (which had to do with static initialization in the Serialization library) down to this simple little test. While I'm at it, clean up the dependence rules for template arguments that are declarations, and implement the dependence rules for template argument packs. llvm-svn: 103464
* Fixes for compilation with Microsoft Visual Studio 2010, from Steven Watanabe!Douglas Gregor2010-05-112-3/+3
| | | | llvm-svn: 103458
* Initialize Column.Devang Patel2010-05-101-6/+12
| | | | llvm-svn: 103448
* Allow static_cast to objective-c pointers.Fariborz Jahanian2010-05-101-2/+3
| | | | | | Fixes radar 7952457. llvm-svn: 103447
* Refactor the constant-evaluator so that it only supports a single formJohn McCall2010-05-101-62/+80
| | | | | | | | | of constant-evaluation. Formerly you could control whether it accepted local l-values or not; now it always evaluates local l-values in the core routines, but filters them out where consumed by the top-level routines. This will make it much easier to cache evaluability. llvm-svn: 103444
* Objective-C++ Code gen. Handle code gen. for propertyFariborz Jahanian2010-05-102-2/+20
| | | | | | | reference dot-syntax notation in a varierty of cases. Fixes radar 7964490. llvm-svn: 103440
* Allocate most of DeclarationNamesTable using ASTContext's allcocator. The ↵Ted Kremenek2010-05-102-27/+22
| | | | | | | | only things that aren't allocated this way are the internal FoldingSets. llvm-svn: 103429
* Start converting pieces of DeclarationNameTable to be allocated using ↵Ted Kremenek2010-05-102-5/+16
| | | | | | | | | | ASTContext's allocator. While DeclarationNameTable doesn't leak, it uses 'malloc' too often. Start with having 'CXXLiteralOperatorNames' allocated using ASTContext's allocator and add a 'DoDestroy()' method to DeclarationNameTable that is called by ~ASTContext. llvm-svn: 103426
* Convert CXXTempory[] in CXXExprWithTemporaries to be allocated using ↵Ted Kremenek2010-05-102-11/+10
| | | | | | ASTContext's allocator. Fixes <rdar://problem/7961605>. llvm-svn: 103421
* Improved -ast-print-xml for C++, from Sebastien Binet!Douglas Gregor2010-05-102-4/+72
| | | | llvm-svn: 103412
* If variable location is invalid then use current location.Devang Patel2010-05-101-1/+3
| | | | | | This fixes radar 7959934. llvm-svn: 103408
* Fix refacto in r103387, noticed by Christopher Jefferson.Daniel Dunbar2010-05-101-1/+1
| | | | llvm-svn: 103406
* Add an UpdateVBases parameter to UpdateEmptyClassOffsets. Not used just yet.Anders Carlsson2010-05-102-8/+13
| | | | llvm-svn: 103403
* More work on handling empty classes.Anders Carlsson2010-05-102-9/+16
| | | | llvm-svn: 103402
* pch'ify CXXNewExpr and CXXZeroInitValueExprChris Lattner2010-05-103-7/+100
| | | | llvm-svn: 103390
* fix refactor-oChris Lattner2010-05-101-1/+1
| | | | llvm-svn: 103388
* pchify CXXTemporary, CXXBindTemporaryExpr, and Chris Lattner2010-05-105-8/+81
| | | | | | CXXExprWithTemporaries. llvm-svn: 103387
* pch'ify default argument definitions and uses.Chris Lattner2010-05-093-4/+34
| | | | llvm-svn: 103376
* pch'ify 'this' and 'throw'Chris Lattner2010-05-092-0/+36
| | | | llvm-svn: 103375
* pch'ify typeid.Chris Lattner2010-05-092-0/+33
| | | | llvm-svn: 103374
* pchify CXXMemberCallExpr correctly. Before it would serializeChris Lattner2010-05-092-0/+10
| | | | | | | and deserialize as a CallExpr which is close, but ends up deserializing with the wrong stmt class. llvm-svn: 103371
* Cleanup.Anders Carlsson2010-05-091-5/+5
| | | | llvm-svn: 103370
* Be more careful about picking a template parameter when we fail to ↵Douglas Gregor2010-05-091-2/+4
| | | | | | substitute explicit template arguments into a function template llvm-svn: 103369
* Tweaked selector mangling again (GNU runtime).David Chisnall2010-05-091-6/+17
| | | | llvm-svn: 103368
* Fix a silly bootstrap-breaking thinko, where we were trying to convertDouglas Gregor2010-05-081-20/+28
| | | | | | | non-existent condition expressions to boolean values during template instantiation. llvm-svn: 103364
* Actually compute the empty subobject sizes. No functionality change yet.Anders Carlsson2010-05-082-4/+60
| | | | llvm-svn: 103363
* Improve our handling of the -Wunused-variable warning in templates. InDouglas Gregor2010-05-083-17/+30
| | | | | | | | | particular, don't complain about unused variables that have dependent type until instantiation time, so that we can look at the type of the variable. Moreover, only complain about unused variables that have neither a user-declared constructor nor a non-trivial destructor. llvm-svn: 103362
* Don't complain about an __builtin_va_arg expression's result beingDouglas Gregor2010-05-082-0/+2
| | | | | | unused, since the operation has side effects. llvm-svn: 103360
* Add a SizeOfLargestEmptySubobject member to ASTRecordLayout. For C++ classes ↵Anders Carlsson2010-05-083-11/+20
| | | | | | this will hold the largest empty subobject or 0 if the class doesn't have any empty subobjects. llvm-svn: 103359
* When instantiating statements that involve conditions (if, while, do,Douglas Gregor2010-05-081-51/+58
| | | | | | | | | | | | | for, and switch), be careful to construct the full expressions as soon as we perform template instantation, so we don't either forget to call temporary destructors or destroy temporaries at the wrong time. This is the template-instantiation analogue to r103187, during which I hadn't realized that the issue would affect the handling of these constructs differently inside and outside of templates. Fixes a regression in Boost.Function. llvm-svn: 103357
* Fixed linkage problem from last commit (GNU runtime).David Chisnall2010-05-081-2/+2
| | | | llvm-svn: 103355
* Tweaked selector generation (GNU runtime). Removed the use of GlobalAliases ↵David Chisnall2010-05-081-9/+15
| | | | | | in the generated bitcode. llvm-svn: 103353
* Don't destroy the data associated with an overload resolution candidate; ↵Douglas Gregor2010-05-081-7/+1
| | | | | | it's ASTContext-allocated now llvm-svn: 103350
* Record template argument deduction failures for member functionDouglas Gregor2010-05-081-11/+28
| | | | | | templates and conversion function templates. llvm-svn: 103349
OpenPOWER on IntegriCloud