summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [ARM] Prevent DSP and SIM32 being set for v6mSam Parker2018-09-281-1/+1
| | | | | | | | | My previous change (rL340911) set the two features for architectures >= 6, which wrongly includes v6m. Now set to >= 6 and not Cortex-M. Differential Revision: https://reviews.llvm.org/D52644 llvm-svn: 343309
* [ClangFormat] 'try' of function-try-block doesn't obey BraceWrappingOwen Pan2018-09-281-0/+2
| | | | | | | | It should respond to AfterFunction, not AfterControlStatement. Fixes PR39067 llvm-svn: 343305
* Handle dependent class template names in class template argumentRichard Smith2018-09-281-1/+4
| | | | | | deduction for new-expressions. llvm-svn: 343293
* [cxx2a] P0641R2: (Some) type mismatches on defaulted functions onlyRichard Smith2018-09-281-13/+46
| | | | | | | | | | | | | | | | render the function deleted instead of rendering the program ill-formed. This change also adds an enabled-by-default warning for the case where an explicitly-defaulted special member function of a non-template class is implicitly deleted by the type checking rules. (This fires either due to this language change or due to pre-C++20 reasons for the member being implicitly deleted). I've tested this on a large codebase and found only bugs (where the program means something that's clearly different from what the programmer intended), so this is enabled by default, but we should revisit this if there are problems with this being enabled by default. llvm-svn: 343285
* [cxx2a] P0624R2: Lambdas with no capture-default areRichard Smith2018-09-273-1/+31
| | | | | | default-constructible and assignable. llvm-svn: 343279
* [analyzer] Hotfix for the bug in exploded graph printingGeorge Karpenkov2018-09-271-0/+2
| | | | llvm-svn: 343276
* NFC: Fix some darwin linker warnings introduced in r338385Erik Pilkington2018-09-274-8/+8
| | | | | | | | | | The darwin linker was complaining about Toolchains/RISCV.cpp and Toolchains/Arch/RISCV.cpp had the same name. Fix is to just rename Toolchains/RISCV.cpp to Toolchains/RISCVToolchain.cpp. Differential revision: https://reviews.llvm.org/D52574 llvm-svn: 343263
* [OpenMP] Make default parallel for schedule in NVPTX target regions in SPMD ↵Gheorghe-Teodor Bercea2018-09-274-1/+27
| | | | | | | | | | | | | | | | mode achieve coalescing Summary: Set default schedule for parallel for loops to schedule(static, 1) when using SPMD mode on the NVPTX device offloading toolchain to ensure coalescing. Reviewers: ABataev, Hahnfeld, caomhin Reviewed By: ABataev Subscribers: jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D52629 llvm-svn: 343260
* Test commit. NFCPatrick Lyster2018-09-271-1/+1
| | | | llvm-svn: 343258
* [OpenMP] Make default distribute schedule for NVPTX target regions in SPMD ↵Gheorghe-Teodor Bercea2018-09-274-0/+27
| | | | | | | | | | | | | | | | mode achieve coalescing Summary: For the OpenMP NVPTX toolchain choose a default distribute schedule that ensures coalescing on the GPU when in SPMD mode. This significantly increases the performance of offloaded target code and reduces the number of registers used on the GPU side. Reviewers: ABataev, caomhin, Hahnfeld Reviewed By: ABataev, Hahnfeld Subscribers: Hahnfeld, jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D52434 llvm-svn: 343253
* [analyzer] Highlight nodes which have error reports in them in red in ↵George Karpenkov2018-09-271-25/+65
| | | | | | | | exploded graph Differential Revision: https://reviews.llvm.org/D52584 llvm-svn: 343239
* [OpenMP] Improve search for libomptarget-nvptxJonas Hahnfeld2018-09-271-6/+14
| | | | | | | | | | | | | | | When looking for the bclib Clang considered the default library path first while it preferred directories in LIBRARY_PATH when constructing the invocation of nvlink. The latter actually makes more sense because during development it allows using a non-default runtime library. So change the search for the bclib to start looking in directories given by LIBRARY_PATH. Additionally add a new option --libomptarget-nvptx-path= which will be searched first. This will be handy for testing purposes. Differential Revision: https://reviews.llvm.org/D51686 llvm-svn: 343230
* [Tooling] Get rid of uses of llvm::Twine::str which is slow. NFCEric Liu2018-09-271-4/+5
| | | | llvm-svn: 343224
* Revert untintentionally commited changesKristof Umann2018-09-271-3/+3
| | | | llvm-svn: 343205
* [Lex] TokenConcatenation now takes const PreprocessorKristof Umann2018-09-272-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D52502 llvm-svn: 343204
* [Sema] Handle __va_start for Windows/ARM64 in the same way as for ARMMartin Storsjo2018-09-271-0/+1
| | | | | | | | This fixes PR39090. Differential Revision: https://reviews.llvm.org/D52571 llvm-svn: 343184
* Revert "[DebugInfo] Generate debug information for labels."Vitaly Buka2018-09-273-39/+0
| | | | | | | | This reverts commit r343148. It crashes on sanitizer-x86_64-linux-autoconf. llvm-svn: 343183
* clang-format: [JS] conditional types.Martin Probst2018-09-272-0/+8
| | | | | | | | | | | | | | | | | | | | | Summary: This change adds some rudimentary support for conditional types. Specifically it avoids breaking before `extends` and `infer` keywords, which are subject to Automatic Semicolon Insertion, so breaking before them creates incorrect syntax. The actual formatting of the type expression is odd, but there is as of yet no clear idea on how to format these. See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#conditional-types. Reviewers: krasimir Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52536 llvm-svn: 343179
* [driver][mips] Adjust target triple accordingly to provided ABI nameSimon Atanasyan2018-09-271-0/+10
| | | | | | | | | | | | | Explicitly selected MIPS ABI using the `-mabi` option implies corresponding target triple. For 'O32' ABI it's a 32-bit target triple like `mips-linux-gnu`. For 'N32' and 'N64' ABIs it's a 64-bit target triple like `mips64-linux-gnu`. This patch adjusts target triple accordingly these rules like we do for pseudo-target flags '-m64', '-m32' etc already. Differential revision: https://reviews.llvm.org/D52290 llvm-svn: 343169
* [analyzer] [NFC] Move the code for dumping the program point to ProgramPointGeorge Karpenkov2018-09-272-179/+172
| | | | | | | | So we can dump them outside of viewing the exploded grpah. Differential Revision: https://reviews.llvm.org/D52583 llvm-svn: 343160
* [analyzer] [NFC] Heavy refactoring of trackNullOrUndefValueGeorge Karpenkov2018-09-271-117/+56
| | | | | | Differential Revision: https://reviews.llvm.org/D52519 llvm-svn: 343159
* [DebugInfo] Generate debug information for labels.Hsiangkai Wang2018-09-263-0/+39
| | | | | | | | | | | | | | Generate DILabel metadata and call llvm.dbg.label after label statement to associate the metadata with the label. After fixing PR37395. After fixing problems in LiveDebugVariables. After fixing NULL symbol problems in AddressPool when enabling split-dwarf-file. Differential Revision: https://reviews.llvm.org/D45045 llvm-svn: 343148
* llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)Fangrui Song2018-09-2628-70/+57
| | | | | | | | | | | | | | Summary: The convenience wrapper in STLExtras is available since rL342102. Reviewers: rsmith, #clang, dblaikie Reviewed By: rsmith, #clang Subscribers: mgrang, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52576 llvm-svn: 343147
* P1008R1 Classes with user-declared constructors are never aggregates inRichard Smith2018-09-262-6/+40
| | | | | | C++20. llvm-svn: 343131
* [X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef ↵Craig Topper2018-09-263-10/+22
| | | | | | | | | | | | flag set to false. Previously we used a select and the zero_undef=true intrinsic. In -O2 this pattern will get optimized to zero_undef=false. But in -O0 this optimization won't happen. This results in a compare and cmov being wrapped around a tzcnt/lzcnt instruction. By using the zero_undef=false intrinsic directly without the select, we can improve the -O0 codegen to just an lzcnt/tzcnt instruction. Differential Revision: https://reviews.llvm.org/D52392 llvm-svn: 343126
* [ARM/AArch64][v8.5A] Add Armv8.5-A targetOliver Stannard2018-09-261-0/+2
| | | | | | | | | | | This patch allows targetting Armv8.5-A from Clang. Most of the implementation is in TargetParser, so this is mostly just adding tests. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52491 llvm-svn: 343111
* Removed extra semicolon to fix Wpedantic. (NFCI).Simon Pilgrim2018-09-261-1/+1
| | | | llvm-svn: 343085
* clang-format: [JS] space after parameter naming.Martin Probst2018-09-261-1/+3
| | | | | | | | | | | | | | | | | | | Summary: Previously: foo(/*bar=*/baz); Now: foo(/*bar=*/ baz); The run-in parameter naming comment is not intended in JS. Reviewers: mboehme Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52535 llvm-svn: 343080
* [Frontend] Tidy up -print-decl-contexts conditionsFangrui Song2018-09-261-64/+41
| | | | | | | The existing conditions are not consistent. Some have braces and define a temporary Decl while others simply call `<< *cast<XXXDecl>(I)` (mostly the NamedDecl overload of operator<<). Just use the latter for consistency and brevity. llvm-svn: 343072
* P0859R0: List-initialization is potentially-constant-evaluated andRichard Smith2018-09-261-9/+32
| | | | | | | | | | | | triggers instantiation of constexpr functions. We mostly implemented this since Clang 6, but missed the template instantiation case. We do not implement the '&cast-expression' special case. It appears to be a mistake / oversight. I've mailed CWG to see if we can remove it. llvm-svn: 343064
* [OPENMP] Add support for OMP5 requires directive + unified_address clauseKelvin Li2018-09-2623-2/+281
| | | | | | | | | Add support for OMP5.0 requires directive and unified_address clause. Patches to follow will include support for additional clauses. Differential Revision: https://reviews.llvm.org/D52359 llvm-svn: 343063
* [analyzer] Fix a crash on casting symbolic pointers to derived classes.Artem Dergachev2018-09-261-1/+11
| | | | | | | | | | | Commit r340984 causes a crash when a pointer to a completely unrelated type UnrelatedT (eg., opaque struct pattern) is being casted from base class BaseT to derived class DerivedT, which results in an ill-formed region Derived{SymRegion{$<UnrelatedT x>}, DerivedT}. Differential Revision: https://reviews.llvm.org/D52189 llvm-svn: 343051
* [analyzer] Add a testing facility for testing relationships between symbols.Artem Dergachev2018-09-251-0/+98
| | | | | | | | | | | | | | | | | | Tests introduced in r329780 was disabled in r342317 because these tests were accidentally testing dump infrastructure, when all they cared about was how symbols relate to each other. So when dump infrastructure changed, tests became annoying to maintain. Add a new feature to ExprInspection: clang_analyzer_denote() and clang_analyzer_explain(). The former adds a notation to a symbol, the latter expresses another symbol in terms of previously denoted symbols. It's currently a bit wonky - doesn't print parentheses and only supports denoting atomic symbols. But it's even more readable that way. Differential Revision: https://reviews.llvm.org/D52133 llvm-svn: 343048
* [Sema] Use a more civilized hash map to implement -Wduplicate-enum.Erik Pilkington2018-09-251-1/+1
| | | | | | | | | DenseMap<long, SOMETHING> used LONG_MAX as a tombstone, so it asserts when you try to insert it! rdar://44774672 llvm-svn: 343042
* Don't emit "will be treated as an identifier character" warning forRichard Smith2018-09-251-4/+2
| | | | | | | UTF-8 characters that aren't identifier characters in the current language mode. llvm-svn: 343040
* Reland "[Clang][CodeGen][ObjC]: Fix CoreFoundation on ELF with ↵Kristina Brooks2018-09-251-24/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `-fconstant-cfstrings`" Relanding rL342883 with more fragmented tests to test ELF-specific section emission separately from broad-scope CFString tests. Now this tests the following separately 1). CoreFoundation builds and linkage for ELF while building it. 2). CFString ELF section emission outside CF in assembly output. 3). Broad scope `cfstring3.c` tests which cover all object formats at bitcode level and assembly level (including ELF). This fixes non-bridged CoreFoundation builds on ELF targets that use -fconstant-cfstrings. The original changes from differential for a similar patch to PE/COFF (https://reviews.llvm.org/D44491) did not check for an edge case where the global could be a constant which surfaced as an issue when building for ELF because of different linkage semantics. This patch addresses several issues with crashes related to CF builds on ELF as well as improves data layout by ensuring string literals that back the actual CFConstStrings end up in .rodata in line with Mach-O. Change itself tested with CoreFoundation on Linux x86_64 but should be valid for BSD-like systems as well that use ELF as the native object format. Differential Revision: https://reviews.llvm.org/D52344 llvm-svn: 343038
* [analyzer] NFC: CallDescription: Improve array management.Artem Dergachev2018-09-251-7/+10
| | | | | | | | | | Combine the two constructor overrides into a single ArrayRef constructor to allow easier brace initializations and simplify how the respective field is used internally. Differential Revision: https://reviews.llvm.org/D51390 llvm-svn: 343037
* P0969R0: allow structured binding of accessible members, not only public ↵Richard Smith2018-09-253-44/+51
| | | | | | members. llvm-svn: 343036
* [analyzer] NFC: Legalize state manager factory injection.Artem Dergachev2018-09-253-26/+4
| | | | | | | | | | | | | | | | | | | | | When a checker maintains a program state trait that isn't a simple list/set/map, but is a combination of multiple lists/sets/maps (eg., a multimap - which may be implemented as a map from something to set of something), ProgramStateManager only contains the factory for the trait itself. All auxiliary lists/sets/maps need a factory to be provided by the checker, which is annoying. So far two checkers wanted a multimap, and both decided to trick the ProgramStateManager into keeping the auxiliary factory within itself by pretending that it's some sort of trait they're interested in, but then never using this trait but only using the factory. Make this trick legal. Define a convenient macro. One thing that becomes apparent once all pieces are put together is that these two checkers are in fact using the same factory, because the type that identifies it, ImmutableMap<const MemRegion *, ImmutableSet<SymbolRef>>, is the same. This situation is different from two checkers registering similar primitive traits. Differential Revision: https://reviews.llvm.org/D51388 llvm-svn: 343035
* Revert "[DRIVER][OFFLOAD] Do not invoke unbundler on unsupported fileAlexey Bataev2018-09-251-12/+0
| | | | | | | | | types." It reverts commit r342991 + several other commits intended to fix the tests. Still have some failed tests, need to investigate it. llvm-svn: 343002
* [DRIVER][OFFLOAD] Do not invoke unbundler on unsupported file types.Alexey Bataev2018-09-251-0/+12
| | | | | | | | | clang-offload-bundler should not be invoked with the unbundling action when the input file type does not match the action type. For example, .so files should be unbundled during linking phase and should be linked only with the host code. llvm-svn: 342991
* [AArch64] Support adding X[8-15,18] registers as CSRs.Tri Vo2018-09-251-0/+27
| | | | | | | | | | | | | | | | | | Summary: Making X[8-15,18] registers call-saved is used to support CONFIG_ARM64_LSE_ATOMICS in Linux kernel. Signed-off-by: Tri Vo <trong@android.com> Reviewers: srhines, nickdesaulniers, javed.absar Reviewed By: nickdesaulniers Subscribers: kristof.beyls, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D52399 llvm-svn: 342990
* [clang-cl] Provide separate flags for all the /O variantsHans Wennborg2018-09-251-0/+1
| | | | | | | | | | | | | | | This provides better help text in "clang-cl /?". Also it cleans things up a bit: previously "/Od" could be handled either as a separate flag aliased to "-O0", or by the main optimization flag processing in TranslateOptArg. With this patch, all the flags get aliased back to /O so they're handled by TranslateOptArg. Thanks to Nico for the idea! Differential revision: https://reviews.llvm.org/D52266 llvm-svn: 342977
* [AST] Squeeze some bits in LinkageComputer::QueryTypeBruno Ricci2018-09-251-3/+8
| | | | | | | | | | | | Replace the pair std::pair<const NamedDecl *, unsigned> where the unsigned represents an LVComputationKind by a PointerIntPair. This saves a pointer per entry in the map LinkageComputer::CachedLinkageInfo. Differential Revision: https://reviews.llvm.org/D52268 Reviewed by: rjmccall, george.burgess.iv, erichkeane llvm-svn: 342973
* [OpenCL] Allow zero assignment and comparisons between queue_t type variablesSven van Haastregt2018-09-251-0/+11
| | | | | | | | | | | This change allows for zero assignment and comparison of queue_t type variables, and extends null_queue.cl to test this. Patch by Alistair Davies. Differential Revision: https://reviews.llvm.org/D51727 llvm-svn: 342968
* Driver: render arguments for the embedded bitcode correctlySaleem Abdulrasool2018-09-241-14/+131
| | | | | | | | | | When embedding bitcode, only a subset of the arguments should be recorded into the bitcode compilation commandline. The frontend job is split into two jobs, one which will generate the bitcode. Ensure that the arguments for the compilation to bitcode is properly stripped so that the embedded arguments are the permitted subset. llvm-svn: 342929
* P0962R1: only use the member form of 'begin' and 'end' in a range-basedRichard Smith2018-09-241-51/+95
| | | | | | | | | | for loop if both members exist. This resolves a DR whereby an errant 'begin' or 'end' member in a base class could result in a derived class not being usable as a range with non-member 'begin' and 'end'. llvm-svn: 342925
* [CUDA] Added basic support for compiling with CUDA-10.0Artem Belevich2018-09-244-2/+27
| | | | llvm-svn: 342924
* [analyzer] Prevent crashes in FindLastStoreBRVisitorGeorge Karpenkov2018-09-241-4/+13
| | | | | | | | | | This patch is a band-aid. A proper solution would be too change trackNullOrUndefValue to only try to dereference the pointer when it is relevant to the problem. Differential Revision: https://reviews.llvm.org/D52435 llvm-svn: 342920
* [CodeGen] Revert commit https://reviews.llvm.org/rL342717Calixte Denizet2018-09-245-34/+22
| | | | llvm-svn: 342912
OpenPOWER on IntegriCloud