summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
* [MS-ABI] Implements MS-compatible RTTIWarren Hunt2014-05-231-5/+5
| | | | | | | | | | | | | Enables the emission of MS-compatible RTTI data structures for use with typeid, dynamic_cast and exceptions. Does not implement dynamic_cast or exceptions. As an artiface, typeid works in some cases but proper support an testing will coming in a subsequent patch. majnemer has fuzzed the results. Test cases included. Differential Revision: http://reviews.llvm.org/D3833 llvm-svn: 209523
* Avoid allocating extra memory to handle the lazy definition data pointer forRichard Smith2014-05-222-4/+4
| | | | | | CXXRecordDecls when modules is enabled. llvm-svn: 209482
* Improved location for non-constant initializers diagnostics.Abramo Bagnara2014-05-221-18/+33
| | | | llvm-svn: 209466
* Move virtual methods out of line.Rafael Espindola2014-05-211-0/+26
| | | | | | | This is generally a good thing and in this case should also fix the BUILD_SHARED_LIBS=ON build (see pr19774). llvm-svn: 209300
* Make the parent-map use significantly less memory.Manuel Klimek2014-05-211-3/+37
| | | | | | | | | | | On test files I ran this on, memory consumption overall went down from 2.5G to 2G, without performance regressions. I also investigated making DynTypedNode by itself smaller (by pulling out pointers for everything that doesn't fit in 8 bytes). This led to another 200-300MB saved, but also introduced a significant regression in performance due to the memory management overhead. llvm-svn: 209297
* Make global named registers internal variablesRenato Golin2014-05-211-0/+3
| | | | llvm-svn: 209289
* Ignore void returning overloaded functions fom -Wunused-comparison. PR19791.Richard Trieu2014-05-201-1/+2
| | | | llvm-svn: 209186
* If a declaration is loaded, and then a module import adds a redeclaration, thenRichard Smith2014-05-166-122/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ensure that querying the first declaration for its most recent declaration checks for redeclarations from the imported module. This works as follows: * The 'most recent' pointer on a canonical declaration grows a pointer to the external AST source and a generation number (space- and time-optimized for the case where there is no external source). * Each time the 'most recent' pointer is queried, if it has an external source, we check whether it's up to date, and update it if not. * The ancillary data stored on the canonical declaration is allocated lazily to avoid filling it in for declarations that end up being non-canonical. We'll still perform a redundant (ASTContext) allocation if someone asks for the most recent declaration from a decl before setPreviousDecl is called, but such cases are probably all bugs, and are now easy to find. Some finessing is still in order here -- in particular, we use a very general mechanism for handling the DefinitionData pointer on CXXRecordData, and a more targeted approach would be more compact. Also, the MayHaveOutOfDateDef mechanism should now be expunged, since it was addressing only a corner of the full problem space here. That's not covered by this patch. Early performance benchmarks show that this makes no measurable difference to Clang performance without modules enabled (and fixes a major correctness issue with modules enabled). I'll revert if a full performance comparison shows any problems. llvm-svn: 209046
* Rename SourceManager::createFileIDForMemBuffer()Alp Toker2014-05-161-2/+1
| | | | | | | | It makes more sense to just overload createFileID(). Gardening only. llvm-svn: 209002
* Allow dllimport/dllexport on inline functions and adjust the linkage.Hans Wennborg2014-05-152-6/+34
| | | | | | | | This is a step towards handling these attributes on classes (PR11170). Differential Revision: http://reviews.llvm.org/D3772 llvm-svn: 208925
* AST: Remove dead-code/update reference to standardDavid Majnemer2014-05-151-11/+8
| | | | | | | | | | | GetGVALinkageForFunction handles TSK_ExplicitInstantiationDeclaration twice, remove the redundant code trying to handle it again. While we are here, update the reference we make to the standard. It seems like another paragraph was added causing this text to get renumbered. llvm-svn: 208850
* When an overloaded comparison operator returns a reference, do not considerRichard Trieu2014-05-141-0/+2
| | | | | | it for -Wunused-comparion warnings. This fixes PR19724. llvm-svn: 208824
* Fix the AST printer for attributed statements so that it does not print ↵Aaron Ballman2014-05-131-13/+2
| | | | | | duplicate attribute introducers. Eg) [[clang::fallthrough]] instead of [[[[clang::fallthrough]]]] llvm-svn: 208706
* No longer triggering a checked iterator assert on Windows when using ↵Aaron Ballman2014-05-131-4/+3
| | | | | | std::copy while deserializing attributed statements with more than one attribute. llvm-svn: 208702
* Drop AST's version of ARMCXXABI, it doesn't differ from the Itanium baseJoerg Sonnenberger2014-05-133-13/+2
| | | | | | class. llvm-svn: 208687
* MS ABI: Tighten RTTI manglingDavid Majnemer2014-05-131-21/+21
| | | | | | r208661 contained WIP code, commit the *actual* manglings. llvm-svn: 208668
* MS ABI: Preliminary RTTI manglingDavid Majnemer2014-05-131-14/+69
| | | | | | | | Implement what we currently believe is the mangling scheme for RTTI data. Tests will be added in a later commit which actually generate RTTI data. llvm-svn: 208661
* [C++11] Use 'nullptr'. AST edition.Craig Topper2014-05-1243-1019/+1069
| | | | llvm-svn: 208517
* Make DiagnosticsEngine non-copyableAlp Toker2014-05-111-2/+2
| | | | | | | | Also provide an out-of-line dtor for CompilerInvocation. Cleanup work that may help reduce header inclusion for IntrusiveRefCntPtr. llvm-svn: 208512
* Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.Benjamin Kramer2014-05-102-3/+3
| | | | | | | Required pulling LambdaExpr::Capture into its own header. No functionality change. llvm-svn: 208470
* Stop all the Decl classes poking at Redeclarable's data member directly, and ↵Richard Smith2014-05-102-3/+3
| | | | | | make getNextRedeclaration follow the pattern of its friends getPreviousDecl and getMostRecentDecl. llvm-svn: 208467
* Use nullptr instead of 0 for const char * value.Yaron Keren2014-05-071-5/+5
| | | | llvm-svn: 208178
* Fix up indentation and fix an 80 column violation.Craig Topper2014-05-071-19/+20
| | | | llvm-svn: 208164
* AST: Update reference temporary manglingDavid Majnemer2014-05-061-24/+26
| | | | | | | | | | | | | | | Summary: Update our mangling to match the discussion on cxx-abi-dev. This involves using a seq-id instead of an optional number. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3631 llvm-svn: 208140
* [OPENMP] 'proc_bind' clause support - Parsing and sema analysis for OpenMP ↵Alexey Bataev2014-05-062-0/+8
| | | | | | clause 'proc_bind' llvm-svn: 208060
* Fix some typosAlp Toker2014-05-051-2/+2
| | | | llvm-svn: 207994
* StringRefize and take out an old FIXMEAlp Toker2014-05-051-2/+1
| | | | llvm-svn: 207962
* Replace one-element SmallVectors inside DenseMaps with TinyPtrVector.Benjamin Kramer2014-05-031-1/+1
| | | | | | That's exactly what TinyPtrVector was designed for. No functionality change. llvm-svn: 207919
* Eliminate ASTContext's DelayInitialization flagAlp Toker2014-05-031-11/+2
| | | | | | | | | Having various possible states of initialization following construction doesn't add value here. Also remove the unused size_reserve parameter. llvm-svn: 207897
* Fix null pointer segfault when calling dump() on a DeclStmt containing a ↵Alex McCarthy2014-05-021-0/+3
| | | | | | VarDecl. llvm-svn: 207867
* AST: Mangle reference temporaries reliablyDavid Majnemer2014-05-013-2/+28
| | | | | | | | | | | | | | | Summary: Previously, we would generate a single name for all reference temporaries and allow LLVM to rename them for us. Instead, number the reference temporaries as we build them in Sema. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3554 llvm-svn: 207776
* Add support for __declspec(thread) under -fms-extensionsReid Kleckner2014-05-011-0/+15
| | | | | | | | Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D3551 llvm-svn: 207734
* Comment parsing: remove HTML attribute validationDmitri Gribenko2014-04-301-13/+8
| | | | | | | | | | | | Since the community says that a blacklist is not good enough, and I don't have enough time now to implement a proper whitelist, let's just remove the attribute validation. But, nevertheless, we can still communicate in the generated XML if our parser found an issue with the HTML. But this bit is best-effort and is specifically called out in the schema as such. llvm-svn: 207712
* [ARM64] Add arm64_be where it was accidentally missed from a bunch of ↵James Molloy2014-04-301-0/+1
| | | | | | | | | if-conditions. I think this is the last commit for ARM64 big endian in clang. This commit makes arm_neon.h compile correctly. llvm-svn: 207624
* AST: Fix visibility calculation for VarTemplateSpecializationDeclDavid Majnemer2014-04-291-0/+4
| | | | | | | | | | | | It is possible that a variable template specialization might not have a VisibilityAttr attached to it while the template that it specializes does, in fact, have one. We should consider the template in such cases. This fixes PR19597. llvm-svn: 207498
* CodeGen: Fix linkage of reference temporariesDavid Majnemer2014-04-281-12/+40
| | | | | | | | | | | | | | | Summary: A reference temporary should inherit the linkage of the variable it initializes. Otherwise, we may hit cases where a reference temporary wouldn't have the same value in all translation units. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3515 llvm-svn: 207451
* [Index/DocComments] When cloning a full comment, pick the template ↵Argyrios Kyrtzidis2014-04-271-0/+2
| | | | | | | | | | parameters from the original FullComment, if the parameters are not already set (e.g. because it is a typedef). Fixes crash of rdar://16128173 llvm-svn: 207382
* [SemaObjC] Fix ObjCInterfaceDecl::inheritsDesignatedInitializers(), if there ↵Argyrios Kyrtzidis2014-04-261-3/+13
| | | | | | | | | | are no designated initializers in the super class hierarchy then it should return false. rdar://16692535 llvm-svn: 207332
* Add mangling for attribute enable_if. The demangling patch for libcxxabi is ↵Nick Lewycky2014-04-261-0/+19
| | | | | | still in review. llvm-svn: 207296
* Print detailed vector type information on diagnostics.Benjamin Kramer2014-04-251-0/+14
| | | | | | | | | | | | | | | | | | | | | | We never aka vector types because our attributed syntax for it is less comprehensible than the typedefs. This leaves the user in the dark when the typedef isn't named that well. Example: v2s v; v4f w; w = v; The naming in this cases isn't even that bad, but the error we give is useless without looking up the actual typedefs. t.c:6:5: error: assigning to 'v4f' from incompatible type 'v2s' Now: t.c:6:5: error: assigning to 'v4f' (vector of 4 'float' values) from incompatible type 'v2s' (vector of 2 'int' values) We do this for all diagnostics that print a vector type. llvm-svn: 207267
* MicrosoftVTableContext: Don't leak VPtrInfos. Found by LSan, PR19522.Nico Weber2014-04-241-0/+2
| | | | llvm-svn: 207138
* Suppress unused variable warningReid Kleckner2014-04-231-1/+3
| | | | llvm-svn: 207039
* Make TypeDecl much less friendly.Richard Smith2014-04-233-14/+13
| | | | llvm-svn: 207007
* MS ABI: Implement mangling for ref-qualifiers on methodsDavid Majnemer2014-04-231-0/+20
| | | | | | | | Mangle ref-qualifiers like the Nov 2013 CTP. This fixes PR19361. llvm-svn: 206946
* MS ABI: Use range-based for loops in the manglerDavid Majnemer2014-04-231-16/+9
| | | | | | No functional change. llvm-svn: 206945
* MS ABI: Cleanup some egregious style violationsDavid Majnemer2014-04-231-39/+33
| | | | | | No functional change. llvm-svn: 206944
* AST: Cleanup/simplify some LV calculation codeDavid Majnemer2014-04-231-20/+16
| | | | | | No functional change. llvm-svn: 206943
* Fix PR19487, PR19505 and PR19506 -- redundant vtordisp thunks when the final ↵Timur Iskhodzhanov2014-04-221-17/+13
| | | | | | | | overrider is present in both a vbase and nvbase Reviewed at http://reviews.llvm.org/D3449 llvm-svn: 206908
* [OPENMP] parsing 'linear' clause (for directive 'omp simd')Alexander Musman2014-04-223-0/+40
| | | | | | Differential Revision: http://reviews.llvm.org/D3272 llvm-svn: 206891
* Comment parsing: in the generated XML file, mark HTML that is safe to passDmitri Gribenko2014-04-221-4/+29
| | | | | | | | | | | through to the output even if the input comment comes from an untrusted source Attribute filtering is currently based on a blacklist, which right now includes all event handler attributes (they contain JavaScipt code). It should be switched to a whitelist, but going over all of the HTML5 spec requires a significant amount of time. llvm-svn: 206882
OpenPOWER on IntegriCloud