summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Refer to error_code with the std prefix.Rafael Espindola2014-06-121-1/+1
| | | | llvm-svn: 210817
* Use StringRef to simplify code. No functional change.Craig Topper2014-06-121-13/+10
| | | | llvm-svn: 210751
* Use ArrayRef in some function parameters instead of a pointer and count. No ↵Craig Topper2014-06-121-10/+6
| | | | | | functional change. llvm-svn: 210750
* Add missing "non-constant" diagnostic for a member call on a temporary ofRichard Smith2014-06-111-0/+1
| | | | | | non-literal class type. llvm-svn: 210696
* MS ABI: Only class templates get complex nullptr pointer-to-member-functionsDavid Majnemer2014-06-111-4/+7
| | | | | | | | | | | r210637 regressed CodeGenCXX/mangle-ms-templates-memptrs.cpp because it did not believe that there is a distinction between class templates and function templates. Sadly, there is. Function templates should behave in a compatible manner with MSVC. llvm-svn: 210642
* MS ABI: Mangle null pointer-to-member-functions compatiblyDavid Majnemer2014-06-111-24/+25
| | | | | | | | | | | | | | | | | | | | | Summary: Previously, we would mangle nullptr pointer-to-member-functions in class templates with a mangling we invented because contemporary versions of MSVC would crash when trying to compile such code. However, VS "14" can successfully compile these sorts of template instantiations. This commit updates our mangling to be compatible with theirs. Reviewers: rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4059 llvm-svn: 210637
* CodeGen: Correct linkage of thread_local for OS XDavid Majnemer2014-06-111-8/+0
| | | | | | | | | | | | | The backing store of thread local variables is internal for OS X and all accesses must go through the thread wrapper. However, individual TUs may have inlined through the thread wrapper. To fix this, give the thread wrapper functions WeakAnyLinkage. This prevents them from getting inlined into call-sites. This fixes PR19989. llvm-svn: 210632
* Teach __alignof__ to look through arrays before performing theRichard Smith2014-06-101-9/+1
| | | | | | | preferred-alignment transformations. Corrects alignof(T[]) to return alignof(T) in all cases, as required by relevant standards. llvm-svn: 210609
* Related to PR19992: when the GNU alignof-expression extension is applied to anRichard Smith2014-06-102-6/+12
| | | | | | | expression of array-of-unknown-bound type, don't try to complete the array bound, and return the alignment of the element type rather than 1. llvm-svn: 210608
* Fix mangling of __uuidof after two levels of template instantiationReid Kleckner2014-06-101-0/+3
| | | | llvm-svn: 210570
* Removing an "if (this == nullptr)" check from two print methods. The conditionRichard Trieu2014-06-094-10/+16
| | | | | | | will never be true in a well-defined context. The checking for null pointers has been moved into the caller logic so it does not rely on undefined behavior. llvm-svn: 210498
* MS ABI: Simplify microsoft mangling of template instantiationsDavid Majnemer2014-06-081-28/+18
| | | | | | | | | | | Use mangled template instantiation name as key for back references. Templates have their own context for back references, so their mangling is always the same regardless of context. This avoids mangling template instantiations twice. Patch by Agustín Bergé! llvm-svn: 210416
* Fix crash declaring global allocation function with zero parameters. Fixes ↵Nick Lewycky2014-06-071-1/+1
| | | | | | PR19968! llvm-svn: 210388
* Delay lookup of simple default template arguments under -fms-compatibilityReid Kleckner2014-06-061-2/+0
| | | | | | | | | | | | | | | | | | MSVC delays parsing of default arguments until instantiation. If the default argument is never used, it is never parsed. We don't model this. Instead, if lookup of a type name fails in a template argument context, we form a DependentNameType, which will be looked up at instantiation time. This fixes errors about 'CControlWinTraits' in atlwin.h. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D3995 llvm-svn: 210382
* Adding a new #pragma for the vectorize and interleave optimization hints.Aaron Ballman2014-06-061-2/+16
| | | | | | Patch thanks to Tyler Nowicki! llvm-svn: 210330
* PR19936: Fix a really dumb bug where we would profile dependent operator* ↵Richard Smith2014-06-051-6/+6
| | | | | | expressions incorrectly. llvm-svn: 210296
* Remove old proposal noticesAlp Toker2014-06-051-3/+0
| | | | | | Let's just go ahead and assume the answer was 'I do' llvm-svn: 210295
* Implement -Wframe-larger-than backend diagnosticAlp Toker2014-06-051-2/+11
| | | | | | | | | | | | | | | | | | Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning. This is the first GCC-compatible backend diagnostic built around LLVM's reporting feature. This commit adds infrastructure to perform reverse lookup from mangled names emitted after LLVM IR generation. We use that to resolve precise locations and originating AST functions, lambdas or block declarations to produce seamless codegen-guided diagnostics. An associated change, StringMap now maintains unique mangled name strings instead of allocating copies. This is a net memory saving in C++ and a small hit for C where we no longer reuse IdentifierInfo storage, pending further optimisation. llvm-svn: 210293
* Cleanup, and always create a DecltypeType for a decltype expression, ratherRichard Smith2014-06-051-21/+16
| | | | | | | than omitting it the first time we see a decltype type with a particular expression. llvm-svn: 210283
* MS-ABI: Mangle empty template parameter packs correctlyDavid Majnemer2014-06-041-4/+9
| | | | | | Tested for compatibility with VS2013. llvm-svn: 210198
* MS-ABI: Implement user defined literalsDavid Majnemer2014-06-041-5/+2
| | | | | | | | | Straightforward implementation of UDLs, it's compatible with VS "14". This nearly completes our implementation of C++ name mangling for the MS-ABI. llvm-svn: 210197
* [OPENMP] Parsing/Sema for OMPLasprivateClause.Alexander Musman2014-06-043-0/+34
| | | | | | Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks. llvm-svn: 210184
* Teach AST dumper to dump the array filler in an initializer list.Richard Smith2014-06-031-0/+17
| | | | llvm-svn: 210090
* Rename utility function templatesAlp Toker2014-05-311-6/+6
| | | | | | | isExternCTemplate() and getLanguageLinkageTemplate() have nothing to do with templates despite the dubious naming scheme. llvm-svn: 209969
* AST Dump: print the Inherited flag on attributesHans Wennborg2014-05-311-1/+3
| | | | | | | | | Also move the attribute-specific dumping to after dumping this and the Implicit flag. Differential Revision: http://reviews.llvm.org/D3971 llvm-svn: 209965
* Take PrintingPolicy::SuppressUnwrittenScope into account when printing theRichard Smith2014-05-301-0/+3
| | | | | | qualified name of a NamedDecl. Patch by Volodymyr Sapsai! llvm-svn: 209924
* Parsing/Sema for OMPAlignedClause.Alexander Musman2014-05-293-0/+38
| | | | llvm-svn: 209816
* Move the logic for testing for namespace std into one location. This check canRichard Trieu2014-05-282-8/+21
| | | | | | be performed by using Decl::isInStdNamespace or DeclContext::isStdNamespace llvm-svn: 209708
* Retain isImplicit flag for local variable declarations when instantiatingAlexander Kornienko2014-05-271-0/+2
| | | | | | | | | | | | | | templates. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3924 llvm-svn: 209686
* Add range accessors for captures of a LambdaExpr.James Dennett2014-05-271-0/+12
| | | | | | | | | | | | | Summary: This adds LambdaExpr::captures(), LambdaExpr::explicit_captures() and LambdaExpr::implicit_captures() as simple wrappers over the underlying *_begin()/*_end() functions. Reviewers: aaron.ballman Differential Revision: http://reviews.llvm.org/D3926 llvm-svn: 209679
* Parsing/Sema for OMPCollapseClause.Alexander Musman2014-05-272-0/+11
| | | | | | Actual usage in Sema for collapsing loops will in some future patch. llvm-svn: 209660
* AArch64/ARM64: update Clang after AArch64 removal.Tim Northover2014-05-241-4/+4
| | | | | | | | | | | A few (mostly CodeGen) parts of Clang were tightly coupled to the AArch64 backend. Now that it's gone, they will not even compile. I've also deduplicated RUN lines in many of the AArch64 tests. This might improve "make check-all" time noticably: some of those NEON tests were monsters. llvm-svn: 209578
* CXXInfo memory should be released after calling the destructorYaron Keren2014-05-241-1/+1
| | | | | | | instead of before. The wrong order had no effect since Deallocate() does nothing right now, but we may replace allocator in the future. llvm-svn: 209567
* [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
OpenPOWER on IntegriCloud