summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Adding a title to appease the sphinx build bot.Aaron Ballman2015-06-231-0/+4
| | | | llvm-svn: 240430
* AttributeReference.rst is automatically generated by a server-side process ↵Aaron Ballman2015-06-231-1699/+5
| | | | | | currently. To cut down on accidental commits to this file that are not properly reflected in AttrDocs.td (such as r215806 - r215808), this file now contains nothing but a comment explaining the current state of affairs. llvm-svn: 240428
* [OPENMP] Initial support for 'depend' clause (4.0).Alexey Bataev2015-06-2320-19/+397
| | | | | | Parsing and sema analysis (without support for array sections in arguments) for 'depend' clause (used in 'task' directive, OpenMP 4.0). llvm-svn: 240409
* Update for LLVM api change.Rafael Espindola2015-06-232-4/+6
| | | | llvm-svn: 240406
* Moving r215806, r215807, and r215808 into AttrDocs.td. These changes were ↵Aaron Ballman2015-06-231-0/+5
| | | | | | originally applied to the RST file that is automatically generated by the server, and so the changes were never properly reflected online once the server overwrote AttributeReference.rst. llvm-svn: 240402
* Fixing a build bot break from r240400.Aaron Ballman2015-06-231-2/+3
| | | | llvm-svn: 240401
* Clarify pointer ownership semantics by hoisting the std::unique_ptr creation ↵Aaron Ballman2015-06-2344-271/+244
| | | | | | to the caller instead of hiding it in emitReport. NFC. llvm-svn: 240400
* Fix a warning. [-Wsign-compare]NAKAMURA Takumi2015-06-231-1/+1
| | | | | FIXME: Should "Level" be unsigned? llvm-svn: 240391
* Silence VC warning C4715: '`anonymous namespace'::getNativeVectorSizeForA ↵Yaron Keren2015-06-231-0/+1
| | | | | | | | VXABI' : not all control paths return a value. llvm-svn: 240389
* Write output file to temp directory. The tests shouldn't assume thatDaniel Jasper2015-06-231-2/+2
| | | | | | they can write to the current working directory. llvm-svn: 240388
* Tweak clang/test/Modules/modules-with-same-name.m to run with GnuWin32's ↵NAKAMURA Takumi2015-06-231-3/+3
| | | | | | | | | find.exe on newer version of Windows. It seems "*.pcm" would be expanded with current directory by NTOS 6.x's msvcrt. GnuWin32 utils are affected. To avoid the issue, put an expression that msvcrt's glob won't match, like "*.pc[m]". llvm-svn: 240387
* [MS ABI] Rework member pointer conversionDavid Majnemer2015-06-236-68/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Member pointers in the MS ABI are made complicated due to the following: - Virtual methods in the most derived class (MDC) might live in a vftable in a virtual base. - There are four different representations of member pointer: single inheritance, multiple inheritance, virtual inheritance and the "most general" representation. - Bases might have a *more* general representation than classes which derived from them, a most surprising result. We believed that we could treat all member pointers as-if they were a degenerate case of the multiple inheritance model. This fell apart once we realized that implementing standard member pointers using this ABI requires referencing members with a non-zero vbindex. On a bright note, all but the virtual inheritance model operate rather similarly. The virtual inheritance member pointer representation awkwardly requires a virtual base adjustment in order to refer to entities in the MDC. However, the first virtual base might be quite far from the start of the virtual base. This means that we must add a negative non-virtual displacement. However, things get even more complicated. The most general representation interprets vbindex zero differently from the virtual inheritance model: it doesn't reference the vbtable at all. It turns out that this complexity can increase for quite some time: consider a derived to base conversion from the most general model to the multiple inheritance model... To manage this complexity we introduce a concept of "normalized" member pointer which allows us to treat all three models as the most general model. Then we try to figure out how to map this generalized member pointer onto the destination member pointer model. I've done my best to furnish the code with comments explaining why each adjustment is performed. This fixes PR23878. llvm-svn: 240384
* [MS ABI] Refactor member pointer generationDavid Majnemer2015-06-231-28/+75
| | | | | | | | | | | | | | | | The MS ABI has very complicated member pointers. Don't attempt to synthesize the final member pointer ab ovo usque ad mala in one go. Instead, start with a member pointer which points to the declaration in question as-if it's decl context was the target class. Then, utilize our conversion logical to convert it to the target type. This allows us to simplify how we think about member pointers because we don't need to consider non-zero nv adjustments before we even generate the member pointer. Furthermore, it gives our adjustment logic more exposure by utilizing it in a common path. llvm-svn: 240383
* [CodeGen] Rename EmitMemberPointer to EmitMemberFunctionPointerDavid Majnemer2015-06-236-11/+12
| | | | llvm-svn: 240382
* [OPENMP] Do not emit references to original variables in 'private' clause.Alexey Bataev2015-06-2310-63/+90
| | | | | | | Currently if the variable is captured in captured region, capture record for this region stores reference to this variable for future use. But we don't need to provide the reference to the original variable if it was explicitly marked as private in the 'private' clause of the OpenMP construct, this variable is replaced by private copy. Differential Revision: http://reviews.llvm.org/D9550 llvm-svn: 240377
* Eliminate "enumeration value not handled in switch" warningsDouglas Katzman2015-06-231-0/+2
| | | | | | (Caused by r240370) llvm-svn: 240376
* Change some if/else chains to 'switch' statements. NFCDouglas Katzman2015-06-231-24/+46
| | | | | | Differential Revision: http://reviews.llvm.org/D10612 llvm-svn: 240370
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-22344-643/+619
| | | | llvm-svn: 240353
* [modules] When building a module, if there are multiple matches for a headerRichard Smith2015-06-226-0/+12
| | | | | | | file in the loaded module maps and one of them is from the current module, that's the right match. llvm-svn: 240350
* Update for LLVM API change to return by InputArgList directly (rather than ↵David Blaikie2015-06-225-87/+89
| | | | | | by pointer) from ParseArgs llvm-svn: 240349
* [CodeGen] Teach X86_64ABIInfo about AVX512.Ahmed Bougacha2015-06-224-5/+93
| | | | | | | | | | | | | | | | As specified in the SysV AVX512 ABI drafts. It follows the same scheme as AVX2: Arguments of type __m512 are split into eight eightbyte chunks. The least significant one belongs to class SSE and all the others to class SSEUP. This also means we change the OpenMP SIMD default alignment on AVX512. Based on r240337. Differential Revision: http://reviews.llvm.org/D9894 llvm-svn: 240338
* [CodeGen] Use enum for AVX level in X86*TargetCodeGenInfo. NFCI.Ahmed Bougacha2015-06-221-21/+44
| | | | | | | Follow-up to r237989: expressing the AVX level as an enum makes it simple to extend it with AVX512. llvm-svn: 240337
* [modules] Add a flag to disable the feature that permits conflicting ↵Richard Smith2015-06-226-7/+25
| | | | | | | | | | | | redefinitions of internal-linkage symbols that are not visible. Such conflicts are an accident waiting to happen, and this feature conflicts with the desire to include existing headers into multiple modules and merge the results. (In an ideal world, it should not be possible to export internal linkage symbols from a module, but sadly the glibc and libstdc++ headers provide 'static inline' functions in a few cases.) llvm-svn: 240335
* Add comment about the importance of being adjacent. NFCDouglas Katzman2015-06-221-0/+3
| | | | llvm-svn: 240328
* test: Set lit features appropriately when using asan and ubsan togetherJustin Bogner2015-06-221-4/+3
| | | | | | | | | The asan/not_asan and ubsan/not_ubsan features weren't being set correctly when LLVM_USE_SANITIZER is set to 'Address;Undefined'. Fix this by doing substring instead of exact matching. Also simplify the msan check for consistency. llvm-svn: 240314
* [modules] Include merged definition information in AST dumps.Richard Smith2015-06-221-0/+4
| | | | llvm-svn: 240313
* Misc. cleanups suggested by Aaron BallmanDouglas Gregor2015-06-222-7/+13
| | | | llvm-svn: 240297
* Document the nullability attributes.Douglas Gregor2015-06-223-110/+808
| | | | llvm-svn: 240296
* Don't use &* when get() will suffice; NFC.Aaron Ballman2015-06-221-4/+4
| | | | llvm-svn: 240279
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-22344-619/+643
| | | | | | | | | | | | The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. llvm-svn: 240270
* Remove incomplete comment.Davide Italiano2015-06-221-1/+0
| | | | llvm-svn: 240252
* Sema: add a helper for enumerating the TST id (NFC)Saleem Abdulrasool2015-06-212-17/+22
| | | | | | | | | | The same pattern was repeated a few times. Create a trivial helper method to map the Type Specifier to an ID for the diagnostic. Flip the selection order on one of the diagnostic messages to get the same ordering across all of the messages. This makes the emission of the diagnostic slightly more legible by changing the cascading ternary into a switch in a function. NFC. llvm-svn: 240251
* Clean up CLCompatOptions.td a bit.Nico Weber2015-06-211-27/+34
| | | | | | | | | | Move /Qvec flags from the "// Non-aliases:" section up to the "// Aliases:" section since the flags are just aliases. For the same reason, move the /vm flags the other way. Also reflow a few lines to 80 columns. No behavior change. llvm-svn: 240248
* ASTReader: Treat InputFileOffsets as unaligned to avoid UBJustin Bogner2015-06-212-2/+4
| | | | | | | | | | This is a better approach to fixing the undefined behaviour I tried to fix in r240228. This data doesn't necessarily have suitable alignment for uint64_t, so use unaligned_uint64_t instead. This fixes 225 test failures when clang is built with ubsan. llvm-svn: 240247
* Revert "ASTReader: Copy input file offset data to avoid unaligned accesses"Justin Bogner2015-06-212-11/+3
| | | | | | | | | We can do this better by changing the type to unaligned_uint64_t and paying the cost on use instead of up front. This reverts r240228 llvm-svn: 240246
* Sema: convert decl + while loop into for loop (NFC)Saleem Abdulrasool2015-06-211-3/+2
| | | | | | Convert a hand rolled for loop into an explicit for loop. NFC. llvm-svn: 240245
* [Codegen] Don't crash if destructor is not accessible.Davide Italiano2015-06-212-0/+23
| | | | | | | | | | | Testcase provided, in the PR, by Christian Shelton and reduced by David Majnemer. PR: 23584 Differential Revision: http://reviews.llvm.org/D10508 Reviewed by: rnk llvm-svn: 240242
* ArrayRef-ify ParseArgsDavid Blaikie2015-06-214-12/+10
| | | | llvm-svn: 240237
* ASTReader: Copy input file offset data to avoid unaligned accessesJustin Bogner2015-06-202-3/+11
| | | | | | | | | | We interpret Blob as an array of uint64_t here, but there's no reason to think that it has suitable alignment. Instead, read the data in in an alignment-safe way and store it in a std::vector. This fixes 225 test failures when clang is built with ubsan. llvm-svn: 240228
* Introduce a PCHContainerOperations interface (NFC).Adrian Prantl2015-06-2038-374/+694
| | | | | | | | | | | | | | | | A PCHContainerOperations abstract interface provides operations for creating and unwrapping containers for serialized ASTs (precompiled headers and clang modules). The default implementation is RawPCHContainerOperations, which uses a flat file for the output. The main application for this interface will be an ObjectFilePCHContainerOperations implementation that uses LLVM to wrap the module in an ELF/Mach-O/COFF container to store debug info alongside the AST. rdar://problem/20091852 llvm-svn: 240225
* Avoid clearing an empty PrioritizedCXXGlobalInits, NFCYaron Keren2015-06-201-1/+1
| | | | | | | We already test for PrioritizedCXXGlobalInits being non-empty and process it so it makes sense to clear it only in that if. llvm-svn: 240220
* ASTContext.h: Fix utf8 chars in comments.NAKAMURA Takumi2015-06-201-4/+4
| | | | llvm-svn: 240211
* SemaDeclObjC.cpp: Escape '@' in the comment. [-Wdocumentation]NAKAMURA Takumi2015-06-201-1/+1
| | | | llvm-svn: 240209
* [modules] When determining whether a definition of a class is visible, check ↵Richard Smith2015-06-208-3/+41
| | | | | | all modules even if we've already found a definition that's not visible. llvm-svn: 240204
* [modules] Refactor and slightly simplify class definition merging.Richard Smith2015-06-201-48/+26
| | | | llvm-svn: 240200
* Suppress bogus gcc -Wreturn-type warnings.Nico Weber2015-06-204-0/+4
| | | | llvm-svn: 240199
* Yet another MSVC-related fix.Douglas Gregor2015-06-191-1/+1
| | | | llvm-svn: 240196
* Try to fix the MSVC buildDouglas Gregor2015-06-191-1/+1
| | | | llvm-svn: 240190
* Stop moving attributes off of a block literal's decl specifiers.Douglas Gregor2015-06-192-3/+8
| | | | | | | | | | These usually apply to the return type. At one point this was necessary to get some of them to apply to the entire block, but it appears that's working anyway (see block-return.c). rdar://problem/20468034 llvm-svn: 240189
* Handle 'instancetype' in ParseDeclarationSpecifiers.Douglas Gregor2015-06-194-35/+38
| | | | | | | | | | ...instead of as a special case in ParseObjCTypeName with lots of duplicated logic. Besides being a nice refactoring, this also allows "- (instancetype __nonnull)self" in addition to "- (nonnull instancetype)self". rdar://problem/19924646 llvm-svn: 240188
OpenPOWER on IntegriCloud