summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Add support for `depend` clauses on `target teams distributeAlexey Bataev2018-01-161-0/+261
| | | | | | | | | parallel for simd` directives. Added codegen for `depend` clauses on `#pragma omp target teams distribute parallel for simd` directives. llvm-svn: 322587
* [OPENMP] Add support for `depend` on `target teams distribute parallelAlexey Bataev2018-01-161-0/+261
| | | | | | | | | for` directives. Added codegen for `depend` clauses on `#pragma omp target teams distribute parallel for` directives. llvm-svn: 322585
* [OPENMP] Add support for `depend` clauses on `target parallel for simd`Alexey Bataev2018-01-161-0/+261
| | | | | | | | | directives. Added codegen for `depend` clauses on `#pragma omp target parallel for simd` directives. llvm-svn: 322578
* [OPENMP] Add support for `depend` clauses on `target parallel for`Alexey Bataev2018-01-161-0/+261
| | | | | | | | | directives. Added codegen for `depend` clause on `#pragma omp target parallel for` directives. llvm-svn: 322577
* [OPENMP] Add support for `depend` clauses on `target teams distributeAlexey Bataev2018-01-161-0/+261
| | | | | | | | | simd` directives. Added codegen for `depend` clauses on `#pragma omp target teams distribute simd` directives. llvm-svn: 322575
* [OPENMP] Add support for `depend` clause on `target teams distribute`.Alexey Bataev2018-01-161-0/+261
| | | | | | | Added codegen for `depend` clauses on `#pragma omp target teams distribute` directives. llvm-svn: 322571
* [OPENMP] Add support for `depend` clauses on `target parallel` directive.Alexey Bataev2018-01-161-0/+261
| | | | | | | Added codegen for `depend` clauses on `#pragma omp target parallel` directives. llvm-svn: 322570
* [OPENMP] Add support for `depend` clauses on `target teams`.Alexey Bataev2018-01-161-0/+261
| | | | | | | Added codegen for `depend` clause on `#pragma omp target teams` directives. llvm-svn: 322569
* [OPENMP] Add support for `depend` clauses on `target simd`.Alexey Bataev2018-01-161-0/+261
| | | | | | | Added codegen for `depend` clauses on `#pragma omp target simd` directives. llvm-svn: 322559
* Ensure code complete with !LoadExternal sees all local decls.Sam McCall2018-01-162-3/+7
| | | | | | | | | | | | | | | | | | | | | Summary: noload_lookups() was too lazy: in addition to avoiding external decls, it avoided populating the lazy lookup structure for internal decls. This is the right behavior for the existing callsite in ASTDumper, but I think it's not a very useful default, so we populate it by default. While here: - remove an unused test file accidentally added in r322371. - remove lookups_begin()/lookups_end() in favor of lookups().begin(), which is more common and more efficient. Reviewers: ilya-biryukov Subscribers: cfe-commits, rsmith Differential Revision: https://reviews.llvm.org/D42077 llvm-svn: 322548
* [libclang] Add PrintingPolicy for pretty printing declarationsJonathan Coe2018-01-161-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Introduce clang_getCursorPrettyPrinted() for pretty printing declarations. Expose also PrintingPolicy, so the user gets more fine-grained control of the entities being printed. The already existing clang_getCursorDisplayName() is pretty limited - for example, it does not handle return types, parameter names or default arguments for function declarations. Addressing these issues in clang_getCursorDisplayName() would mean to duplicate existing code (e.g. clang::DeclPrinter), so rather expose new API to access the existing functionality. Reviewed By: jbcoe Subscribers: cfe-commits Tags: #clang Patch by nik (Nikolai Kosjar) Differential Revision: https://reviews.llvm.org/D39903 llvm-svn: 322540
* [Sema] Fix a crash on invalid features in multiversioningGeorge Burgess IV2018-01-161-0/+7
| | | | | | | | | We were trying to emit a diag::err_bad_multiversion_option diagnostic, which expects an int as its first argument, with a string argument. As it happens, the string `Feature` that was causing this was shadowing an int `Feature` from the surrounding scope. :) llvm-svn: 322530
* Revert 319303: Add _Float128 as alias to __float128 to enable compilations ↵Erich Keane2018-01-152-32/+10
| | | | | | | | on Fedora27/glibc2 Differential Revision: https://reviews.llvm.org/D40673 llvm-svn: 322518
* [Driver] Suggest valid integrated toolsBrian Gesiak2018-01-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: There are only two valid integrated Clang driver tools: `-cc1` and `-cc1as`. If a user asks for an unknown tool, such as `-cc1asphalt`, an error message is displayed to indicate that there is no such tool, but the message doesn't indicate what the valid options are. Include the valid options in the error message. Test Plan: `check-clang` Reviewers: sepavloff, bkramer, phosek Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42004 llvm-svn: 322517
* [OPENMP] Initial codegen for `target teams distribute parallel forAlexey Bataev2018-01-1512-0/+3491
| | | | | | | | | simd`. Added host codegen + codegen for devices with default codegen for `#pragma omp target teams distribute parallel for simd` directive. llvm-svn: 322515
* [RISCV] Fix test failures on non-assert builds introduced in r322494Alex Bradbury2018-01-152-12/+6
| | | | | | | | Thanks to Eli Friedman, who suggested the reason these tests failed on a few buildbots yet works fine locally is because non-assert builds don't emit value labels. llvm-svn: 322514
* [OPENMP] Add codegen for `depend` clauses on `target` directive.Alexey Bataev2018-01-159-50/+315
| | | | | | | Added basic support for codegen of `depend` clauses on `target` directive. llvm-svn: 322501
* [RISCV] Implement RISCV ABI loweringAlex Bradbury2018-01-154-0/+945
| | | | | | | | | | | | | | | | | | | | RISCVABIInfo is implemented in terms of XLen, supporting both RV32 and RV64. Unfortunately we need to count argument registers in the frontend in order to determine when to emit signext and zeroext attributes. Integer scalars are extended according to their type up to 32-bits and then sign-extended to XLen when passed in registers, but are anyext when passed on the stack. This patch only implements the base integer (soft float) ABIs. For more information on the RISC-V ABI, see [the ABI doc](https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md), my [golden model](https://github.com/lowRISC/riscv-calling-conv-model), and the [LLVM RISC-V calling convention patch](https://reviews.llvm.org/D39898#2d1595b4) (specifically the comment documenting frontend expectations). Differential Revision: https://reviews.llvm.org/D40023 llvm-svn: 322494
* [X86] Implement old kunpck intrinsics using vector ops on vXi1 instead of ↵Craig Topper2018-01-142-18/+17
| | | | | | | | | | | | | | | | | | | integer shift/and/or Summary: kunpck intrinsics were removed in favor of native IR a few months ago. The implementation lowers them as by operation on the integer types passed to the intrinsic and then just shifting, masking, and oring them together. A special X86 DAG combine was added to recognize this patter and turn it into a concat_vector operation. I think it makes more sense to keep the IR implementation closer to vector operations on vXi1. Given that we expect these builtins to be used around other builtins that operate on k-registers which we try to represent in IR with vXi1. InstCombine should be able to get rid of the bitcasts between integers and vXi1 leaving only the vector operations. Reviewers: RKSimon, spatel, zvi, jina.nahias Reviewed By: RKSimon Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42016 llvm-svn: 322461
* Reland "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-144-0/+0
| | | | | | | | | This is related to moving the sanitizer blacklists to share/ subdirectory. Differential Revision: https://reviews.llvm.org/D41706 llvm-svn: 322452
* [Driver] Add "did you mean?" suggestions to -cc1asBrian Gesiak2018-01-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: In https://reviews.llvm.org/D41733, the driver was modified such that, when a user provided a mispelled option such as `-hel`, it would suggest a valid option with a nearby edit distance: "did you mean '-help'?". Add these suggestions to invocations of `clang -cc1as` as well. Test Plan: `check-clang` Reviewers: v.g.vassilev, bruno Reviewed By: v.g.vassilev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42001 llvm-svn: 322445
* [Sema] Fix crash for type-dependent base classesJan Korous2018-01-131-0/+9
| | | | llvm-svn: 322438
* Fix test/Driver/riscv32-toolchain.c for builds setting CLANG_DEFAULT_LINKERAlex Bradbury2018-01-131-2/+2
| | | | | | | | Petr Hosek reported an external buildbot was failing on riscv32-toolchain.c, seemingly as it set CLANG_DEFAULT_LINKER to lld. Address this by explicitly setting -fuse-ld=ld in the tests. llvm-svn: 322435
* DR126: partially implement the const-correct rules for exception handler ↵Richard Smith2018-01-132-12/+108
| | | | | | | | | matching. While here, fix up the myriad other ways in which Sema's two "can this handler catch that exception?" implementations get things wrong and unify them. llvm-svn: 322431
* Try to suppress Windows testing again.Richard Trieu2018-01-121-1/+1
| | | | llvm-svn: 322420
* Fix test on Windows that was added in r322382.Douglas Yung2018-01-121-6/+6
| | | | | | | | The test was using "%clang++" which on Windows became "clang.exe++". Use %clangxx instead. Reviewed by Paul Robinson llvm-svn: 322417
* When rebuilding an InitListExpr, don't give it a type.Richard Smith2018-01-121-0/+18
| | | | | | | | InitListExprs without types (well, with type 'void') represent not-yet-analyzed initializer lists; InitListExpr with types fool Sema into thinking they don't need further analysis in some cases (particularly C++17 copy omission). llvm-svn: 322414
* [DWARFv5] Have -gdwarf-5 generate MD5 checksumsPaul Robinson2018-01-121-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D42011 llvm-svn: 322413
* [analyzer] Don't flag strcpy of string literals into sufficiently large buffers.Artem Dergachev2018-01-121-0/+10
| | | | | | | | | | | | | | | In the security package, we have a simple syntactic check that warns about strcpy() being insecure, due to potential buffer overflows. Suppress that check's warning in the trivial situation when the source is an immediate null-terminated string literal and the target is an immediate sufficiently large buffer. Patch by András Leitereg! Differential Revision: https://reviews.llvm.org/D41384 llvm-svn: 322410
* Disable test for Windows to fix Windows buildbots.Richard Trieu2018-01-121-0/+2
| | | | llvm-svn: 322405
* [OPENMP] Replace calls of getAssociatedStmt().Alexey Bataev2018-01-129-72/+23
| | | | | | | | | | | | | getAssociatedStmt() returns the outermost captured statement for the OpenMP directive. It may return incorrect region in case of combined constructs. Reworked the code to reduce the number of calls of getAssociatedStmt() and used getInnermostCapturedStmt() and getCapturedStmt() functions instead. In case of firstprivate variables it may lead to an extra allocas generation for private copies even if the variable is passed by value into outlined function and could be used directly as private copy. llvm-svn: 322393
* [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.Volodymyr Sapsai2018-01-121-0/+0
| | | | | | | | | | | | | | | | | | | | | | Fix makes the loop in LexAngledStringLiteral more like the loops in LexStringLiteral, LexCharConstant. When we skip a character after backslash, we need to check if we reached the end of the file instead of reading the next character unconditionally. Discovered by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3832 rdar://problem/35572754 Reviewers: arphaman, kcc, rsmith, dexonsmith Reviewed By: rsmith, dexonsmith Subscribers: cfe-commits, rsmith, dexonsmith Differential Revision: https://reviews.llvm.org/D41423 llvm-svn: 322390
* [WebAssembly] Support -stdlib=libc++ switchSam Clegg2018-01-121-0/+36
| | | | | | | | | | | | | | Referenced implementation from Fuchsia and Darwin Toolchain. Still only support CST_Libcxx. Now checks that the argument is really '-stdlib=libc++', and display error. Also, now will pass -lc++ and -lc++abi to the linker. Patch by Patrick Cheng! Differential Revision: https://reviews.llvm.org/D41937 llvm-svn: 322382
* [CodeComplete] Add an option to omit results from the preamble.Sam McCall2018-01-122-0/+21
| | | | | | | | | | | | | | | | | | | | | | | Summary: Enumerating the contents of a namespace or global scope will omit any decls that aren't already loaded, instead of deserializing them from the PCH. This allows a fast hybrid code completion where symbols from headers are provided by an external index. (Sema already exposes the information needed to do a reasonabl job of filtering them). Clangd plans to implement this hybrid. This option is just a hint - callers still need to postfilter results if they want to *avoid* completing decls outside the main file. Reviewers: bkramer, ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41989 llvm-svn: 322371
* [ODRHash] Don't hash friend functions.Richard Trieu2018-01-126-0/+66
| | | | | | | | In certain combinations of templated classes and friend functions, the body of friend functions does not get propagated along with function signature. Exclude friend functions for hashing to avoid this case. llvm-svn: 322350
* Add `__reference_binds_to_temporary` trait for checking safe reference ↵Eric Fiselier2018-01-121-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization. Summary: The STL types `std::pair` and `std::tuple` can both store reference types. However their constructors cannot adequately check if the initialization of reference types is safe. For example: ``` std::tuple<std::tuple<int> const&> t = 42; // The stored reference is already dangling. ``` Libc++ has a best effort attempts in tuple to diagnose this, but they're not able to handle all valid cases (If I'm not mistaken). For example initialization of a reference from the result of a class's conversion operator. Libc++ would benefit from having a builtin traits which can provide a much better implementation. This patch introduce the `__reference_binds_to_temporary(T, U)` trait that determines whether a reference of type `T` bound to an expression of type `U` would bind to a materialized temporary object. Note that the trait simply returns false if `T` is not a reference type instead of reporting it as an error. ``` static_assert(__is_constructible(int const&, long)); static_assert(__reference_binds_to_temporary(int const&, long)); ``` Reviewers: majnemer, rsmith Reviewed By: rsmith Subscribers: compnerd, cfe-commits Differential Revision: https://reviews.llvm.org/D29930 llvm-svn: 322334
* [WebAssembly] Remove `-allow-undefined-file wasm.syms` from linker argsSam Clegg2018-01-111-2/+2
| | | | | | | | See: https://github.com/WebAssembly/tool-conventions/issues/35 Differential Revision: https://reviews.llvm.org/D41923 llvm-svn: 322321
* Make internal/private GVs implicitly dso_local.Rafael Espindola2018-01-119-11/+11
| | | | | | | | | | | | | | | | While updating clang tests for having clang set dso_local I noticed that: - There are *a lot* of tests to update. - Many of the updates are redundant. They are redundant because a GV is "obviously dso_local". This patch starts formalizing that a bit by requiring that internal and private GVs be dso_local too. Since they all are, we don't have to print dso_local to the textual representation, making it a bit more compact and easier to read. llvm-svn: 322318
* Handle scoped_lockable objects being returned by value in C++17.Richard Smith2018-01-111-0/+26
| | | | | | | | | | | In C++17, guaranteed copy elision means that there isn't necessarily a constructor call when a local variable is initialized by a function call that returns a scoped_lockable by value. In order to model the effects of initializing a local variable with a function call returning a scoped_lockable, pretend that the move constructor was invoked within the caller at the point of return. llvm-svn: 322316
* [Driver][RISCV] Another Windows file separator fix for riscv32-toolchain.c testAlex Bradbury2018-01-111-2/+2
| | | | | | | I've checking the failure log, this _should_ be the last one. Sorry for not spotting this additional case first time round. llvm-svn: 322294
* [Driver][RISCV] Fix r322276 for Windows (path separator issue)Alex Bradbury2018-01-111-2/+2
| | | | | | | | We were seeing test failures of riscv32-toolchain.c on windows due to the \ path separator being used for the linker. Add {{/|\\\\}} pattern (made horrible due to escaping), just like introduced in r214931. llvm-svn: 322286
* [Driver][RISCV] Fix r322276 by adding missing dummy crtbegin.o files to test ↵Alex Bradbury2018-01-115-0/+0
| | | | | | | | | | input The dummy crtbegin.o files were left out in r322276 (as they were ignored by svn add of test/Driver/Inputs/multilib_riscv_linux_sdk) and are necessary for the driver test to work. llvm-svn: 322277
* [RISCV] Add the RISCV target and compiler driverAlex Bradbury2018-01-1118-0/+578
| | | | | | | | | As RV64 codegen has not yet been upstreamed into LLVM, we focus on RV32 driver support (RV64 to follow). Differential Revision: https://reviews.llvm.org/D39963 llvm-svn: 322276
* Revert "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-114-0/+0
| | | | | | This reverts commit r322258: broke the dfsan build. llvm-svn: 322260
* Reland "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-114-0/+0
| | | | | | | | | This is related to moving the sanitizer blacklists to share/ subdirectory. Differential Revision: https://reviews.llvm.org/D41706 llvm-svn: 322258
* [X86][Sema] Range check the constant argument for the vpshld/vpshrd builtins ↵Craig Topper2018-01-111-0/+76
| | | | | | to ensure it fits in 8-bits. llvm-svn: 322247
* Revert "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-114-0/+0
| | | | | | This reverts commit r322233: this is breaking dfsan tests. llvm-svn: 322242
* In C++17, when instantiating an out-of-line definition of an inline static dataRichard Smith2018-01-102-0/+19
| | | | | | member, don't forget to instantiate the initializer too. llvm-svn: 322236
* Reland "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-104-0/+0
| | | | | | | | | This is related to moving the sanitizer blacklists to share/ subdirectory. Differential Revision: https://reviews.llvm.org/D41706 llvm-svn: 322233
* [MSan] Enable use-after-dtor instrumentation by default.Matt Morehouse2018-01-102-3/+5
| | | | | | | | | | | | | | | | | Summary: Enable the compile-time flag -fsanitize-memory-use-after-dtor by default. Note that the run-time option MSAN_OPTIONS=poison_in_dtor=1 still needs to be enabled for destructors to be poisoned. Reviewers: eugenis, vitalybuka, kcc Reviewed By: eugenis, vitalybuka Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D37860 llvm-svn: 322221
OpenPOWER on IntegriCloud