summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix __has_cpp_attribute expansion to produce trailing L and (whereRichard Smith2019-06-211-2/+10
| | | | | | | | necessary) leading whitespace. Simplify unit test and extend to cover no_unique_address attribute. llvm-svn: 364102
* Devirtualize destructor of final class.Hiroshi Yamauchi2019-06-211-3/+27
| | | | | | | | | | | | | | | | | | | Summary: Take advantage of the final keyword to devirtualize destructor calls. Fix https://bugs.llvm.org/show_bug.cgi?id=21368 Reviewers: rsmith Reviewed By: rsmith Subscribers: davidxl, Prazek, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63161 llvm-svn: 364100
* [clang-scan-deps] print the dependencies to stdoutAlex Lorenz2019-06-211-0/+4
| | | | | | | | and remove the need to use -MD options in the CDB Differential Revision: https://reviews.llvm.org/D63579 llvm-svn: 364088
* [OPENMP]Fix PR42068: Vla type is not captured.Alexey Bataev2019-06-211-0/+27
| | | | | | | | If the variably modified type is declared outside of the captured region and then used in the cast expression along with array subscript expression, the type is not captured and it leads to the compiler crash. llvm-svn: 364080
* Ensure that top-level QualType objects also have a "kind" field when dumping ↵Aaron Ballman2019-06-211-0/+1
| | | | | | the AST to JSON. llvm-svn: 364078
* [OpenCL][PR41963] Add generic addr space to old atomics in C++ modeAnastasia Stulova2019-06-211-0/+45
| | | | | | | | | Add overloads with generic address space pointer to old atomics. This is currently only added for C++ compilation mode. Differential Revision: https://reviews.llvm.org/D62335 llvm-svn: 364071
* Print more type node information when dumping the AST to JSON.Aaron Ballman2019-06-211-0/+20
| | | | llvm-svn: 364067
* [OPENMP]Fix PR42159: do not capture threadprivate variables.Alexey Bataev2019-06-211-2/+5
| | | | | | | The threadprivate variables should not be captured in the outlined regions, otherwise it leads to the compiler crash. llvm-svn: 364061
* Print information about various type nodes when dumping the AST to JSON.Aaron Ballman2019-06-211-0/+119
| | | | llvm-svn: 364043
* [Sema] Fix diagnostic for addr spaces in reference bindingAnastasia Stulova2019-06-211-8/+18
| | | | | | | | Extend reference binding behavior to account for address spaces. Differential Revision: https://reviews.llvm.org/D62914 llvm-svn: 364032
* [Sema] Improved diagnostic for qualifiers in reference bindingAnastasia Stulova2019-06-211-1/+2
| | | | | | | | | Improved wording and also simplified by using printing method from qualifiers. Differential Revision: https://reviews.llvm.org/D62914 llvm-svn: 364023
* [OpenCL] Remove duplicate read_image declarationsSven van Haastregt2019-06-211-47/+0
| | | | | | Patch by Pierre Gondois. llvm-svn: 364020
* [RISC-V] Add -msave-restore and -mno-save-restore to clang driverSam Elliott2019-06-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The GCC RISC-V toolchain accepts `-msave-restore` and `-mno-save-restore` to control whether libcalls are used for saving and restoring the stack within prologues and epilogues. Clang currently errors if someone passes -msave-restore or -mno-save-restore. This means that people need to change build configurations to use clang. This patch adds these flags, so that clang invocations can now match gcc. As the RISC-V backend does not currently have a `save-restore` target feature, we emit a warning if someone requests `-msave-restore`. LLVM does not error if we pass the (unimplemented) target features `+save-restore` or `-save-restore`. Reviewers: asb, luismarques Reviewed By: asb Subscribers: rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63498 llvm-svn: 364018
* [clang] Small improvments after Adding APValue to ConstantExprGauthier Harnisch2019-06-215-15/+41
| | | | | | | | | | | | | | | | | | | | | | | Summary: this patch has multiple small improvements related to the APValue in ConstantExpr. changes: - APValue in ConstantExpr are now cleaned up using ASTContext::addDestruction instead of there own system. - ConstantExprBits Stores the ValueKind of the result beaing stored. - VerifyIntegerConstantExpression now stores the evaluated value in ConstantExpr. - the Constant Evaluator uses the stored value of ConstantExpr when available. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63376 llvm-svn: 364011
* [analyzer] DeadStores: Update the crude suppression for files generated by IIG.Artem Dergachev2019-06-201-1/+1
| | | | | | They changed the comments that we were looking for. llvm-svn: 363995
* Print information about various ObjC expression nodes when dumping the AST ↵Aaron Ballman2019-06-201-0/+90
| | | | | | to JSON. llvm-svn: 363988
* Rename CodeGenFunction::overlapFor* to getOverlapFor*.Richard Smith2019-06-206-15/+15
| | | | llvm-svn: 363980
* P0840R2: support for [[no_unique_address]] attributeRichard Smith2019-06-2011-77/+217
| | | | | | | | | | | | | | | | | Summary: Add support for the C++2a [[no_unique_address]] attribute for targets using the Itanium C++ ABI. This depends on D63371. Reviewers: rjmccall, aaron.ballman Subscribers: dschuff, aheejin, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63451 llvm-svn: 363976
* [clang-tidy] Fail gracefully upon empty database fieldsSerge Guelton2019-06-202-3/+5
| | | | | | | | Fix bz#42281 Differential Revision: https://reviews.llvm.org/D63613 llvm-svn: 363975
* Fix passing structs and AVX vectors through sysv_abiReid Kleckner2019-06-201-8/+18
| | | | | | | | Do this the same way we did it for ms_abi in r324594. Fixes PR36806. llvm-svn: 363973
* Fix crash and rejects-valid when a later template parameter or defaultRichard Smith2019-06-203-12/+39
| | | | | | | | | | | | | | | | | | | | template argument contains a backreference to a dependently-typed earlier parameter. In a case like: template<typename T, T A, decltype(A) = A> struct X {}; template<typename U> auto Y = X<U, 0>(); we previously treated both references to `A` in the third parameter as being of type `int` when checking the template-id in `Y`. That`s wrong; the type of `A` in these contexts is the dependent type `U`. When we encounter a non-type template argument that we can't convert to the parameter type because of type-dependence, we now insert a dependent conversion node so that the SubstNonTypeTemplateParmExpr for the template argument will have the parameter's type rather than whatever type the argument had. llvm-svn: 363972
* [clang][NewPM] Move EntryExitInstrumenterPass to the start of the pipelineLeonard Chan2019-06-201-0/+6
| | | | | | | | | | This fixes CodeGen/x86_64-instrument-functions.c when running under the new pass manager. The pass should go before any other pass to prevent `__cyg_profile_func_enter/exit()` from not being emitted by inlined functions. Differential Revision: https://reviews.llvm.org/D63577 llvm-svn: 363969
* Print additional information about @encode expressions when dumping the AST ↵Aaron Ballman2019-06-201-0/+4
| | | | | | to JSON. llvm-svn: 363966
* Print additional information on dependent scopes when dumping the AST to JSON.Aaron Ballman2019-06-201-0/+17
| | | | llvm-svn: 363965
* [X86] Make _mm_mask_cvtps_ph, _mm_maskz_cvtps_ph, _mm256_mask_cvtps_ph, and ↵Craig Topper2019-06-202-44/+8
| | | | | | | | | | | | | | _mm256_maskz_cvtps_ph aliases for their corresponding cvt_roundps_ph intrinsic. These intrinsics should always take an immediate for the rounding mode. The base instruction comes from before EVEX embdedded rounding. The user should always provide the immediate rather than us assuming CUR_DIRECTION. Make the 512-bit versions also explicit aliases instead of copy pasting the code. llvm-svn: 363961
* [OpenMP] Add support for handling declare target to clause when unified ↵Gheorghe-Teodor Bercea2019-06-205-36/+76
| | | | | | | | | | | | | | | | | | | | | memory is required Summary: This patch adds support for the handling of the variables under the declare target to clause. The variables in this case are handled like link variables are. A pointer is created on the host and then mapped to the device. The runtime will then copy the address of the host variable in the device pointer. Reviewers: ABataev, AlexEichenberger, caomhin Reviewed By: ABataev Subscribers: guansong, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63108 llvm-svn: 363959
* Store a pointer to the return value in a static alloca and let the debugger ↵Amy Huang2019-06-205-11/+44
| | | | | | | | | | | | | | use that as the variable address for NRVO variables. Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63361 llvm-svn: 363952
* [clang-ifs] Clang Interface Stubs, first version (second landing attempt).Puyan Lotfi2019-06-206-0/+426
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change reverts r363649; effectively re-landing r363626. At this point clang::Index::CodegenNameGeneratorImpl has been refactored into clang::AST::ASTNameGenerator. This makes it so that the previous circular link dependency no longer exists, fixing the previous share lib (-DBUILD_SHARED_LIBS=ON) build issue which was the reason for r363649. Clang interface stubs (previously referred to as clang-ifsos) is a new frontend action in clang that allows the generation of stub files that contain mangled name info that can be used to produce a stub library. These stub libraries can be useful for breaking up build dependencies and controlling access to a library's internal symbols. Generation of these stubs can be invoked by: clang -fvisibility=<visibility> -emit-interface-stubs \ -interface-stub-version=<interface format> Notice that -fvisibility (along with use of visibility attributes) can be used to control what symbols get generated. Currently the interface format is experimental but there are a wide range of possibilities here. Currently clang-ifs produces .ifs files that can be thought of as analogous to object (.o) files, but just for the mangled symbol info. In a subsequent patch I intend to add support for merging the .ifs files into one .ifs/.ifso file that can be the input to something like llvm-elfabi to produce something like a .so file or .dll (but without any of the code, just symbols). Differential Revision: https://reviews.llvm.org/D60974 llvm-svn: 363948
* [Sema] Diagnose addr space mismatch while constructing objectsAnastasia Stulova2019-06-203-3/+34
| | | | | | | | | | | | | | If we construct an object in some arbitrary non-default addr space it should fail unless either: - There is an implicit conversion from the address space to default /generic address space. - There is a matching ctor qualified with an address space that is either exactly matching or convertible to the address space of an object. Differential Revision: https://reviews.llvm.org/D62156 llvm-svn: 363944
* Dump more information about expressions involving temporaries when dumping ↵Aaron Ballman2019-06-201-0/+45
| | | | | | the AST to JSON. llvm-svn: 363943
* AIX system headers need stdint.h and inttypes.h to be re-enterableXing Xue2019-06-202-0/+10
| | | | | | | | | | | | | | | | | Summary: AIX system headers need stdint.h and inttypes.h to be re-enterable when macro _STD_TYPES_T is defined so that limit macro definitions such as UINT32_MAX can be found. This patch attempts to allow that on AIX. Reviewers: hubert.reinterpretcast, jasonliu, mclow.lists, EricWF Reviewed by: hubert.reinterpretcast, mclow.lists Subscribers: jfb, jsji, christof, cfe-commits, libcxx-commits, llvm-commits Tags: #LLVM, #clang, #libc++ Differential Revision: https://reviews.llvm.org/D59253 llvm-svn: 363939
* Removing a helper function that was trivial to inline into its only use; NFC.Aaron Ballman2019-06-201-8/+3
| | | | llvm-svn: 363935
* Dump more information about construct expressions (resolved and unresolved) ↵Aaron Ballman2019-06-201-0/+32
| | | | | | when dumping the AST to JSON. llvm-svn: 363926
* Revert "[clang] Fixing windows buildbot after D61552"Gauthier Harnisch2019-06-201-2/+0
| | | | | | | | This reverts commit 5d5d2ca69e2b29b36db1a7dd1993ead7b7d2680f. has already been fixed by c230eea2f349533468e14672eee94c2016476784 llvm-svn: 363920
* [clang] Fixing windows buildbot after D61552Gauthier Harnisch2019-06-201-0/+2
| | | | | | | | | | | | | | | | Summary: original review : https://reviews.llvm.org/D61552 build bot faillure : http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/110 this adds a missing definition of cxxDeductionGuideDecl. surprisingly it was still working on linux with out it. Reviewers: aaron.ballman Differential Revision: https://reviews.llvm.org/D63592 llvm-svn: 363919
* [clang][ASTMatchers] Add definition for cxxDeductionGuideDecl introduced in ↵Kadir Cetinkaya2019-06-201-0/+2
| | | | | | rL363855 llvm-svn: 363917
* [clang][AST] Refactoring ASTNameGenerator to use pimpl pattern (NFC).Puyan Lotfi2019-06-201-146/+168
| | | | | | | | | | | The original pimpl pattern used between CodegenNameGenerator and CodegenNameGeneratorImpl did a good job of hiding DataLayout making it so that users of CodegenNameGenerator did not need to link with llvm core. This is an NFC change to neatly wrap ASTNameGenerator in a pimpl. Differential Revision: https://reviews.llvm.org/D63584 llvm-svn: 363908
* [analyzer] exploded-graph-rewriter: Fix escaping StringRegions.Artem Dergachev2019-06-191-2/+4
| | | | | | | | | | | Quotes around StringRegions are now escaped and unescaped correctly, producing valid JSON. Additionally, add a forgotten escape for Store values. Differential Revision: https://reviews.llvm.org/D63519 llvm-svn: 363897
* [analyzer] Fix JSON dumps for store clusters.Artem Dergachev2019-06-191-1/+2
| | | | | | | | | | Include a unique pointer so that it was possible to figure out if it's the same cluster in different program states. This allows comparing dumps of different states against each other. Differential Revision: https://reviews.llvm.org/D63362 llvm-svn: 363896
* [analyzer] Fix JSON dumps for location contexts.Artem Dergachev2019-06-193-7/+4
| | | | | | | | | | | Location context ID is a property of the location context, not of an item within it. It's useful to know the id even when there are no items in the context, eg. for the purposes of figuring out how did contents of the Environment for the same location context changed across states. Differential Revision: https://reviews.llvm.org/D62754 llvm-svn: 363895
* [analyzer] Fix JSON dumps for dynamic type information.Artem Dergachev2019-06-191-2/+2
| | | | | | | | They're now valid JSON. Differential Revision: https://reviews.llvm.org/D62716 llvm-svn: 363894
* [analyzer] NFC: Change evalCall() to provide a CallEvent.Artem Dergachev2019-06-1910-84/+92
| | | | | | | | | | | | This changes the checker callback signature to use the modern, easy to use interface. Additionally, this unblocks future work on allowing checkers to implement evalCall() for calls that don't correspond to any call-expression or require additional information that's only available as part of the CallEvent, such as C++ constructors and destructors. Differential Revision: https://reviews.llvm.org/D62440 llvm-svn: 363893
* [analyzer] DeadStores: Add a crude suppression files generated by DriverKit IIG.Artem Dergachev2019-06-191-0/+23
| | | | | | | | | | | | IIG is a replacement for MIG in DriverKit: IIG is autogenerating C++ code. Suppress dead store warnings on such code, as the tool seems to be producing them regularly, and the users of IIG are not in position to address these warnings, as they don't control the autogenerated code. IIG-generated code is identified by looking at the comments at the top of the file. Differential Revision: https://reviews.llvm.org/D63118 llvm-svn: 363892
* [analyzer] RetainCount: Add support for OSRequiredCast().Artem Dergachev2019-06-191-1/+8
| | | | | | | | | | | | | | It's a new API for custom RTTI in Apple IOKit/DriverKit framework that is similar to OSDynamicCast() that's already supported, but crashes instead of returning null (and therefore causing UB when the cast fails unexpectedly). Kind of like cast_or_null<> as opposed to dyn_cast_or_null<> in LLVM's RTTI. Historically, RetainCountChecker was responsible for modeling OSDynamicCast. This is simply an extension of the same functionality. Differential Revision: https://reviews.llvm.org/D63117 llvm-svn: 363891
* [X86] Correct the __min_vector_width__ attribute on a few intrinsics.Craig Topper2019-06-192-5/+5
| | | | llvm-svn: 363890
* [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).Puyan Lotfi2019-06-193-192/+185
| | | | | | | | | | | | This is a NFC refactor move of CodegenNameGeneratorImpl from clang::Index to clang:AST (and rename to ASTNameGenerator). The purpose is to make the highlevel mangling code more reusable inside of clang (say in places like clang FrontendAction). This does not affect anything in CodegenNameGenerator, except that CodegenNameGenerator will now use ASTNameGenerator (in AST). Differential Revision: https://reviews.llvm.org/D63535 llvm-svn: 363878
* Print whether a generic selection expression is result dependent when ↵Aaron Ballman2019-06-191-0/+5
| | | | | | dumping the AST to JSON. llvm-svn: 363873
* Print out the union field being initialized by an InitListExpr when dumping ↵Aaron Ballman2019-06-191-0/+5
| | | | | | the AST to JSON. llvm-svn: 363869
* Dump the value calculated by a constant expression when dumping the AST to JSON.Aaron Ballman2019-06-191-0/+9
| | | | llvm-svn: 363866
* [AST] Fixed extraneous warnings for binary conditional operatorNathan Huckleberry2019-06-191-6/+7
| | | | | | | | | | | | | | | | | | | | Summary: Binary conditional operator gave warnings where ternary operators did not. They have been fixed to warn similarly to ternary operators. Link: https://bugs.llvm.org/show_bug.cgi?id=42239 Reviewers: rsmith, aaron.ballman, nickdesaulniers Reviewed By: rsmith, nickdesaulniers Subscribers: srhines, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63369 llvm-svn: 363857
OpenPOWER on IntegriCloud