summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTImporter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Support for C++11 (non-template) alias declarations.Richard Smith2011-04-151-28/+46
| | | | llvm-svn: 129567
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* Basic, untested implementation for an "unknown any" type requested by LLDB.John McCall2011-04-071-0/+1
| | | | | | | | | | | | The idea is that you can create a VarDecl with an unknown type, or a FunctionDecl with an unknown return type, and it will still be valid to access that object as long as you explicitly cast it at every use. I'm still going back and forth about how I want to test this effectively, but I wanted to go ahead and provide a skeletal implementation for the LLDB folks' benefit and because it also improves some diagnostic goodness for placeholder expressions. llvm-svn: 129065
* Make helpers static.Benjamin Kramer2011-03-261-1/+1
| | | | llvm-svn: 128339
* Propagate the new exception information to FunctionProtoType.Sebastian Redl2011-03-121-8/+13
| | | | | | | | Change the interface to expose the new information and deal with the enormous fallout. Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications. Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support. llvm-svn: 127537
* Add support for the OpenCL vec_step operator, by generalising andPeter Collingbourne2011-03-111-6/+7
| | | | | | | extending the existing support for sizeof and alignof. Original patch by Guy Benyei. llvm-svn: 127475
* Fixed InnerLocStart.Abramo Bagnara2011-03-091-15/+15
| | | | llvm-svn: 127330
* Teach libclang's token-annotation logic about context-sensitiveDouglas Gregor2011-03-081-2/+4
| | | | | | keywords for Objective-C+ and C++0x. llvm-svn: 127253
* Fixed NamespaceDecl source range.Abramo Bagnara2011-03-081-2/+3
| | | | llvm-svn: 127242
* Fixed source range for all DeclaratorDecl's.Abramo Bagnara2011-03-081-3/+14
| | | | llvm-svn: 127225
* Completed source ranges fixes for all classes inheriting from TypeDecl.Abramo Bagnara2011-03-061-4/+4
| | | | llvm-svn: 127120
* Fixed TypedefDecl and TemplateTypeParameter source range.Abramo Bagnara2011-03-061-1/+4
| | | | llvm-svn: 127119
* Currently we can only remap a file by creating a MemoryBuffer and replacing ↵Argyrios Kyrtzidis2011-03-051-2/+2
| | | | | | | | | the file contents with it. Allow remapping a file by specifying another filename whose contents should be loaded if the original file gets loaded. This allows to override files without having to create & load buffers in advance. llvm-svn: 127052
* Push nested-name-specifier location information into DeclRefExpr andDouglas Gregor2011-02-281-2/+2
| | | | | | MemberExpr, the last of the expressions with qualifiers! llvm-svn: 126688
* Use NestedNameSpecifierLoc within out-of-line variables, function, andDouglas Gregor2011-02-251-36/+12
| | | | | | | tag definitions. Also, add support for template instantiation of NestedNameSpecifierLocs. llvm-svn: 126470
* Implement the C++0x deduced 'auto' feature.Richard Smith2011-02-201-3/+22
| | | | | | This fixes PR 8738, 9060 and 9132. llvm-svn: 126069
* Import three interesting bits that apply only to C++ methods.John McCall2011-01-271-0/+3
| | | | llvm-svn: 124349
* Change QualType::getTypePtr() to return a const pointer, then change aJohn McCall2011-01-191-59/+66
| | | | | | thousand other things which were (generally inadvertantly) relying on that. llvm-svn: 123814
* Introduce the notion of a "minimal" import of ASTs, to better support LLDB.Douglas Gregor2011-01-181-4/+26
| | | | llvm-svn: 123723
* Introduce a new kind of TemplateName that captures a substitutedDouglas Gregor2011-01-151-0/+18
| | | | | | | | | | | | | | | template template parameter pack that cannot be fully expanded because its enclosing pack expansion could not be expanded. This form of TemplateName plays the same role as SubstTemplateTypeParmPackType and SubstNonTypeTemplateParmPackExpr do for template type parameter packs and non-type template parameter packs, respectively. We should now handle these multi-level pack expansion substitutions anywhere. The largest remaining gap in our variadic-templates support is that we cannot cope with non-type template parameter packs whose type is a pack expansion. llvm-svn: 123521
* Teach template template argument pack expansions to keep track of theDouglas Gregor2011-01-141-1/+1
| | | | | | | number of expansions, when we know it, and propagate that information through Sema. llvm-svn: 123493
* Fix a few warnings stemming from my inability to properly fill outDouglas Gregor2011-01-141-0/+15
| | | | | | switch() statements. llvm-svn: 123429
* Introduce an AttributedType, but don't actually use it anywhere yet.John McCall2011-01-061-0/+11
| | | | | | | | | | The initial TreeTransform is a cop-out, but it's more-or-less equivalent to what we were doing before, or rather what we're doing now and might eventually stop doing in favor of using this type. I am simultaneously intrigued by the possibilities of rebuilding a dependent Attri llvm-svn: 122942
* Replace the representation of template template argument packDouglas Gregor2011-01-051-2/+16
| | | | | | | | | | | | | expansions with something that is easier to use correctly: a new template argment kind, rather than a bit on an existing kind. Update all of the switch statements that deal with template arguments, fixing a few latent bugs in the process. I"m happy with this representation, now. And, oh look! Template instantiation and deduction work for template template argument pack expansions. llvm-svn: 122896
* Implement support for template template parameter packs, e.g.,Douglas Gregor2011-01-051-0/+1
| | | | | | | template<template<class> class ...Metafunctions> struct apply_to_each; llvm-svn: 122874
* Implement pack expansions whose pattern is a base-specifier.Douglas Gregor2011-01-031-1/+6
| | | | llvm-svn: 122782
* The -fshort-wchar option causes wchar_t to become unsigned, in addition to beingChris Lattner2010-12-251-1/+2
| | | | | | | 16-bits in size. Implement this by splitting WChar into two enums, like we have for char. This fixes a miscompmilation of XULRunner, PR8856. llvm-svn: 122558
* Add an AST representation for non-type template parameterDouglas Gregor2010-12-231-1/+1
| | | | | | | | | | | | | | packs, e.g., template<typename T, unsigned ...Dims> struct multi_array; along with semantic analysis support for finding unexpanded non-type template parameter packs in types, expressions, and so on. Template instantiation involving non-type template parameter packs probably doesn't work yet. That'll come soon. llvm-svn: 122527
* Introduce a new type, PackExpansionType, to capture types that areDouglas Gregor2010-12-201-1/+8
| | | | | | | | | | | | | | | | | | | | pack expansions, e.g. given template<typename... Types> struct tuple; template<typename... Types> struct tuple_of_refs { typedef tuple<Types&...> types; }; the type of the "types" typedef is a PackExpansionType whose pattern is Types&. This commit introduces support for creating pack expansions for template type arguments, as above, but not for any other kind of pack expansion, nor for any form of instantiation. llvm-svn: 122223
* Restore r121752 without modification.John McCall2010-12-141-8/+4
| | | | llvm-svn: 121763
* Pull out r121752 in case it's causing the selfhost breakage.John McCall2010-12-141-4/+8
| | | | llvm-svn: 121759
* Factor out most of the extra state in a FunctionProtoType into a separateJohn McCall2010-12-141-8/+4
| | | | | | | class to be passed around. The line between argument and return types and everything else is kindof vague, but I think it's justifiable. llvm-svn: 121752
* Added ParenType type node.Abramo Bagnara2010-12-101-0/+7
| | | | llvm-svn: 121488
* Fix two thinkos and add a test for importing the AST of a categoryDouglas Gregor2010-12-081-2/+3
| | | | | | implementation. llvm-svn: 121263
* Implement AST import for Objective-C property implementationsDouglas Gregor2010-12-071-0/+82
| | | | | | (@synthesize and @dynamic). llvm-svn: 121159
* Implement ASTImporter support for Objective-C category implementations.Douglas Gregor2010-12-071-0/+36
| | | | llvm-svn: 121139
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-071-4/+4
| | | | | | | | zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121121
* Extern the ASTImporter to import @implementation declarations.Douglas Gregor2010-12-071-2/+76
| | | | llvm-svn: 121097
* Added struct/class syntactic info for c++0x scoped enum.Abramo Bagnara2010-12-031-3/+4
| | | | llvm-svn: 120828
* Fix inverted return value in the ASTImporter. No matter how much LLVMDouglas Gregor2010-12-021-2/+2
| | | | | | code I wrote, returning "true" on error is still unnatural. llvm-svn: 120727
* Implement AST import support for class template specializations.Douglas Gregor2010-12-011-35/+363
| | | | llvm-svn: 120523
* Implement basic AST importing and merging support for class templateDouglas Gregor2010-11-301-5/+359
| | | | | | declarations. llvm-svn: 120448
* Teach the ASTImporter how to create CXXMethodDecls. Somehow, this case was ↵Douglas Gregor2010-11-291-0/+7
| | | | | | missed previously llvm-svn: 120289
* now the FileManager has a FileSystemOpts ivar, stop threadingChris Lattner2010-11-231-7/+3
| | | | | | | | | FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on FileManager without creating one in some code paths in cindextext. llvm-svn: 120010
* Major anonymous union/struct redesign.Francois Pichet2010-11-211-0/+37
| | | | | | | | | | | A new AST node is introduced: def IndirectField : DDecl<Value>; IndirectFields are injected into the anonymous's parent scope and chain back to the original field. Name lookup for anonymous entities now result in an IndirectFieldDecl instead of a FieldDecl. There is no functionality change, the code generated should be the same. llvm-svn: 119919
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-181-20/+10
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* Calculate the value kind of an expression when it's created andJohn McCall2010-11-181-5/+10
| | | | | | | | | | | | | store it on the expression node. Also store an "object kind", which distinguishes ordinary "addressed" l-values (like variable references and pointer dereferences) and bitfield, @property, and vector-component l-values. Currently we're not using these for much, but I aim to switch pretty much everything calculating l-valueness over to them. For now they shouldn't necessarily be trusted. llvm-svn: 119685
* Add a variant of GCC-style vector types for ARM NEON.Bob Wilson2010-11-101-2/+2
| | | | | | | | | NEON vector types need to be mangled in a special way to comply with ARM's ABI, similar to some of the AltiVec-specific vector types. This patch is mostly just renaming a bunch of "AltiVecSpecific" things, since they will no longer be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum. llvm-svn: 118724
* Implement -working-directory.Argyrios Kyrtzidis2010-11-031-2/+6
| | | | | | | | | | | | | | | | | | | When -working-directory is passed in command line, file paths are resolved relative to the specified directory. This helps both when using libclang (where we can't require the user to actually change the working directory) and to help reproduce test cases when the reproduction work comes along. --FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains the working directory value if set). --FileSystemOptions are passed around to various interfaces that perform file operations. --Opening & reading the content of files should be done only through FileManager. This is useful in general since file operations will be abstracted in the future for the reproduction mechanism. FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same FileManager but with different FileSystemOptions. Addresses rdar://8583824. llvm-svn: 118203
* Pass TInfo to CXXDestructorDecl::Create(), just like we do for otherCraig Silverstein2010-10-211-1/+1
| | | | | | | | function decls. Reviewed by rjmccall and nlewycky. llvm-svn: 116979
OpenPOWER on IntegriCloud