summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] support a mode to only show relevant lines in HTML diagnosticsGeorge Karpenkov2018-01-1712-22/+305
| | | | | | | | | | | | | | HTML diagnostics can be an overwhelming blob of pages of code. This patch adds a checkbox which filters this list down to only the lines *relevant* to the counterexample by e.g. skipping branches which analyzer has assumed to be infeasible at a time. The resulting amount of output is much smaller, and often fits on one screen, and also provides a much more readable diagnostics. Differential Revision: https://reviews.llvm.org/D41378 llvm-svn: 322612
* Make DiagnosticsEngine() take DiagOpts as DiagnosticsEngine.Nico Weber2018-01-172-6/+6
| | | | | | | No behavior change, but makes it a bit clearer that DiagnosticsEngine adds a ref to DiagOpts. llvm-svn: 322611
* Add context to why test was disabled on WindowsRichard Trieu2018-01-161-0/+1
| | | | | | | test/Modules/odr_hash-Friend.cpp triggers an assertion in MicrosoftMangle.cpp This has been reported in PR35939 llvm-svn: 322593
* Move target MV resolver to COMDATErich Keane2018-01-167-15/+18
| | | | | | | | | | As reported here: https://bugs.llvm.org/show_bug.cgi?id=35921 The resolver functions should be in their own COMDAT regions. This patch sets that up. Differential Revision: https://reviews.llvm.org/D42110 llvm-svn: 322592
* [DOCS] Updated current status of OpenMP support, NFC.Alexey Bataev2018-01-161-6/+6
| | | | llvm-svn: 322589
* [OPENMP] Add support for `depend` clauses on `target teams distributeAlexey Bataev2018-01-162-1/+262
| | | | | | | | | 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-162-1/+267
| | | | | | | | | 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-162-1/+262
| | | | | | | | | 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-162-1/+262
| | | | | | | | | 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-162-1/+262
| | | | | | | | | simd` directives. Added codegen for `depend` clauses on `#pragma omp target teams distribute simd` directives. llvm-svn: 322575
* Add va_start()/va_copy()/va_end to Builtins.defNico Weber2018-01-161-0/+4
| | | | | | | That way, clang suggests including stdarg.h when these are used in C files. https://reviews.llvm.org/D42085 llvm-svn: 322573
* [OPENMP] Add support for `depend` clause on `target teams distribute`.Alexey Bataev2018-01-162-1/+262
| | | | | | | 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-162-1/+262
| | | | | | | 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-162-1/+267
| | | | | | | Added codegen for `depend` clause on `#pragma omp target teams` directives. llvm-svn: 322569
* [SystemZ] Support vector registers with inline asmUlrich Weigand2018-01-162-3/+21
| | | | | | | Allow using vector register names and the "v" constraint in inline asm to ensure compatibility with GCC. llvm-svn: 322562
* [OPENMP] Add support for `depend` clauses on `target simd`.Alexey Bataev2018-01-162-1/+262
| | | | | | | Added codegen for `depend` clauses on `#pragma omp target simd` directives. llvm-svn: 322559
* [NFC] fix trivial typo in documentHiroshi Inoue2018-01-161-1/+1
| | | | | | "the the" -> "the" llvm-svn: 322551
* Squash -Wcovered-switch-default wairningSam McCall2018-01-161-2/+1
| | | | llvm-svn: 322549
* Ensure code complete with !LoadExternal sees all local decls.Sam McCall2018-01-167-40/+35
| | | | | | | | | | | | | | | | | | | | | 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
* Add missing CINDEX_LINKAGEIvan Donchevskii2018-01-161-4/+4
| | | | | | | | Follow up for [libclang] Add PrintingPolicy for pretty printing declarations Differential Revision: https://reviews.llvm.org/D39903 llvm-svn: 322546
* [libclang] Add PrintingPolicy for pretty printing declarationsJonathan Coe2018-01-166-13/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-162-3/+10
| | | | | | | | | 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-154-37/+10
| | | | | | | | on Fedora27/glibc2 Differential Revision: https://reviews.llvm.org/D40673 llvm-svn: 322518
* [Driver] Suggest valid integrated toolsBrian Gesiak2018-01-152-2/+5
| | | | | | | | | | | | | | | | | | | | | | 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] Update status of OpenMP support, NFC.Alexey Bataev2018-01-151-2/+2
| | | | llvm-svn: 322516
* [OPENMP] Initial codegen for `target teams distribute parallel forAlexey Bataev2018-01-1517-21/+3584
| | | | | | | | | 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
* Fixed memory leak in unit test introduced in my previous commit r322503Cameron Desrochers2018-01-151-0/+3
| | | | llvm-svn: 322513
* [PCH] Serialize skipped preprocessor rangesCameron Desrochers2018-01-1510-3/+212
| | | | | | | | The skipped preprocessor ranges are now serialized in the AST PCH file. This fixes, for example, libclang's clang_getSkippedRanges() returning zero ranges after reparsing a translation unit. Differential Revision: https://reviews.llvm.org/D20124 llvm-svn: 322503
* [OPENMP] Update docs for OpenMP status, NFC.Alexey Bataev2018-01-151-1/+1
| | | | llvm-svn: 322502
* [OPENMP] Add codegen for `depend` clauses on `target` directive.Alexey Bataev2018-01-1515-194/+581
| | | | | | | Added basic support for codegen of `depend` clauses on `target` directive. llvm-svn: 322501
* [RISCV] Implement RISCV ABI loweringAlex Bradbury2018-01-155-0/+1126
| | | | | | | | | | | | | | | | | | | | 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
* [clang-format] Adds a FormatStyleSetKrasimir Georgiev2018-01-152-9/+88
| | | | | | | | | | | | | | | | Summary: This patch adds a FormatStyleSet for storing per-language FormatStyles for the purposes of formatting code blocks inside the main code. Reviewers: bkramer Reviewed By: bkramer Subscribers: klimek, djasper, bkramer, cfe-commits Differential Revision: https://reviews.llvm.org/D41487 llvm-svn: 322479
* Clang counterpart change for fuzzer FreeBSD supportKamil Rytarowski2018-01-151-0/+2
| | | | | | | | | | | | | | | | Summary: Providing fuzzer sanitizer support for FreeBSD (but only for X86/64 architectures). Reviewers: kimgr, EricWF, martell Reviewed By: martell Patch by David CARLIER. Subscribers: krytarowski, kimgr, emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D41809 llvm-svn: 322469
* [X86] Implement old kunpck intrinsics using vector ops on vXi1 instead of ↵Craig Topper2018-01-145-21/+44
| | | | | | | | | | | | | | | | | | | 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-145-1/+1
| | | | | | | | | This is related to moving the sanitizer blacklists to share/ subdirectory. Differential Revision: https://reviews.llvm.org/D41706 llvm-svn: 322452
* [clang-format] [NFC] Remove commentMark Zeren2018-01-131-2/+0
| | | | | | Remove inaccurate comment that came in with r312125. llvm-svn: 322448
* [docs] Use monospace for PCH option flagsBrian Gesiak2018-01-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use monospace for option flags in the PCH section, instead of the italics that were being used previously. I believe these used to be links, for which single backticks would have been appropriate, but since they were un-link-ified in https://reviews.llvm.org/rL275560, I believe monospace is now more appropriate, and so two backticks are needed. Test Plan: Build the `docs-clang-html` target and confirm the options are rendered using monospace font. Reviewers: sepavloff, aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42005 llvm-svn: 322447
* [Driver] Add "did you mean?" suggestions to -cc1asBrian Gesiak2018-01-132-1/+12
| | | | | | | | | | | | | | | | | | | | | | 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-132-0/+16
| | | | 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-136-122/+224
| | | | | | | | | 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
* Remove unused addIfPresent function.Eric Christopher2018-01-131-4/+0
| | | | llvm-svn: 322427
* 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-122-16/+23
| | | | | | | | 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-122-1/+3
| | | | | | 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-122-0/+21
| | | | | | | | | | | | | | | 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
* Allocate and access NormalCleanupDest with the natural alignment of i32.John McCall2018-01-123-10/+11
| | | | | | | | | This alignment can be less than 4 on certain embedded targets, which may not even be able to deal with 4-byte alignment on the stack. Patch by Jacob Young! llvm-svn: 322406
* Disable test for Windows to fix Windows buildbots.Richard Trieu2018-01-121-0/+2
| | | | llvm-svn: 322405
OpenPOWER on IntegriCloud