aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST
AgeCommit message (Collapse)AuthorFilesLines
2013-02-07Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei6-0/+12
restrictions. llvm-svn: 174601
2013-02-07Fix handling of module imports adding names to a DeclContext after qualifiedRichard Smith1-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
2013-02-07Simplify FindExternalVisibleDeclsByName by making it return a bool indicatingRichard Smith2-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
2013-02-07AST dumping: indicate the previous declaration for a redeclaration, andRichard Smith1-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
2013-02-03DeclPrinter: fix CXXConstructExpr printing with implicit default argumentDmitri Gribenko1-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
2013-02-03CodeGen: Remove unnecessary const_casts. No functionality change.Benjamin Kramer1-7/+3
llvm-svn: 174292
2013-02-03Remove unneeded const_castsDmitri Gribenko1-4/+2
llvm-svn: 174287
2013-02-03Constify ASTContext::getObjContainingInterfaceDmitri Gribenko1-4/+8
llvm-svn: 174282
2013-02-02Correctly classify T{} as an array temporary if T is an array of class type ↵Richard Smith1-15/+14
with nontrivial destructor. llvm-svn: 174261
2013-02-01Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko1-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
2013-02-01Use const visitors in ASTDumper.Alexander Kornienko2-226/+243
http://llvm-reviews.chandlerc.com/D355 Patch by Philip Craig! llvm-svn: 174171
2013-01-31[Comment parsing] Add support for recognizingFariborz Jahanian1-1/+8
\headerfile command and representing it in an xml document. Patch reviewed by Dmitri Gribenko. // rdar://12397511 llvm-svn: 174109
2013-01-31Add support for AArch64 target.Tim Northover1-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
2013-01-31Added outer template parameter lists to friend type AST nodes.Enea Zaffanella2-8/+22
llvm-svn: 174050
2013-01-31When comparing two template template arguments in the template differ, considerRichard Trieu1-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
2013-01-31Fix -Wcovered-switch-default and -Wunused-private-field warnings.Richard Smith1-19/+17
llvm-svn: 174025
2013-01-31Add indents to AST dumping and removed parenthesis from AST nodes.Richard Trieu1-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
2013-01-31When comparing two templates in the template differ, consider them theDouglas Gregor1-2/+2
same if they are actually the same; having the same name isn't enough. Fixes <rdar://problem/12931988>. llvm-svn: 174013
2013-01-30Comment parsing: resolve more named character referencesDmitri Gribenko2-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
2013-01-30Revert unintended changeDmitri Gribenko1-1/+0
llvm-svn: 173927
2013-01-30Move UTF conversion routines from clang/lib/Basic to llvm/lib/SupportDmitri Gribenko2-3/+4
This is required to use them in TableGen. llvm-svn: 173924
2013-01-30Semantic analysis and CodeGen support for C11's _Noreturn. This is modeled asRichard Smith1-0/+1
an attribute for consistency with our other noreturn mechanisms. llvm-svn: 173898
2013-01-30Removed couple of html named character references inFariborz Jahanian1-2/+0
my last patch. llvm-svn: 173856
2013-01-29[Doc parsing] Patch to parse Doxygen-supported HTML character Fariborz Jahanian1-18/+181
references to their UTIF-8 encoding. Reviewed offline by Doug. // rdar://12392215 llvm-svn: 173850
2013-01-29Fix a crash in OpenCL code by using the proper (RHS) bit-width.Joey Gouly1-2/+2
llvm-svn: 173802
2013-01-29Don't crash while printing APValues that are lvalues casted to aDouglas Gregor1-0/+2
decidedly non-reference, non-pointer type. Fixes <rdar://problem/13090123>. llvm-svn: 173747
2013-01-29Abstract the behavior of when to use base-class tail padding.John McCall1-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
2013-01-27Decl printer: fix CXXConstructExpr with implicit default argumentDmitri Gribenko1-3/+7
Patch by Will Wilson. llvm-svn: 173630
2013-01-27Comment parsing: attach any tag type's documentation to its typedef if latterDmitri Gribenko1-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
2013-01-27Revert r173586 (and r173587) , "Attach any tag type's documentation to its ↵NAKAMURA Takumi1-4/+4
typedef if" It caused unexpected warnings with @tparam. llvm-svn: 173614
2013-01-26Fix comment.Fariborz Jahanian1-1/+1
llvm-svn: 173587
2013-01-26Attach any tag type's documentation to its typedef ifFariborz Jahanian1-3/+3
latter does not have one of its own. // rdar://13067629 llvm-svn: 173586
2013-01-26Added ASTContext methods getIntPtrType and getUIntPtrType.Enea Zaffanella1-0/+8
llvm-svn: 173581
2013-01-26Constify some getters of DesignatedInitExprDmitri Gribenko1-6/+9
llvm-svn: 173574
2013-01-26Highlight various parts of the AST dump with color. Colors are controlled byRichard Trieu1-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
2013-01-26Comment parsing: actually check for a block command after "\param x"Dmitri Gribenko1-6/+23
This fixes PR15068. llvm-svn: 173539
2013-01-25patch for PR9027 and // rdar://11861085Fariborz Jahanian2-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
2013-01-25simplify code by removing excessive bracing.Fariborz Jahanian1-20/+12
llvm-svn: 173521
2013-01-25Attach enum's documentation to its typedef ifFariborz Jahanian1-0/+10
latter does not have one of its own. // rdar://13067629 llvm-svn: 173516
2013-01-25The standard ARM C++ ABI dictates that inline functions areJohn McCall2-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
2013-01-25First pass at abstracting out a class for the target C++ ABI.John McCall4-16/+23
llvm-svn: 173514
2013-01-25Clean up: since we have FunctionDecl::IsInline, make it store the right valueRichard Smith1-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
2013-01-24removed duplicated comment.Fariborz Jahanian1-1/+0
llvm-svn: 173378
2013-01-24Patch to check for integer overflow. It has beenFariborz Jahanian1-17/+57
commented on and approved by Richard Smith. llvm-svn: 173377
2013-01-23Add constness for NestedNameSpecifier::Create parameterDmitri Gribenko1-2/+3
llvm-svn: 173274
2013-01-23Constify some getters in RedeclarableTemplateDeclDmitri Gribenko1-6/+6
llvm-svn: 173272
2013-01-23Add a new LangOpt NativeHalfType. This option allows for native half/fp16Joey Gouly1-1/+1
operations (as opposed to storage only half/fp16). Also add some semantic checks for OpenCL half types. llvm-svn: 173254
2013-01-22Fix a bug in VarDecl::getSourceRange() for static member arrays with an elementNico Weber1-1/+3
type with an implicit initializer expression. Patch from Will Wilson <will@indefiant.com>! llvm-svn: 173170
2013-01-22Switch to APFloat constructor taking fltSemantics.Tim Northover2-6/+38
This change also makes the serialisation store the required semantics, fixing an issue where PPC128 was always assumed when re-reading a 128-bit value. llvm-svn: 173139
2013-01-21First step towards vftable generation with -cxx-abi microsoft PR13231Timur Iskhodzhanov1-29/+86
llvm-svn: 173035