summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Temporarily revert 114929 114925 114924 114921. It looked like they (or at leastBill Wendling2010-09-281-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | one of them) was causing a series of failures: http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518 svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114929 into '.': U include/clang/Sema/Sema.h U include/clang/AST/DeclCXX.h U lib/Sema/SemaDeclCXX.cpp U lib/Sema/SemaTemplateInstantiateDecl.cpp U lib/Sema/SemaDecl.cpp U lib/Sema/SemaTemplateInstantiate.cpp U lib/AST/DeclCXX.cpp svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114925 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/AST/DeclCXX.cpp svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114924 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/Sema/SemaDecl.cpp G lib/AST/DeclCXX.cpp U lib/AST/ASTContext.cpp svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114921 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/Sema/SemaDecl.cpp G lib/AST/DeclCXX.cpp llvm-svn: 114933
* Centralize the management of CXXRecordDecl::DefinitionData'sDouglas Gregor2010-09-281-45/+0
| | | | | | | | | | | HasTrivialConstructor, HasTrivialCopyConstructor, HasTrivialCopyAssignment, and HasTrivialDestructor bits in CXXRecordDecl's methods. This completes all but the Abstract bit and the set of conversion functions, both of which will require a bit of extra work. The majority of <rdar://problem/8459981> is now implemented (but not all of it). llvm-svn: 114929
* Centralize the management of CXXRecordDecl::DefinitionData'sDouglas Gregor2010-09-271-6/+0
| | | | | | | Polymorphic bit in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>. llvm-svn: 114925
* Centralize the management of CXXRecordDecl::DefinitionData's Empty bitDouglas Gregor2010-09-271-10/+0
| | | | | | in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>. llvm-svn: 114924
* Centralize the management of CXXRecordDecl::DefinitionData's AggregateDouglas Gregor2010-09-271-8/+0
| | | | | | | and PlainOldData bits in CXXRecordDecl itself. Another milepost on the road toward <rdar://problem/8459981>. llvm-svn: 114921
* Centralize the handling of CXXRecordDecl::DefinitionData'sDouglas Gregor2010-09-271-1/+0
| | | | | | | DeclaredDestructor and UserDeclaredDestructor bits in CXXRecordDecl itself. Another step on the road to <rdar://problem/8459981>. llvm-svn: 114918
* Kill FunctionDecl's IsCopyAssignment bit; it duplicated what couldDouglas Gregor2010-09-271-1/+0
| | | | | | | | already be determined by isCopyAssignmentOperator(), and was set too late in the process for all clients to see the appropriate value. Cleanup only; no functionality change. llvm-svn: 114916
* Centralize the handling ofDouglas Gregor2010-09-271-10/+0
| | | | | | | CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for copy-assignment operators. Another step toward <rdar://problem/8459981>. llvm-svn: 114899
* Clean up the handling of the DeclaredDefaultConstructor andDouglas Gregor2010-09-271-9/+0
| | | | | | | | | | | | | DeclaredCopyConstructor bits in CXXRecordDecl's DefinitionData structure. Rather than having Sema call addedConstructor or set the bits directly at semi-random places, move all of the logic for managing these bits into CXXRecordDecl itself and tie the addedConstructor call into DeclContext::addDecl(). This makes it easier for AST-building clients to get the right bits set in DefinitionData, and is one small part of <rdar://problem/8459981>. llvm-svn: 114889
* Patch implements passing arrays to functions expectingFariborz Jahanian2010-09-241-1/+2
| | | | | | vla. Implements pr7827. llvm-svn: 114737
* Do not warn with -Wuninitialized when the member is used in a sizeof or ↵Argyrios Kyrtzidis2010-09-211-0/+8
| | | | | | | | address-of expression. Fixes rdar://8331312. llvm-svn: 114426
* Give implicitly-defined default constructors and destructors emptyDouglas Gregor2010-09-201-3/+10
| | | | | | bodies, from Martin Vejnar! llvm-svn: 114329
* static local variables with destructors don't require a global destructorJohn McCall2010-09-181-1/+2
| | | | | | | | | unless we're on a platform without __cxa_atexit (or use thereof has been disabled). This patch actually just disables the check completely for static locals, but I've filed http://llvm.org/bugs/show_bug.cgi?id=8176 to track the platform-specific fix. llvm-svn: 114269
* one piece of code is responsible for the lifetime of every aggregateJohn McCall2010-09-151-5/+3
| | | | | | | | | | | | | slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly llvm-svn: 113962
* Remove CXXRecordDecl::getDefaultConstructor(), an inherently unsafe function ↵Sebastian Redl2010-09-131-4/+26
| | | | | | due to lazy declaration of default constructors. Now that __has_nothrow_constructor doesn't use it anymore, part of PR8101 is fixed. llvm-svn: 113794
* Fix a typo noted by GaborDouglas Gregor2010-09-131-1/+1
| | | | llvm-svn: 113754
* Don't complain about useless user-defined conversion functions whenDouglas Gregor2010-09-121-1/+4
| | | | | | | they were instantiated from a template. In template metaprogramming, stuff happens. Fixes PR8065. llvm-svn: 113722
* Simplify template instantiation for C++ exception declarations,Douglas Gregor2010-09-091-8/+7
| | | | | | eliminating an unnecessary use of TemporaryBase in the process. llvm-svn: 113500
* Eliminate the comma locations from all of the Sema routines that dealDouglas Gregor2010-09-091-9/+4
| | | | | | | | with comma-separated lists. We never actually used the comma locations, nor did we store them in the AST, but we did manage to waste time during template instantiation to produce fake locations. llvm-svn: 113495
* Don't give 'global constructor' warnings for function statics, even if they ↵Sebastian Redl2010-09-081-1/+1
| | | | | | have a direct initializer. Fixes PR8095. llvm-svn: 113344
* Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.John McCall2010-09-031-2/+0
| | | | llvm-svn: 112945
* Enable inline namespaces in the AST.Sebastian Redl2010-08-311-0/+21
| | | | llvm-svn: 112564
* Rename DeclContext::getLookupContext to getRedeclContext and change its ↵Sebastian Redl2010-08-311-7/+8
| | | | | | semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them. llvm-svn: 112563
* Revert my user-defined literal commits - r1124{58,60,67} pendingAlexis Hunt2010-08-301-3/+0
| | | | | | some issues being sorted out. llvm-svn: 112493
* Implement C++0x user-defined string literals.Alexis Hunt2010-08-291-0/+3
| | | | | | | | | | The extra data stored on user-defined literal Tokens is stored in extra allocated memory, which is managed by the PreprocessorLexer because there isn't a better place to put it that makes sure it gets deallocated, but only after it's used up. My testing has shown no significant slowdown as a result, but independent testing would be appreciated. llvm-svn: 112458
* Fix the memory leak of FloatingLiteral/IntegerLiteral.Argyrios Kyrtzidis2010-08-281-4/+5
| | | | | | | | | | | For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers. Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with the APFloat/APInt values will never get freed. I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral. Fixes rdar://7637185 llvm-svn: 112361
* Parser support for inline namespacesSebastian Redl2010-08-271-0/+1
| | | | llvm-svn: 112320
* One who seeks knowledge learns something new every day.John McCall2010-08-261-16/+13
| | | | | | | | | One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone. llvm-svn: 112244
* Move things around so that Sema.h no longer depends on even DeclBase.h.John McCall2010-08-261-5/+7
| | | | | | It still depends on Type because DeclarationName.h does. llvm-svn: 112177
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-19/+19
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* Split out a header to hold APIs meant for the Sema implementation from Sema.h.John McCall2010-08-251-1/+1
| | | | | | | Clients of Sema don't need to know (for example) the list of diagnostics we support. llvm-svn: 112093
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-11/+7
| | | | | | to the new constants. llvm-svn: 112047
* More incremental progress towards not including Expr.h in Sema.h.John McCall2010-08-251-8/+8
| | | | llvm-svn: 112044
* Remove Sema.h's dependency on DeclCXX.h.John McCall2010-08-251-0/+10
| | | | llvm-svn: 112032
* Remove the DenseSet dependency from Sema.h.John McCall2010-08-251-0/+1
| | | | llvm-svn: 112030
* More header elimination. The goal of all this is to allow Parser toJohn McCall2010-08-241-0/+2
| | | | | | | #include Sema.h while keeping all the AST declarations opaque. That may not be reasonably attainable, though. llvm-svn: 111907
* Remove a header dependency from Sema.h at the cost of some type safety.John McCall2010-08-241-4/+5
| | | | | | If someone wants to fix this some other way.... llvm-svn: 111905
* OwningExprResult -> ExprResult. This patch brought to you byJohn McCall2010-08-241-30/+30
| | | | | | | M-x query-replace-regexp \(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result llvm-svn: 111903
* Abstract out passing around types and kill off ActionBase.John McCall2010-08-241-3/+3
| | | | llvm-svn: 111901
* Diagnose the presence of multiple initializations of static dataDouglas Gregor2010-08-241-0/+19
| | | | | | members, from Faisal Vali! Fixes PR6904. llvm-svn: 111900
* Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).John McCall2010-08-231-84/+69
| | | | llvm-svn: 111863
* Sundry incremental steps towards killing off Action.John McCall2010-08-231-10/+10
| | | | llvm-svn: 111795
* Do not elide copy construction when we're performing base-class initializationDouglas Gregor2010-08-221-0/+1
| | | | llvm-svn: 111783
* DeclPtrTy -> Decl *John McCall2010-08-211-115/+106
| | | | llvm-svn: 111733
* objective-c ivar refactoring patch. IterationsFariborz Jahanian2010-08-201-1/+1
| | | | | | | | over ivars for a varienty of puposes is now consolidated into two small routines; DeepCollectObjCIvars and ShallowCollectObjCIvars. llvm-svn: 111679
* Another step in the process of making the parser depend on Sema:John McCall2010-08-201-2/+2
| | | | | | | | | - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. llvm-svn: 111667
* Revert r111609, which is failing its new test.Douglas Gregor2010-08-201-2/+0
| | | | llvm-svn: 111611
* Detect efforts to declare a template member friend and explicitly ignore them.John McCall2010-08-201-0/+2
| | | | | | Avoids a crash. llvm-svn: 111609
* Fix the source range of an anonymous namespace, from Jan BierbaumDouglas Gregor2010-08-191-2/+3
| | | | llvm-svn: 111561
* Generate Attr subclasses with TableGen.Alexis Hunt2010-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accompanying LLVM commit contains the updates to TableGen necessary for this. Some other notes about newly-generated attribute classes: - The constructor arguments are a SourceLocation and a Context&, followed by the attributes arguments in the order that they were defined in Attr.td - Every argument in Attr.td has an appropriate accessor named getFoo, and there are sometimes a few extra ones (such as to get the length of a variadic argument). Additionally, specific_attr_iterator has been introduced, which will iterate over an AttrVec, but only over attributes of a certain type. It can be accessed through either Decl::specific_attr_begin/end or the global functions of the same name. llvm-svn: 111455
OpenPOWER on IntegriCloud