summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add constructor used to initialize base/member inFariborz Jahanian2009-07-231-5/+20
| | | | | | | CXXBaseOrMemberInitializer AST node. Needed by its clients to do the initialization. llvm-svn: 76826
* Fix some memory allocation/deallocation issuesDouglas Gregor2009-07-221-2/+2
| | | | llvm-svn: 76783
* "This patch implements the restrictions on union members detailed inDouglas Gregor2009-07-221-28/+29
| | | | | | [class.union]p1", from John McCall! llvm-svn: 76766
* Allocate BaseOrMemberInitializers and CXXBaseSpecifier nodesFariborz Jahanian2009-07-221-6/+6
| | | | | | via ASTContext. llvm-svn: 76758
* Patch to accomodate Doug's comment on defaultFariborz Jahanian2009-07-211-5/+1
| | | | | | destruction of base/members for each destructor AST. llvm-svn: 76663
* Misc fixes for -Wreorder:Eli Friedman2009-07-211-23/+39
| | | | | | | | | 1. Make it work correctly with anonymous unions. 2. Don't compute it if the warning isn't enabled. 3. Optimize the algorithm slightly to make it linear time in the case where we don't produce any warnings. llvm-svn: 76630
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-27/+27
| | | | | | | | | until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. llvm-svn: 76193
* Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek2009-07-171-21/+21
| | | | | | Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. llvm-svn: 76139
* Replace Type::getAsReferenceType() with Type::getAs<ReferenceType>().Ted Kremenek2009-07-171-3/+3
| | | | llvm-svn: 76132
* Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.Ted Kremenek2009-07-161-3/+3
| | | | | | | | | | | | | | | | | | | | | This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
* Added ASTs to destructor decl AST for default destruction of object'sFariborz Jahanian2009-07-151-4/+7
| | | | | | base/members. llvm-svn: 75849
* Patch to build AST for ctor's initializer list according toFariborz Jahanian2009-07-141-0/+11
| | | | | | semantics of order of construction [class.init]. llvm-svn: 75649
* Patch to build list of inherited virtual base classes Fariborz Jahanian2009-07-101-2/+12
| | | | | | | | in their order of construction for each class and use it to to check on propery order of base class construction under -Wreorder option. llvm-svn: 75270
* Sema check on out of order object initialization ofFariborz Jahanian2009-07-091-1/+68
| | | | | | class object's base and members under -Wreorder flag. llvm-svn: 75168
* Use getDeclName in DefineImplicitOverloadedAssign as well.Anders Carlsson2009-07-091-4/+4
| | | | llvm-svn: 75152
* Pass the DeclName to the diagnostic builder so that member names will be ↵Anders Carlsson2009-07-091-2/+2
| | | | | | quoted correctly. llvm-svn: 75150
* Implement checking of exception spec compatibility for overriding virtual ↵Sebastian Redl2009-07-071-1/+12
| | | | | | functions. llvm-svn: 74943
* Catch function redeclarations with incompatible exception specifications.Sebastian Redl2009-07-041-0/+6
| | | | llvm-svn: 74787
* Patch to allocate list of bases in CXXRecordDeclFariborz Jahanian2009-07-021-1/+1
| | | | | | using ASTContxt allocation. llvm-svn: 74717
* Use Destroy for member initializer list clean up.Fariborz Jahanian2009-07-011-1/+6
| | | | | | Per Doug's comments. Doug please review. llvm-svn: 74666
* Patch to implement template types in ctor-initializer list.Fariborz Jahanian2009-07-011-3/+5
| | | | | | Also has fix for bugzilla-4469. llvm-svn: 74631
* Patch to support optional nested-name-specifier in in ctor-initializerFariborz Jahanian2009-06-301-15/+17
| | | | | | list. llvm-svn: 74571
* Diagnose multiple initialization of anonymous unionFariborz Jahanian2009-06-301-1/+8
| | | | | | fields in the ctor-initializer list. llvm-svn: 74554
* More diagnostics related to initialization of direct basesFariborz Jahanian2009-06-301-0/+9
| | | | | | in ctor-initializer list. llvm-svn: 74541
* Compute ending of iterator in for-loop once.Fariborz Jahanian2009-06-301-16/+12
| | | | llvm-svn: 74533
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-301-30/+29
| | | | | | | Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
* Take care of Chris's comments.Fariborz Jahanian2009-06-301-14/+15
| | | | llvm-svn: 74486
* A more detailed diagnosis of ill-formed ctor-initializerFariborz Jahanian2009-06-301-8/+15
| | | | | | list. llvm-svn: 74480
* Diagnose multiple initialzation of data-member/base Fariborz Jahanian2009-06-291-0/+18
| | | | | | in the ctor-initializer list. More to come. llvm-svn: 74465
* Renamed MarcDestructorReferenced -> MarkDestructorReferencedFariborz Jahanian2009-06-271-2/+2
| | | | llvm-svn: 74386
* Fix a bogus error overloading an operator where the only class Eli Friedman2009-06-271-2/+3
| | | | | | parameter has a dependent type. llvm-svn: 74380
* Make it possible for using decls to point to operators. Fixes PR4441.Anders Carlsson2009-06-271-3/+9
| | | | llvm-svn: 74362
* Patch to mark destructors when they are used.Fariborz Jahanian2009-06-261-2/+65
| | | | llvm-svn: 74359
* Minor change per Doug's comments.Fariborz Jahanian2009-06-261-2/+4
| | | | | | - Fariborz llvm-svn: 74287
* Improved semantic analysis and AST respresentation for functionDouglas Gregor2009-06-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | templates. For example, this now type-checks (but does not instantiate the body of deref<int>): template<typename T> T& deref(T* t) { return *t; } void test(int *ip) { int &ir = deref(ip); } Specific changes/additions: * Template argument deduction from a call to a function template. * Instantiation of a function template specializations (just the declarations) from the template arguments deduced from a call. * FunctionTemplateDecls are stored directly in declaration contexts and found via name lookup (all forms), rather than finding the FunctionDecl and then realizing it is a template. This is responsible for most of the churn, since some of the core declaration matching and lookup code assumes that all functions are FunctionDecls. llvm-svn: 74213
* Patch to diagnose and Mark use of implicit default assignment operator.Fariborz Jahanian2009-06-251-0/+88
| | | | llvm-svn: 74205
* Explicit braces to avoid ambiguous ‘else’.Duncan Sands2009-06-251-1/+2
| | | | llvm-svn: 74171
* Some changes to accomodate Doug's comment forFariborz Jahanian2009-06-231-12/+7
| | | | | | implicit copy constructor definition determination. llvm-svn: 74025
* patch to mark use of implicit copy constructors.Fariborz Jahanian2009-06-221-3/+45
| | | | llvm-svn: 73922
* Robustify a bunch of C++-related declaration actions.Douglas Gregor2009-06-221-2/+32
| | | | llvm-svn: 73918
* Implement implicit instantiation of the member functions of a class templateDouglas Gregor2009-06-221-0/+1
| | | | | | | specialization. At present, all implicit instantiations occur at the end of the translation unit. llvm-svn: 73915
* Changes made per Doug's comments.Fariborz Jahanian2009-06-221-5/+5
| | | | llvm-svn: 73897
* Remove ImplicitMustBeDefined, use universal 'Used' flagFariborz Jahanian2009-06-221-7/+4
| | | | | | instead. Do the implicit default ctor checking in MarkDeclarationReferenced. llvm-svn: 73888
* Made improvements in c++'s object model patch on Doug's review.Fariborz Jahanian2009-06-201-9/+10
| | | | llvm-svn: 73833
* Parsing and AST support for using declarations, from John Thompson!Douglas Gregor2009-06-201-0/+37
| | | | llvm-svn: 73812
* Keep track of when declarations are "used" according to C andDouglas Gregor2009-06-191-2/+2
| | | | | | | | | | | | C++. This logic is required to trigger implicit instantiation of function templates and member functions of class templates, which will be implemented separately. This commit includes support for -Wunused-parameter, printing warnings for named parameters that are not used within a function/Objective-C method/block. Fixes <rdar://problem/6505209>. llvm-svn: 73797
* Patch for implementation of C++'s object model. This isFariborz Jahanian2009-06-191-1/+78
| | | | | | work in progress. llvm-svn: 73782
* Factor out some common code into ↵Argyrios Kyrtzidis2009-06-171-14/+2
| | | | | | Sema::EnterDeclaratorContext/ExitDeclaratorContext. llvm-svn: 73655
* Implement correct name lookup inside an initializer of a C++ class static ↵Argyrios Kyrtzidis2009-06-171-0/+55
| | | | | | | | data member. Fixes "test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp" test case. llvm-svn: 73652
* Removed deadcode related to addition of constructorFariborz Jahanian2009-06-171-5/+0
| | | | | | decls to a class. llvm-svn: 73650
OpenPOWER on IntegriCloud