summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
* Use the target address space value when mangling names.Tanya Lattner2013-02-081-1/+2
| | | | llvm-svn: 174688
* Fix stack overflow and improve performance when a module contains manyRichard Smith2013-02-081-5/+7
| | | | | | | | | | | | | overloads of a name by claiming that there are no lookup results for that name in modules while loading the names from the module. Lookups in deserialization really don't want to find names which they themselves are in the process of introducing. This also has the pleasant side-effect of automatically caching PCH lookups which found no names. The runtime here is still quadratic in the number of overloads, but the constant is lower. llvm-svn: 174685
* Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei2013-02-076-0/+12
| | | | | | restrictions. llvm-svn: 174601
* Fix handling of module imports adding names to a DeclContext after qualifiedRichard Smith2013-02-071-10/+37
| | | | | | | | | | | | | | | | name lookup has been performed in that context (this probably only happens in C++). 1) Whenever we add names to a context, set a flag on it, and if we perform lookup and discover that the context has had a lookup table built but has the flag set, update all entries in the lookup table with additional names from the external source. 2) When marking a DeclContext as having external visible decls, mark the context in which lookup is performed, not the one we are adding. These won't be the same if we're adding another copy of a pre-existing namespace. llvm-svn: 174577
* Simplify FindExternalVisibleDeclsByName by making it return a bool indicatingRichard Smith2013-02-072-3/+11
| | | | | | | | | | | | if it found any decls, rather than returning a list of found decls. This removes a returning-ArrayRef-to-deleted-storage bug from MultiplexExternalSemaSource (in code not exercised by any of the clang binaries), reduces the work required in the found-no-decls case with PCH, and importantly removes the need for DeclContext::lookup to be reentrant. No functionality change intended! llvm-svn: 174576
* AST dumping: indicate the previous declaration for a redeclaration, andRichard Smith2013-02-071-1/+27
| | | | | | | indicate the semantic DC if it's not the lexical DC. In passing, correct the ascii-art child marker for a child of a FriendDecl. llvm-svn: 174570
* DeclPrinter: fix CXXConstructExpr printing with implicit default argumentDmitri Gribenko2013-02-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | This is an improvement of r173630, that handles the following case: struct VirualDestrClass { VirualDestrClass(int arg); virtual ~VirualDestrClass(); }; struct ConstrWithCleanupsClass { ConstrWithCleanupsClass(const VirualDestrClass& cplx = VirualDestrClass(42)); }; ConstrWithCleanupsClass cwcNoArg; That was printed as: ConstrWithCleanupsClass cwcNoArg(); llvm-svn: 174296
* CodeGen: Remove unnecessary const_casts. No functionality change.Benjamin Kramer2013-02-031-7/+3
| | | | llvm-svn: 174292
* Remove unneeded const_castsDmitri Gribenko2013-02-031-4/+2
| | | | llvm-svn: 174287
* Constify ASTContext::getObjContainingInterfaceDmitri Gribenko2013-02-031-4/+8
| | | | llvm-svn: 174282
* Correctly classify T{} as an array temporary if T is an array of class type ↵Richard Smith2013-02-021-15/+14
| | | | | | with nontrivial destructor. llvm-svn: 174261
* Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko2013-02-011-0/+1
| | | | | | | | | | | | | | This change introduces a 'kind' attribute for the <Para> tag, that captures the kind of the parent block command. For example: \todo Meow. used to be just <Para>Meow.</Para>, but now it is <Para kind="todo">Meow.</Para> llvm-svn: 174216
* Use const visitors in ASTDumper.Alexander Kornienko2013-02-012-226/+243
| | | | | | | http://llvm-reviews.chandlerc.com/D355 Patch by Philip Craig! llvm-svn: 174171
* [Comment parsing] Add support for recognizingFariborz Jahanian2013-01-311-1/+8
| | | | | | | | \headerfile command and representing it in an xml document. Patch reviewed by Dmitri Gribenko. // rdar://12397511 llvm-svn: 174109
* Add support for AArch64 target.Tim Northover2013-01-311-0/+83
| | | | | | | | | | | | | In cooperation with the LLVM patch, this should implement all scalar front-end parts of the C and C++ ABIs for AArch64. This patch excludes the NEON support also reviewed due to an outbreak of batshit insanity in our legal department. That will be committed soon bringing the changes to precisely what has been approved. Further reviews would be gratefully received. llvm-svn: 174055
* Added outer template parameter lists to friend type AST nodes.Enea Zaffanella2013-01-312-8/+22
| | | | llvm-svn: 174050
* When comparing two template template arguments in the template differ, considerRichard Trieu2013-01-311-5/+14
| | | | | | | | | | | them the same if they are actually the same; having the same name isn't enough. Similar to r174013, template template arguments were also mistakenly considered the same when they had the same name but were in different namespaces. In addition, when printing template template arguments, use the qualified name if the regular name is the same. llvm-svn: 174029
* Fix -Wcovered-switch-default and -Wunused-private-field warnings.Richard Smith2013-01-311-19/+17
| | | | llvm-svn: 174025
* Add indents to AST dumping and removed parenthesis from AST nodes.Richard Trieu2013-01-311-44/+280
| | | | | | | | | | | | | | | | | | | | | Indents were given the color blue when outputting with color. AST dumping now looks like this: Node |-Node | `-Node `-Node `-Node Compared to the previous: (Node (Node (Node)) (Node (Node))) llvm-svn: 174022
* When comparing two templates in the template differ, consider them theDouglas Gregor2013-01-311-2/+2
| | | | | | | same if they are actually the same; having the same name isn't enough. Fixes <rdar://problem/12931988>. llvm-svn: 174013
* Comment parsing: resolve more named character referencesDmitri Gribenko2013-01-302-182/+23
| | | | | | | | | This reimplements r173850 with a better approach: (1) use a TableGen-generated matcher instead of doing a linear search; (2) avoid allocations for new strings by converting code points to string iterals with TableGen. llvm-svn: 173931
* Revert unintended changeDmitri Gribenko2013-01-301-1/+0
| | | | llvm-svn: 173927
* Move UTF conversion routines from clang/lib/Basic to llvm/lib/SupportDmitri Gribenko2013-01-302-3/+4
| | | | | | This is required to use them in TableGen. llvm-svn: 173924
* Semantic analysis and CodeGen support for C11's _Noreturn. This is modeled asRichard Smith2013-01-301-0/+1
| | | | | | an attribute for consistency with our other noreturn mechanisms. llvm-svn: 173898
* Removed couple of html named character references inFariborz Jahanian2013-01-301-2/+0
| | | | | | my last patch. llvm-svn: 173856
* [Doc parsing] Patch to parse Doxygen-supported HTML character Fariborz Jahanian2013-01-291-18/+181
| | | | | | | references to their UTIF-8 encoding. Reviewed offline by Doug. // rdar://12392215 llvm-svn: 173850
* Fix a crash in OpenCL code by using the proper (RHS) bit-width.Joey Gouly2013-01-291-2/+2
| | | | llvm-svn: 173802
* Don't crash while printing APValues that are lvalues casted to aDouglas Gregor2013-01-291-0/+2
| | | | | | decidedly non-reference, non-pointer type. Fixes <rdar://problem/13090123>. llvm-svn: 173747
* Abstract the behavior of when to use base-class tail padding.John McCall2013-01-291-8/+49
| | | | | | | For fun, I added a comedy "actually obey the C++11 POD rules" option which nobody is allowed to use. llvm-svn: 173744
* Decl printer: fix CXXConstructExpr with implicit default argumentDmitri Gribenko2013-01-271-3/+7
| | | | | | Patch by Will Wilson. llvm-svn: 173630
* Comment parsing: attach any tag type's documentation to its typedef if latterDmitri Gribenko2013-01-271-4/+12
| | | | | | | | does not have one of its own. // rdar://13067629 Original patch (r173586 and r173587) by Fariborz Jahanian, modified by me. llvm-svn: 173626
* Revert r173586 (and r173587) , "Attach any tag type's documentation to its ↵NAKAMURA Takumi2013-01-271-4/+4
| | | | | | | | typedef if" It caused unexpected warnings with @tparam. llvm-svn: 173614
* Fix comment.Fariborz Jahanian2013-01-261-1/+1
| | | | llvm-svn: 173587
* Attach any tag type's documentation to its typedef ifFariborz Jahanian2013-01-261-3/+3
| | | | | | latter does not have one of its own. // rdar://13067629 llvm-svn: 173586
* Added ASTContext methods getIntPtrType and getUIntPtrType.Enea Zaffanella2013-01-261-0/+8
| | | | llvm-svn: 173581
* Constify some getters of DesignatedInitExprDmitri Gribenko2013-01-261-6/+9
| | | | llvm-svn: 173574
* Highlight various parts of the AST dump with color. Colors are controlled byRichard Trieu2013-01-261-36/+156
| | | | | | | -f(no-)color-diagnostics. In addition, dumpColor() function calls are added to force color printing. No structural changes to -ast-dump. llvm-svn: 173548
* Comment parsing: actually check for a block command after "\param x"Dmitri Gribenko2013-01-261-6/+23
| | | | | | This fixes PR15068. llvm-svn: 173539
* patch for PR9027 and // rdar://11861085Fariborz Jahanian2013-01-252-0/+6
| | | | | | | | | | | Title: [PR9027] volatile struct bug: member is not loaded at -O; This is caused by last flag passed to @llvm.memcpy being false, not honoring that aggregate has at least one 'volatile' data member (even though aggregate itself has not been qualified as 'volatile'. As a result, optimization optimizes away the memcpy altogether. Patch review by John MaCall (I still need to fix up a test though). llvm-svn: 173535
* simplify code by removing excessive bracing.Fariborz Jahanian2013-01-251-20/+12
| | | | llvm-svn: 173521
* Attach enum's documentation to its typedef ifFariborz Jahanian2013-01-251-0/+10
| | | | | | latter does not have one of its own. // rdar://13067629 llvm-svn: 173516
* The standard ARM C++ ABI dictates that inline functions areJohn McCall2013-01-252-17/+50
| | | | | | | | never key functions. We did not implement that rule for the iOS ABI, which was driven by what was implemented in gcc-4.2. However, implement it now for other ARM-based platforms. llvm-svn: 173515
* First pass at abstracting out a class for the target C++ ABI.John McCall2013-01-254-16/+23
| | | | llvm-svn: 173514
* Clean up: since we have FunctionDecl::IsInline, make it store the right valueRichard Smith2013-01-251-34/+6
| | | | | | | | | | | | for template instantiations, and use it to simplify the implementation of FunctionDecl::isInlined(). This incidentally changes the result of isInlined on a declared-but-not-defined non-inline member function from true to false. This is sort of a bug fix, but currently isInlined is only called on function definitions, so it has no visible effects. llvm-svn: 173397
* removed duplicated comment.Fariborz Jahanian2013-01-241-1/+0
| | | | llvm-svn: 173378
* Patch to check for integer overflow. It has beenFariborz Jahanian2013-01-241-17/+57
| | | | | | commented on and approved by Richard Smith. llvm-svn: 173377
* Add constness for NestedNameSpecifier::Create parameterDmitri Gribenko2013-01-231-2/+3
| | | | llvm-svn: 173274
* Constify some getters in RedeclarableTemplateDeclDmitri Gribenko2013-01-231-6/+6
| | | | llvm-svn: 173272
* Add a new LangOpt NativeHalfType. This option allows for native half/fp16Joey Gouly2013-01-231-1/+1
| | | | | | | | operations (as opposed to storage only half/fp16). Also add some semantic checks for OpenCL half types. llvm-svn: 173254
* Fix a bug in VarDecl::getSourceRange() for static member arrays with an elementNico Weber2013-01-221-1/+3
| | | | | | | | type with an implicit initializer expression. Patch from Will Wilson <will@indefiant.com>! llvm-svn: 173170
OpenPOWER on IntegriCloud