summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
* Make isWeakDecl available as a method on ValueDecl.Lang Hames2011-12-051-9/+3
| | | | llvm-svn: 145845
* Fix mangling substitutions for address-space-qualified classDouglas Gregor2011-12-031-2/+9
| | | | | | types. Patch from Dmitri Rubinstein! llvm-svn: 145776
* Implement support for the __is_final type trait, to determine whetherDouglas Gregor2011-12-031-0/+1
| | | | | | | a class is marked 'final', from Alberto Ganesh Barbati! Fixes PR11462. llvm-svn: 145775
* Keep track of all of the import declarations that are parsed orDouglas Gregor2011-12-033-3/+26
| | | | | | | implicitly generated in a translation unit. Modules will need this information to identify the actual imports that occurred. llvm-svn: 145734
* When we treat an #include or #import as a module import, create anDouglas Gregor2011-12-021-3/+1
| | | | | | | implicit ImportDecl in the translation unit to record the presence of the import. llvm-svn: 145727
* Introduce a module import declaration, so that we properly represent, e.g.,Douglas Gregor2011-12-023-0/+87
| | | | | | | | __import_module__ std.vector; in the AST. llvm-svn: 145725
* Fix bitfield handling for record layout with #pragma pack. ↵Eli Friedman2011-12-021-3/+5
| | | | | | <rdar://problem/10494810> and PR9560. llvm-svn: 145673
* Add Microsoft mangling of constructors and destructors. Patch by Dmitry!Michael J. Spencer2011-12-011-6/+10
| | | | llvm-svn: 145581
* ParmVarDecls have no linkage. Previously we would report that parametersArgyrios Kyrtzidis2011-12-011-0/+2
| | | | | | | | in type signatures have external linkage. Fixes rdar://10058317. llvm-svn: 145551
* Further tweak -Wurneachable-code and templates by allowing the warning to run onTed Kremenek2011-12-011-1/+14
| | | | | | | | | explicit template specializations (which represent actual functions somebody wrote). Along the way, refactor some other code which similarly cares about whether or not they are looking at a template instantiation. llvm-svn: 145547
* Fix MSVC class layout for empty classes. Patch by Dmitry Sokolov.Eli Friedman2011-12-011-4/+9
| | | | llvm-svn: 145544
* Per an offline conversation with John McCall, have StmtPrinter actually ↵Ted Kremenek2011-11-301-1/+3
| | | | | | print out the source expression for OpaqueValueExpr. llvm-svn: 145524
* Add bigger method type encodings to protocol objects. <rdar://problem/10492418>Bob Wilson2011-11-301-13/+63
| | | | | | | | | | | | | | | | | | The new metadata are method @encode strings with additional data. 1. Each Objective-C object is marked with its class name and protocol names. The same is done for property @encode already. 2. Each block object is marked with its function prototype's @encoding. For example, a method parameter that is a block object that itself returns void and takes an int would look like: @?<v@?i> These new method @encode strings are stored in a single array pointed to by structs protocol_t and objc_protocol_ext. Patch provided by Greg Parker! llvm-svn: 145469
* In Sema::MaybeBindToTemporary, create a CXXBindTemporaryExpr for anPeter Collingbourne2011-11-271-2/+3
| | | | | | array of objects with non-trivial destructors. PR11365. llvm-svn: 145203
* Reference initialization with initializer lists.Sebastian Redl2011-11-271-12/+22
| | | | | | This supports single-element initializer lists for references according to DR1288, as well as creating temporaries and binding to them for other initializer lists. llvm-svn: 145186
* Provide better source info for template specializations with non-type arguments.Matt Beaumont-Gay2011-11-221-3/+1
| | | | | | | This fixes a crasher in tools like Include-What-You-Use which examine such arguments. Patch from Dean Sturtevant at Google! llvm-svn: 145077
* Add driver arguments -ftemplate-depth=N and -fconstexpr-depth=N, with the sameRichard Smith2011-11-211-8/+8
| | | | | | | | | | | | | semantics and defaults as the corresponding g++ arguments. The historical g++ argument -ftemplate-depth-N is kept for compatibility, but modern g++ versions no longer document that option. Add -cc1 argument -fconstexpr-depth N to implement the corresponding functionality. The -ftemplate-depth=N part of this fixes PR9890. llvm-svn: 145045
* Add support for pretty-printing attributes, from Richard Membarth!Douglas Gregor2011-11-191-6/+16
| | | | llvm-svn: 145002
* Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continueArgyrios Kyrtzidis2011-11-181-1/+3
| | | | | | parsing or false to abort parsing. llvm-svn: 144943
* Added a clause to the ASTImporter allowing it toSean Callanan2011-11-171-0/+10
| | | | | | import TranslationUnitDecls. llvm-svn: 144934
* Constant expression evaluation: add support for evaluation of member pointersRichard Smith2011-11-172-167/+779
| | | | | | and base-to-derived casts, and add proper handling of temporaries. llvm-svn: 144926
* PR11391: Don't try to evaluate the LHS of a _Complex assignment as an rvalue.Richard Smith2011-11-161-0/+4
| | | | llvm-svn: 144799
* Fix PR11385: A pointer constant expression which has been cast via an integer isRichard Smith2011-11-161-0/+1
| | | | | | | not safely derived. Don't allow lvalue-to-rvalue conversions on the result of dereferencing such a pointer. llvm-svn: 144783
* Use Decl's isImplicit field to indicate whether an ObjCInterfaceDecl is ↵Argyrios Kyrtzidis2011-11-151-1/+2
| | | | | | | | 'ImplicitInterfaceDecl', no need to store it in another field. llvm-svn: 144624
* ARC: make assignment to 'self' within class methods illegal. Fixes ↵Ted Kremenek2011-11-141-11/+20
| | | | | | <rdar://problem/10416568>. llvm-svn: 144572
* Change the checks in the type aka printing. A confusing case where the stringRichard Trieu2011-11-141-3/+10
| | | | | | | | of the first type is the same as the aka string of the second type, but both types are different. Update the logic to print an aka for the first type to show that they are different. llvm-svn: 144558
* Fix the signature of the getcontext builtin. Patch by Dimitry Andric.Rafael Espindola2011-11-131-2/+12
| | | | llvm-svn: 144505
* Represent an APValue based on a Decl as that Decl, rather than a DeclRefExprRichard Smith2011-11-122-95/+78
| | | | | | | | or MemberExpr which refers to it. As a side-effect, MemberExprs which refer to static member functions and static data members are now emitted as constant expressions. llvm-svn: 144468
* [PCH] When completing an objc forward reference, do not serialize the chain ↵Argyrios Kyrtzidis2011-11-122-3/+19
| | | | | | | | | | | | | | | of its categories because it is going to be rewritten (and the chain will be serialized again), otherwise we may form a cycle in its categories list when deserializing. Also introduce ASTMutationListener::CompletedObjCForwardRef to notify that a forward reference was completed; using Decl's isChangedSinceDeserialization/setChangedSinceDeserialization is bug inducing and kinda gross, we should phase it out. Fixes infinite loop in rdar://10418538. llvm-svn: 144465
* When importing an ObjCInterfaceDecl, ensure thatSean Callanan2011-11-111-0/+11
| | | | | | | | superclass information is imported before validating it. This fixes spurious "incompatible superclasses" errors in LLDB. llvm-svn: 144393
* Constant expression evalation: const_cast support.Richard Smith2011-11-111-6/+1
| | | | llvm-svn: 144382
* Reduce the constexpr stack pressure somewhat. Hopefully this will be enough toRichard Smith2011-11-111-1/+1
| | | | | | please the buildbots. llvm-svn: 144375
* Constant expression evaluation: support for constexpr member functions. ThisRichard Smith2011-11-111-46/+118
| | | | | | | | | | | reinstates r144273; a combination of r144333's fix for NoOp rvalue-to-lvalue casts and some corresponding changes here resolve the regression which that caused. This patch also adds support for some additional forms of member function call, along with additional testing. llvm-svn: 144369
* Revert r144273. It causes clang self-host build failure.Devang Patel2011-11-101-56/+31
| | | | llvm-svn: 144296
* Constant expression evaluation: support for constexpr member functions.Richard Smith2011-11-101-31/+56
| | | | llvm-svn: 144273
* Constant expression evaluation: support for evaluation of structs and unions ofRichard Smith2011-11-104-178/+723
| | | | | | | literal types, as well as derived-to-base casts for lvalues and derived-to-virtual-base casts. llvm-svn: 144265
* There's no good reason to track temporaries in ExprWithCleanups,John McCall2011-11-103-36/+25
| | | | | | | but it is sometimes useful to track blocks. Do so. Also optimize the storage of these expressions. llvm-svn: 144263
* Temporary fix for a performance problem Eli spotted. The APValue representationRichard Smith2011-11-101-0/+6
| | | | | | | is currently too inefficient to allow us to use it for array initializers, but fortunately we usually don't yet need to evaluate such initializers. llvm-svn: 144260
* Constant expression evaluation: support for default arguments.Richard Smith2011-11-091-0/+2
| | | | llvm-svn: 144156
* From Vassil Vassilev: add checks for removing Decls for more use cases.Axel Naumann2011-11-082-2/+3
| | | | llvm-svn: 144094
* Fix the layout of vb-tables and vf-tables in the MS C++ ABI.John McCall2011-11-081-184/+202
| | | | | | Based on work by Dmitry Sokolov! llvm-svn: 144072
* TypePrinter: print OpenCL address space names. Patch by RichardPeter Collingbourne2011-11-081-3/+15
| | | | | | Membarth, test case by myself. llvm-svn: 144063
* DeclPrinter: print the declaration's storage class specifier asPeter Collingbourne2011-11-081-3/+4
| | | | | | | | | written, instead of the resolved storage class, which might not be legal to specify on the declaration (such as out-of-line definitions of static class members in C++, and __local variables in OpenCL). Initial patch by Richard Membarth. llvm-svn: 144062
* Fix a cluster of related issues involving value-dependence and constantRichard Smith2011-11-082-9/+19
| | | | | | | | | | | | | | expression evaluation: - When folding a non-value-dependent expression, we may try to use the initializer of a value-dependent variable. If that happens, give up. - In C++98, actually check that a const, non-volatile DeclRefExpr inside an ICE is of integral or enumeration type (a reference isn't OK!) - In C++11, DeclRefExprs for objects of const literal type initialized with value-dependent expressions are themselves value-dependent. - So are references initialized with value-dependent expressions (though this case is missing from the C++11 standard, along with many others). llvm-svn: 144056
* When we notice that a member function is defined with "= delete" or "=Douglas Gregor2011-11-071-5/+5
| | | | | | | | | | | | default", make a note of which is used when creating the initial declaration. Previously, we would wait until later to handle default/delete as a definition, but this is too late: when adding the declaration, we already treated the declaration as "user-provided" when in fact it was merely "user-declared". Fixes PR10861 and PR10442, along with a bunch of FIXMEs. llvm-svn: 144011
* Add support for printing integer literals of type short, unsigned short,Richard Trieu2011-11-071-0/+7
| | | | | | | | __int128_t and __uint128_t. Short and unsigned short integer literals support is only to work around a crasher as reported in PR11179 and will be removed once Clang no longer builds short integer literals. llvm-svn: 143977
* Constant expression evaluation: support for arrays.Richard Smith2011-11-072-35/+170
| | | | llvm-svn: 143922
* Fix 32-bit build bots and remove some casting-away-const warnings.Richard Smith2011-11-071-2/+6
| | | | llvm-svn: 143914
* Rip out CK_GetObjCProperty.John McCall2011-11-072-5/+0
| | | | llvm-svn: 143910
* Constant expression evaluation: preserve subobject designator when flattening aRichard Smith2011-11-072-46/+133
| | | | | | core constant value down to an APValue. llvm-svn: 143909
OpenPOWER on IntegriCloud