summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Provide a specific diagnostic when trying to redefine an "externDouglas Gregor2010-09-071-1/+6
| | | | | | | inline" function outside of GNU89 mode. Fixes <rdar://problem/6880464>. llvm-svn: 113204
* It's OK for classes to have flexible array elements (but not unions).Anders Carlsson2010-09-031-1/+1
| | | | llvm-svn: 113018
* Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.John McCall2010-09-031-2/+0
| | | | llvm-svn: 112945
* Static local variables don't result in global constructors being emitted.Anders Carlsson2010-09-031-2/+2
| | | | llvm-svn: 112933
* Fix a regression that allowed clearly ill formed code. The diagnostic is stillChandler Carruth2010-08-311-0/+2
| | | | | | terrible, FIXME left to do a proper job of diagnosing this. llvm-svn: 112581
* Rename DeclContext::getLookupContext to getRedeclContext and change its ↵Sebastian Redl2010-08-311-13/+11
| | | | | | 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
* Add redeclaration checking for static data members and fix a cornerDouglas Gregor2010-08-301-3/+22
| | | | | | | case with redeclaration checking for fields, from Faisal Vali! Fixes PR7970. llvm-svn: 112476
* Fix the memory leak of FloatingLiteral/IntegerLiteral.Argyrios Kyrtzidis2010-08-281-2/+1
| | | | | | | | | | | 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
* Miscellaneous found by inspection with John and SebastianDouglas Gregor2010-08-271-20/+18
| | | | llvm-svn: 112315
* One who seeks knowledge learns something new every day.John McCall2010-08-261-9/+1
| | | | | | | | | 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
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-57/+57
| | | | | | 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-3/+3
| | | | | | to the new constants. llvm-svn: 112047
* More incremental progress towards not including Expr.h in Sema.h.John McCall2010-08-251-1/+1
| | | | llvm-svn: 112044
* Split FunctionScopeInfo and BlockScopeInfo into their own header.John McCall2010-08-251-10/+14
| | | | llvm-svn: 112038
* Remove Sema.h's dependency on DeclCXX.h.John McCall2010-08-251-0/+1
| | | | llvm-svn: 112032
* Remove AnalysisBasedWarnings.h's dependency on Type.hJohn McCall2010-08-251-5/+3
| | | | llvm-svn: 112027
* It turns out that this template is only instantiated at one type.John McCall2010-08-241-0/+20
| | | | llvm-svn: 111908
* More header elimination. The goal of all this is to allow Parser toJohn McCall2010-08-241-0/+13
| | | | | | | #include Sema.h while keeping all the AST declarations opaque. That may not be reasonably attainable, though. llvm-svn: 111907
* Struggle mightily against header inclusion in Sema.h.John McCall2010-08-241-0/+5
| | | | llvm-svn: 111904
* OwningExprResult -> ExprResult. This patch brought to you byJohn McCall2010-08-241-5/+5
| | | | | | | 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-29/+36
| | | | llvm-svn: 111901
* Diagnose the presence of multiple initializations of static dataDouglas Gregor2010-08-241-0/+21
| | | | | | members, from Faisal Vali! Fixes PR6904. llvm-svn: 111900
* Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).John McCall2010-08-231-25/+9
| | | | llvm-svn: 111863
* Handling remaining rule for synthesize bitfields inFariborz Jahanian2010-08-231-0/+42
| | | | | | | | class extensions (nonfragile-abi2).For every class @interface and class extension @interface, if the last ivar is a bitfield of any type, then add an implicit `char :0` ivar to the end of that interface. llvm-svn: 111857
* Support for IRGen of synthesize bitfield ivars inFariborz Jahanian2010-08-231-2/+6
| | | | | | objc-nonfragile-abi2 (radar 7824380). llvm-svn: 111823
* Push DeclGroupRefs and TemplateNames in an opaque but type-safe wayJohn McCall2010-08-231-2/+1
| | | | | | through the parser. llvm-svn: 111800
* Sundry incremental steps towards killing off Action.John McCall2010-08-231-2/+2
| | | | llvm-svn: 111795
* DeclPtrTy -> Decl *John McCall2010-08-211-116/+103
| | | | llvm-svn: 111733
* 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
* Generate Attr subclasses with TableGen.Alexis Hunt2010-08-181-30/+50
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Emit an error if an array is too large. We're slightly more strictDouglas Gregor2010-08-181-12/+39
| | | | | | | | | | | | | than GCC 4.2 here when building 32-bit (where GCC will allow allocation of an array for which we can't get a valid past-the-end pointer), and emulate its odd behavior in 64-bit where it only allows 63 bits worth of storage in the array. The former is a correctness issue; the latter is harmless in practice (you wouldn't be able to use such an array anyway) and helps us pass a GCC DejaGNU test. Fixes <rdar://problem/8212293>. llvm-svn: 111338
* StringRef'ication of lots stuff, patch by Peter Davies!Daniel Dunbar2010-08-171-1/+1
| | | | llvm-svn: 111314
* A field of incomplete type is sufficiently disruptive that we should markJohn McCall2010-08-161-1/+4
| | | | | | the record invalid. llvm-svn: 111211
* Emit diagnostic error when the field of an anonymous struct is non trivial.Argyrios Kyrtzidis2010-08-161-21/+42
| | | | llvm-svn: 111158
* Don't warn for the common pattern of disallowing copying:Argyrios Kyrtzidis2010-08-151-12/+30
| | | | | | | | | class S { S(const S&); // DO NOT IMPLEMENT void operator=(const S&); // DO NOT IMPLEMENT }; llvm-svn: 111100
* Commit improved version of 111026 & 111027.Argyrios Kyrtzidis2010-08-151-18/+65
| | | | | | | | | | | | | | | | | | | | Unused warnings for functions: -static functions -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace Unused warnings for variables: -static variables -variables in anonymous namespace -static data members in anonymous namespace -static data members specializations in anonymous namespace Reveals lots of opportunities for dead code removal in llvm codebase that will interest my esteemed colleagues. llvm-svn: 111086
* Revert 111026 & 111027, build breakage.Argyrios Kyrtzidis2010-08-131-46/+18
| | | | llvm-svn: 111036
* The unused warnings extravaganza continues. Warn for:Argyrios Kyrtzidis2010-08-131-5/+19
| | | | | | | | | -static variables -variables in anonymous namespace (fixes rdar://7794535) -static data members in anonymous namespace -static data members specializations in anonymous namespace llvm-svn: 111027
* Expand the unused warnings for functions. Warn for:Argyrios Kyrtzidis2010-08-131-18/+32
| | | | | | | | | | -static function declarations -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace llvm-svn: 111026
* Change Sema's UnusedStaticFuncs to UnusedFileScopedDecls to allow also ↵Argyrios Kyrtzidis2010-08-131-12/+24
| | | | | | | | keeping track of unused file scoped variables. This is only preparation, currently only static function definitions are tracked, as before. llvm-svn: 111025
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-121-3/+3
| | | | llvm-svn: 110945
* Fix a crash on invalid when declaring an implicit member of a class with anJohn McCall2010-08-121-1/+7
| | | | | | invalid destructor. llvm-svn: 110891
* Added locations and type source info for DeclarationName.Abramo Bagnara2010-08-111-76/+112
| | | | llvm-svn: 110860
* Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,Douglas Gregor2010-08-111-0/+39
| | | | | | | | and create separate decl nodes for forward declarations and the definition," which appears to be causing significant Objective-C breakage. llvm-svn: 110803
* Fix redefinition of typedefs of fixable variably-modified array types; shouldEli Friedman2010-08-101-8/+10
| | | | | | fix an issue compiling <windows.h>. llvm-svn: 110651
* - Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for ↵Sebastian Redl2010-08-091-39/+0
| | | | | | | | | | forward declarations and the definition. - Eagerly create ObjCInterfaceTypes for declarations. - The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another. - Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated. llvm-svn: 110610
* Store inheritance paths after CastExprs instead of inside them.John McCall2010-08-071-5/+5
| | | | | | | | | | | | | | | This takes some trickery since CastExpr has subclasses (and indeed, is abstract). Also, smoosh the CastKind into the bitfield from Expr. Drops two words of storage from Expr in the common case of expressions which don't need inheritance paths. Avoids a separate allocation and another word of overhead in cases needing inheritance paths. Also has the advantage of not leaking memory, since destructors for AST nodes are never run. llvm-svn: 110507
* Make sure that we diagnose attribute((overloadable)) functions withoutDouglas Gregor2010-08-061-19/+15
| | | | | | prototypes. Fixes PR7738. llvm-svn: 110443
* Template keyword should not be ignored building a QualifiedTemplateName.Abramo Bagnara2010-08-061-1/+2
| | | | llvm-svn: 110441
OpenPOWER on IntegriCloud