summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
* Added a flag to identify resolved overloaded function references.Abramo Bagnara2011-10-052-12/+23
| | | | llvm-svn: 141171
* Fix doxygen comment.Eric Christopher2011-10-051-2/+2
| | | | llvm-svn: 141165
* c: assignment/init of a function pointer whose function(s)Fariborz Jahanian2011-10-051-5/+5
| | | | | | | | return to one which does not return (has noreturn attribute) should warn as it is an unsafe assignment. // rdar://10095762 c++ already handles this. This is the c version. llvm-svn: 141141
* Improve location fidelity of objc decls.Argyrios Kyrtzidis2011-10-042-22/+29
| | | | | | | | -Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl. -Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the class name, not the location of '@'. llvm-svn: 141061
* Fixed source range for template implicit instantiations.Abramo Bagnara2011-10-031-9/+21
| | | | llvm-svn: 141018
* Allow getting all source locations of selector identifiers in a ObjCMethodDecl.Argyrios Kyrtzidis2011-10-034-7/+65
| | | | | | | | | | | | | Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: -(id)first:(int)x second:(int)y; -With a space between the arguments: -(id)first: (int)x second: (int)y; -For nullary selectors, immediately before ';': -(void)release; In such cases we infer the locations instead of storing them. llvm-svn: 140989
* Move field in ObjCMessageExpr to avoid padding.Argyrios Kyrtzidis2011-10-031-6/+6
| | | | llvm-svn: 140988
* Allow getting all source locations of selector identifiers in a ObjCMessageExpr.Argyrios Kyrtzidis2011-10-033-43/+165
| | | | | | | | | | | | | Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: [foo first:1 second:2] -With a space between the arguments: [foo first: 1 second: 2] -For nullary selectors, immediately before ']': [foo release] In such cases we infer the locations instead of storing them. llvm-svn: 140987
* ArrayRef'ize ObjCMessageExprArgyrios Kyrtzidis2011-10-031-19/+19
| | | | llvm-svn: 140986
* Add an assertion that we don't overflow the bitfield ObjCMessageExpr::NumArgs.Argyrios Kyrtzidis2011-10-031-3/+6
| | | | llvm-svn: 140985
* Pass from the parser the locations of selector identifiers when creatingArgyrios Kyrtzidis2011-10-032-0/+2
| | | | | | | | objc method decls. They are not stored in the AST yet. llvm-svn: 140984
* Don't keep NumSelectorArgs in the ObjCMethodDecl, the number can be derived ↵Argyrios Kyrtzidis2011-10-032-6/+3
| | | | | | from the selector. llvm-svn: 140983
* Pass all the locations of the selector identifiers for a message expression ↵Argyrios Kyrtzidis2011-10-031-7/+9
| | | | | | | | from the parser. They are not kept in the AST yet. llvm-svn: 140982
* constexpr: semantic checking for constexpr functions and constructors. Based inRichard Smith2011-10-011-22/+12
| | | | | | | | | | | | | part on patches by Peter Collingbourne. We diverge from the C++11 standard in a few areas, mostly related to checking constexpr function declarations, and not just definitions. See WG21 paper N3308=11-0078 for details. Function invocation substitution is not available in this patch; constexpr functions cannot yet be used from within constant expressions. llvm-svn: 140926
* Fix typo.Richard Smith2011-09-301-1/+1
| | | | llvm-svn: 140829
* PR11040: CheckICE should not allow an lvalue bitcast as part of an integer ↵Eli Friedman2011-09-291-4/+10
| | | | | | constant expression. llvm-svn: 140812
* Add support for alignment-specifiers in C1X and C++11, removePeter Collingbourne2011-09-291-1/+1
| | | | | | | support for the C++0x draft [[align]] attribute and add the C1X standard header file stdalign.h llvm-svn: 140796
* objc arc: Diagnose block pointer type mismatch whenFariborz Jahanian2011-09-281-0/+25
| | | | | | | | some arguments types are ns_consumed and some otherwise matching types are not. This is objc side of // rdar://10187884 llvm-svn: 140729
* Introduce Decl::getParentFunctionOrMethod which if the decl is defined insideArgyrios Kyrtzidis2011-09-281-5/+5
| | | | | | a function/method/block it returns the corresponding DeclContext, otherwise it returns null. llvm-svn: 140672
* Only print _Bool as 'bool' when 'bool' is defined as an object-likeDouglas Gregor2011-09-271-6/+0
| | | | | | macro whose only replacement token is '_Bool'. llvm-svn: 140656
* When 'bool' is not a built-in type but is defined as a macro, printDouglas Gregor2011-09-275-17/+23
| | | | | | | 'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. llvm-svn: 140650
* Some changes to improve compatibility for MSVC-style C++ struct layout. ↵Eli Friedman2011-09-272-41/+216
| | | | | | Patch from r4start at gmail.com (with some minor modifications by me). llvm-svn: 140623
* Constant evaluation for pointer CXXScalarValueInitExprPeter Collingbourne2011-09-271-0/+2
| | | | llvm-svn: 140613
* Fix assertion hit when @encoding C++ classes. rdar://10172840 & ↵Argyrios Kyrtzidis2011-09-261-2/+3
| | | | | | http://llvm.org/PR10990 llvm-svn: 140542
* Re-arrange and bitfieldify data members of CXXConstructExpr to save aDouglas Gregor2011-09-261-3/+3
| | | | | | little storage. llvm-svn: 140529
* Move VTable builder to ASTPeter Collingbourne2011-09-262-0/+2405
| | | | llvm-svn: 140510
* Move VTT builder to ASTPeter Collingbourne2011-09-262-0/+213
| | | | llvm-svn: 140501
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-254-20/+20
| | | | llvm-svn: 140478
* Treat list-initialization of scalars as a first-class citizen in C++11.Sebastian Redl2011-09-241-3/+48
| | | | | | | | | Allow empty initializer lists for scalars, which mean value-initialization. Constant evaluation for single-element and empty initializer lists for scalars. Codegen for empty initializer lists for scalars. Test case comes in next commit. llvm-svn: 140459
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-2312-34/+1
| | | | llvm-svn: 140407
* objc-gc: Fix a corner case where clang fails to generate GC Fariborz Jahanian2011-09-231-1/+8
| | | | | | write barrier with captured pointer to object. // rdar://10150823 llvm-svn: 140399
* Fix missing includes for llvm_unreachableDavid Blaikie2011-09-231-0/+1
| | | | llvm-svn: 140368
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-2317-95/+96
| | | | llvm-svn: 140367
* Don't use TemplateArgumentListInfo inside AST nodes because it may leak.Argyrios Kyrtzidis2011-09-224-52/+81
| | | | | | Use ASTTemplateArgumentListInfo instead. llvm-svn: 140331
* Rename ExplicitTemplateArgumentList -> ASTTemplateArgumentListInfo, no ↵Argyrios Kyrtzidis2011-09-223-20/+20
| | | | | | functionality change. llvm-svn: 140330
* Fix the ASTImporter's lookup for anonymous structs/unions that get aDouglas Gregor2011-09-221-2/+2
| | | | | | linkage name via typedef. Patch from/fixes PR10958. llvm-svn: 140317
* ArrayRef-ifying Function/BlockDecl's setParamsDavid Blaikie2011-09-212-14/+13
| | | | llvm-svn: 140268
* Remove redundant break statements, and replace asserts with llvm_unreachablePeter Collingbourne2011-09-201-7/+7
| | | | | | Per John's review comments for r140068. llvm-svn: 140142
* OpenCL: introduce support for function scope __local variablesPeter Collingbourne2011-09-192-7/+9
| | | | llvm-svn: 140068
* Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis2011-09-191-1/+1
| | | | | | It already works (and is useful with) macro locs as well. llvm-svn: 140057
* Fix a QoI bug with overloaded operators inside macros.Matt Beaumont-Gay2011-09-191-1/+4
| | | | | | | | We were failing to set source locations and ranges in isUnusedResultAWarning for CXXOperatorCallExprs, leading to an "expression result unused" warning with absolutely no context if the expression was inside a macro. llvm-svn: 140036
* In general, don't look through explicit casts when tryingJohn McCall2011-09-131-1/+1
| | | | | | | | | to find the called declaration. Explicit casts can radically change the semantics of a call, and it's no longer really a builtin call any more than it would be a builtin call if you stored the function pointer into a variable and called that. llvm-svn: 139659
* [PCH] Fix a regression that r139441 introduced (decls were getting passedArgyrios Kyrtzidis2011-09-131-4/+1
| | | | | | | | | | | | | | | | | to the consumer without being fully deserialized). The regression was on compiling boost.python and it was too difficult to get a reduced test case unfortunately. Also modify the logic of how objc methods are getting passed to the consumer; codegen depended on receiving objc methods before the implementation decl. Since the interesting objc methods are ones with a body and such methods only exist inside an ObjCImplDecl, deserialize and pass to consumer all the methods of ObCImplDecl when we see one. Fixes http://llvm.org/PR10922 & rdar://10117105. llvm-svn: 139644
* Switch LangOptions over to a .def file that describes header of theDouglas Gregor2011-09-131-1/+1
| | | | | | | | | | language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. llvm-svn: 139605
* Rename the ARC cast kinds to start with "ARC".John McCall2011-09-102-20/+20
| | | | llvm-svn: 139466
* Fix a broken assert in AST/DeclCXX.cpp.Richard Trieu2011-09-101-1/+1
| | | | llvm-svn: 139461
* When converting a block pointer to an Objective-C pointer type, extendJohn McCall2011-09-102-0/+5
| | | | | | | | | | | the lifetime of the block by copying it to the heap, or else we'll get a dangling reference because the code working with the non-block-typed object will not know it needs to copy. There is some danger here, e.g. with assigning a block literal to an unsafe variable, but, well, it's an unsafe variable. llvm-svn: 139451
* Clean up our handling of Objective-C definitions in AST files. RatherDouglas Gregor2011-09-101-1/+4
| | | | | | | | | than having CodeGen check whether a declaration comes from an AST file (which it shouldn't know or care about), make sure that the AST writer and reader pass along "interesting" declarations that CodeGen needs to know about. llvm-svn: 139441
* Extend the Stmt AST to make it easier to look through label, default,Chandler Carruth2011-09-101-0/+16
| | | | | | | | | | | and case statements. Use this to make the logic in the CFG builder more robust at finding the actual statements within a compound statement, even when there are many layers of labels obscuring it. Also extend the test cases for a large chunk of PR10063. Still more work to do here though. llvm-svn: 139437
* Use ArrayRef in ExternalASTSource::SetExternalVisibleDeclsForName.Argyrios Kyrtzidis2011-09-091-4/+5
| | | | llvm-svn: 139357
OpenPOWER on IntegriCloud