summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [OPENMP50]Initial codegen for declare variant implementation vendor.Alexey Bataev2019-10-011-0/+91
| | | | | | | Initial implementation of global aliases emission for the declare variant pragma with implementation vendor context selector set. llvm-svn: 373387
* [NFC] Updated tests after rL373371David Bolvansky2019-10-011-4/+0
| | | | | | Forgot to run check-clang-semacxx. llvm-svn: 373375
* [OPENMP]Fix PR43330: OpenMP target: Mapping of partial arrays fails.Alexey Bataev2019-10-011-51/+75
| | | | | | Fixed calculation the size of the array sections. llvm-svn: 373374
* [Diagnostics] Make -Wenum-compare-conditional off by defaultDavid Bolvansky2019-10-011-4/+0
| | | | | | Too many false positives, eg. in Chromium. llvm-svn: 373371
* [ThinLTO] Enable index-only WPD from clangTeresa Johnson2019-10-011-1/+1
| | | | | | | | | | | | | | | | | | Summary: To trigger the index-only Whole Program Devirt support added to LLVM, we need to be able to specify -fno-split-lto-unit in conjunction with -fwhole-program-vtables. Keep the default for -fwhole-program-vtables as -fsplit-lto-unit, but don't error on that option combination. Reviewers: pcc Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68029 llvm-svn: 373370
* [OPENMP]Fix PR43516: Compiler crash with collapse(2) on non-rectangularAlexey Bataev2019-10-011-17/+16
| | | | | | | | | loop. Missed check if the condition is also dependent when building final expressions for the collapsed loop directives. llvm-svn: 373348
* [Diagnostics] Move warning into the subgroup (-Wenum-compare-conditional)David Bolvansky2019-10-011-0/+2
| | | | llvm-svn: 373345
* [clang] Make handling of unnamed template params similar to function paramsKadir Cetinkaya2019-10-016-36/+18
| | | | | | | | | | | | | | | | | | | | | Summary: Clang uses the location identifier should be inserted for declarator decls when a decl is unnamed. But for type template and template template paramaters it uses the location of "typename/class" keyword, which makes it hard for tooling to insert/change parameter names. This change tries to unify these two cases by making template parameter parsing and sourcerange operations similar to function params/declarator decls. Reviewers: ilya-biryukov Subscribers: arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68143 llvm-svn: 373340
* [clang] Ignore builtin namespaces in test/Import/cxx-anon-namespaceRaphael Isemann2019-10-011-1/+5
| | | | | | | | | Some platforms (e.g. AArch64) put __va_list in the 'std' namespace which might end up being the first namespace we match in this test. Instead let the first namespace match via file name/line so that we skip the builtin namespaces. llvm-svn: 373327
* Don't elide the use of the thread wrapper for a thread_local constinitRichard Smith2019-10-011-5/+27
| | | | | | | | | variable with non-trivial destruction. We still need to invoke the thread wrapper to trigger registration of the destructor call on thread shutdown. llvm-svn: 373289
* [c++20] Add a C++20 version of the existing turing machine test.Richard Smith2019-10-011-0/+66
| | | | | | | | Unlike the C++11 version, this one uese mutable state and dynamic allocation instead of a carefully balanced and ever-accumulating pile of temporaries. llvm-svn: 373281
* During constant evaluation, handle CXXBindTemporaryExprs forRichard Smith2019-10-011-0/+5
| | | | | | array-of-class types, not just for class types. llvm-svn: 373279
* [c++20] Fix crash when constant-evaluating an assignment with aRichard Smith2019-10-011-0/+23
| | | | | | reference member access on its left-hand side. llvm-svn: 373276
* Fix Driver/modules.cpp test to work when build directory name contains '.s'Tom Stellard2019-09-301-1/+1
| | | | | | | | | | | | Reviewers: dyung, rsmith, hansw Subscribers: mati865, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66176 llvm-svn: 373275
* Fix crash on value-dependent delete-expressions.Richard Smith2019-09-301-0/+6
| | | | | | | We used to miscompute the 'value-dependent' bit, and would crash if we tried to evaluate a delete expression that should be value-dependent. llvm-svn: 373272
* [NFC] Fix tests, second tryDavid Bolvansky2019-09-301-4/+4
| | | | llvm-svn: 373258
* [OPENMP50]Mark declare variant attribute as inheritable.Alexey Bataev2019-09-301-0/+9
| | | | | | Attribute must be inherited by the redeclarations. llvm-svn: 373257
* [NFCI] Updated broken testDavid Bolvansky2019-09-301-0/+4
| | | | llvm-svn: 373256
* [Diagnostics] Warn if enumeration type mismatch in conditional expressionDavid Bolvansky2019-09-301-0/+39
| | | | | | | | | | | | | | | | | | Summary: - Useful warning - GCC compatibility (GCC warns in C++ mode) Reviewers: rsmith, aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67919 llvm-svn: 373252
* Teach CallGraph to look into Generic Lambdas.Erich Keane2019-09-301-2/+19
| | | | | | | | | | | | | | | | | | | | CallGraph visited LambdaExpr by getting the Call Operator from CXXRecordDecl (LambdaExpr::getCallOperator calls CXXRecordDecl::getLambdaCallOperator), which replaced generic lambda call operators with the non-instantiated FunctionDecl. The result was that the CallGraph would only pick up non-dependent calls. This patch does a few things: 1- Extend CXXRecordDecl to have a getDependentLambdaCallOperator, which will get the FunctionTemplateDecl, rather than immediately getting the TemplateDecl. 2- Define getLambdaCallOperator and getDependentLambdaCallOperator in terms of a common function. 3- Extend LambdaExpr with a getDependentCallOperator, which just calls the above function. 4- Changes CallGraph to handle Generic LambdaExprs. llvm-svn: 373247
* [OPENMP50]Do not emit warning for the function with the currentlyAlexey Bataev2019-09-302-2/+10
| | | | | | | | | defined body. If the function is currently defined, we should not emit a warning that it might be emitted already because it was not really emitted. llvm-svn: 373243
* Fix buildbot failure from r373217 (don't match metadata id exactly)Teresa Johnson2019-09-301-1/+1
| | | | | | | Fix this failure by ignoring the id of the metadata being checked: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/3046/consoleFull#-21332887158254eaf0-7326-4999-85b0-388101f2d404 llvm-svn: 373237
* [Clang] Use -main-file-name for source filename if not setTeresa Johnson2019-09-301-0/+7
| | | | | | | | | | | | | | | | | | | -main-file-name is currently used to set the source name used in debug information. If the source filename is "-" and -main-file-name is set, then use the filename also for source_filename and ModuleID of the output. The argument is generally used outside the internal clang calls when running clang in a wrapper like icecc which gives the source via stdin but still wants to get a object file with the original source filename both in debug info and IR code. Patch by: the_jk (Joel Klinghed) Differential Revision: https://reviews.llvm.org/D67592 llvm-svn: 373217
* Don't crash if a variable with a constexpr destructor has aRichard Smith2019-09-291-0/+9
| | | | | | value-dependent initializer. llvm-svn: 373173
* For now, disallow lifetime-extended temporaries with non-trivial (butRichard Smith2019-09-291-0/+19
| | | | | | | | | | | | constexpr) destructors from being used in the values of constexpr variables. The standard rules here are unclear at best, so rejecting the problematic cases seems prudent. Prior to this change, we would fail to run the destructors for these temporaries, even if they had side-effects, which is certainly not the right behavior. llvm-svn: 373161
* Fix checking for permitted results of constant expressions.Richard Smith2019-09-291-0/+19
| | | | | | | | | In the presence of mutable state, we need to check whether temporaries involved in a constant expression have permissible values at the end of the overall evaluation, rather than at the end of the evaluation of the initializer of the temporary. llvm-svn: 373160
* For P0784R7: compute whether a variable has constant destruction if itRichard Smith2019-09-296-8/+137
| | | | | | | | | | has a constexpr destructor. For constexpr variables, reject if the variable does not have constant destruction. In all cases, do not emit runtime calls to the destructor for variables with constant destruction. llvm-svn: 373159
* Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`Serge Pavlov2019-09-284-20/+38
| | | | | | | | | | | | When testing clang that has been compiled with `-DDEFAULT_SYSROOT` set to some path, some tests would fail. Override sysroot to be empty string for the tests to succeed when clang is configured with `DEFAULT_SYSROOT`. Differential Revision: https://reviews.llvm.org/D66834 Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>. llvm-svn: 373147
* For P0784R7: add support for explicit destructor calls andRichard Smith2019-09-272-1/+178
| | | | | | pseudo-destructor calls in constant evaluation. llvm-svn: 373122
* [Clang][OpenMP Offload] Create start/end symbols for the offloading entry ↵Sergey Dmitriev2019-09-2736-296/+288
| | | | | | | | | | | | table with a help of a linker Linker automatically provides __start_<section name> and __stop_<section name> symbols to satisfy unresolved references if <section name> is representable as a C identifier (see https://sourceware.org/binutils/docs/ld/Input-Section-Example.html for details). These symbols indicate the start address and end address of the output section respectively. Therefore, renaming OpenMP offload entries section name from ".omp.offloading_entries" to "omp_offloading_entries" to use this feature. This is the first part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943). Differential Revision: https://reviews.llvm.org/D68070 llvm-svn: 373118
* [clang] [AST] Treat "inline gnu_inline" the same way as "extern inline ↵Martin Storsjo2019-09-274-5/+15
| | | | | | | | | | | | | | | | | gnu_inline" in C++ mode This matches how GCC handles it, see e.g. https://gcc.godbolt.org/z/HPplnl. GCC documents the gnu_inline attribute with "In C++, this attribute does not depend on extern in any way, but it still requires the inline keyword to enable its special behavior." The previous behaviour of gnu_inline in C++, without the extern keyword, can be traced back to the original commit that added support for gnu_inline, SVN r69045. Differential Revision: https://reviews.llvm.org/D67414 llvm-svn: 373078
* Fix the 'directory' field in DumpCompilationDatabase and add testHans Wennborg2019-09-271-2/+2
| | | | | | | This broke in r371027 due to a missing negation (llvm::sys::fs::current_path returns false on success). llvm-svn: 373049
* [test] Use %clang_cc1 instead of %clang -cc1Fangrui Song2019-09-279-12/+12
| | | | llvm-svn: 373043
* For P0784R7: add support for new (std::nothrow).Richard Smith2019-09-271-0/+18
| | | | llvm-svn: 373037
* For P0784R7: Add support for dynamic allocation with new / delete duringRichard Smith2019-09-274-17/+332
| | | | | | constant evaluation. llvm-svn: 373036
* [OpenMP 5.0] Fix user-defined mapper lookup in semaMichael Kruse2019-09-262-6/+22
| | | | | | | | | | | | This patches fixes the case when a user-defined mapper is attached to the elements of an array, and to report error when a mapper is used for types other than struct, class, and union. Patch by Lingda Li <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D67978 llvm-svn: 373023
* Always rebuild a DeclRefExpr if its FoundDecl would change.Richard Smith2019-09-261-0/+16
| | | | | | Fixes a regression introduced by r369999. llvm-svn: 373022
* [OPENMP50]Emit warnings if the functions was defined/used before markedAlexey Bataev2019-09-263-7/+9
| | | | | | | | | declare variant. We can use the original function if it was used/emitted already. So, just use warnings for these cases, not errors. llvm-svn: 373010
* Only pass -coverage-notes-file when emitting coverageReid Kleckner2019-09-261-0/+6
| | | | | | | | | | | | | | | | The only functional change here is that -coverage-notes-file is not passed to -cc1 in some situations. This code appears to be trying to put the gcno and gcda output next to the final object file, but it's doing that in a really convoluted way that needs to be re-examined. It looks for -c or -S in the original command, and then looks at the -o argument if present in order to handle the -fno-integrated-as case. However, this doesn't work if this is a link command with multiple inputs. I looked into fixing this, but the check-profile test suite has a lot of dependencies on this behavior, so I left it all alone. llvm-svn: 373004
* Move normalization of `\` in #includes from -fms-compatibility to ↵Reid Kleckner2019-09-262-8/+6
| | | | | | | | | -fms-extensions Handling backslashes in include paths in the implementation isn't non-conforming. llvm-svn: 372999
* Un-XFAIL coverage_no_integrated_as.c test on WindowsReid Kleckner2019-09-261-7/+6
| | | | | | | | | | | You can't use -fno-integrated-as for *-msvc triples because no usable standalone assembler exists. Perhaps we could teach clang to emit a .s and then reinvoke itself, but that's a bit silly. Anyway, fix the test by using an Itanium ABI triple, which will become mingw, which will assume gnu as is a usable assembler. llvm-svn: 372994
* [OpenCL] Add -Wconversion to fdeclare-opencl-builtins testSven van Haastregt2019-09-261-6/+7
| | | | | | | | | | | Add the -Wconversion -Werror options to check no unexpected conversion is done. Patch by Pierre Gondois and Sven van Haastregt. Differential Revision: https://reviews.llvm.org/D67714 llvm-svn: 372975
* [Testing] Workaround libcxx bug when OS is "none"David Zarzycki2019-09-262-16/+16
| | | | | | | | | | | | If clang is configured to use libcxx as the default C++ standard library, then using "none" for the OS in the target triple will cause libcxx to #error needlessly. Passing -nostdinc++ is a workaround for these tests. See also: https://reviews.llvm.org/D68075 Please note: this workaround will probably exist for a few years until the installed version of libcxx is updated. llvm-svn: 372949
* [OPENMP50]Parsing/sema support for 'implementation/vendor' contextAlexey Bataev2019-09-254-28/+62
| | | | | | | | | selector. Added basic parsing/semantic support for 'implementation={vendor(<vendor>)}' context selector. llvm-svn: 372917
* [CUDA][HIP] Enable kernel function return type deduction.Michael Liao2019-09-251-0/+44
| | | | | | | | | | | | | | | | | Summary: - Even though only `void` is still accepted as the deduced return type, enabling deduction/instantiation on the return type allows more consistent coding. Reviewers: tra, jlebar Subscribers: cfe-commits, yaxunl Tags: #clang Differential Revision: https://reviews.llvm.org/D68031 llvm-svn: 372898
* Revert r370850 "Re-commit r363191 "[MS] Pretend constexpr variable template ↵Hans Wennborg2019-09-251-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specializations are inline"" This work-around was necessary to handle standard library headers in Visual Studio 2019 16.2. Now that 16.3 has shipped to stable, we can remove it. > Re-commit r363191 "[MS] Pretend constexpr variable template specializations are inline" > > While the next Visual Studio update (16.3) will fix this issue, that hasn't > shipped yet. Until then Clang wouldn't work with MSVC's headers which seems > unfortunate. Let's keep this in until VS 16.3 ships. (See also PR42843.) > >> Fixes link errors with clang and the latest Visual C++ 14.21.27702 >> headers, which was reported as PR42027. >> >> I chose to intentionally make these things linkonce_odr, i.e. >> discardable, so that we don't emit definitions of these things in every >> translation unit that includes STL headers. >> >> Note that this is *not* what MSVC does: MSVC has not yet implemented C++ >> DR2387, so they emit fully specialized constexpr variable templates with >> static / internal linkage. >> >> Reviewers: rsmith >> >> Differential Revision: https://reviews.llvm.org/D63175 llvm-svn: 372844
* [OpenCL] Add image query builtin functionsSven van Haastregt2019-09-251-0/+4
| | | | | | | | | | Add the image query builtin functions from the OpenCL C specification. Patch by Pierre Gondois and Sven van Haastregt. Differential Revision: https://reviews.llvm.org/D67713 llvm-svn: 372833
* [Driver] Always use -z separate-loadable-segments with lld on FuchsiaFangrui Song2019-09-251-1/+1
| | | | | | | | | | The option was added to lld in D67481/372807. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D68009 llvm-svn: 372814
* [x86] Adding support for some missing intrinsics: _castf32_u32, ↵Pengfei Wang2019-09-251-0/+45
| | | | | | | | | | | | | | | | | | | | _castf64_u64, _castu32_f32, _castu64_f64 Summary: Adding support for some missing intrinsics: _castf32_u32, _castf64_u64, _castu32_f32, _castu64_f64 Reviewers: craig.topper, LuoYuanke, RKSimon, pengfei Reviewed By: RKSimon Subscribers: llvm-commits Patch by yubing (Bing Yu) Differential Revision: https://reviews.llvm.org/D67212 llvm-svn: 372802
* [HIP] Support new kernel launching APIYaxun Liu2019-09-242-8/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D67947 llvm-svn: 372773
OpenPOWER on IntegriCloud