summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [ItaniumMangle] Fix mangling of GNU __null in an expression to match GCCJames Clarke2019-10-081-0/+16
| | | | | | | | | | | | | | Reviewers: rsmith Reviewed By: rsmith Subscribers: erik.pilkington, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68368 llvm-svn: 374013
* [NFC] Fix ubsan-blacklist testJan Korous2019-10-082-11/+38
| | | | | | Restored original test and marked tests for VFS as unsupported on Windows. llvm-svn: 374011
* Reland 'Add VFS support for sanitizers' blacklist'Jan Korous2019-10-082-0/+26
| | | | | | | | | | The original patch broke the test for Windows. Trying to fix as per Reid's suggestions outlined here: https://reviews.llvm.org/rC371663 Differential Revision: https://reviews.llvm.org/D67742 llvm-svn: 374006
* Revert "Add VFS support for sanitizers' blacklist"Jan Korous2019-10-082-26/+0
| | | | | | | | Fix tests on Windows for now. This reverts commit 96ac97a4213287003f08636d0c372b3f71e9cfca. llvm-svn: 373999
* [clang] Accept -ftrivial-auto-var-init in clang-clVitaly Buka2019-10-071-0/+2
| | | | | | | | | | | | Reviewers: eugenis, rnk Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68608 llvm-svn: 373992
* Add VFS support for sanitizers' blacklistJan Korous2019-10-072-0/+26
| | | | | | Differential Revision: https://reviews.llvm.org/D67742 llvm-svn: 373977
* [Diagnostics] Emit better -Wbool-operation's warning message if we known ↵David Bolvansky2019-10-071-3/+3
| | | | | | that the result is always true llvm-svn: 373973
* Fix for expanding __pragmas in macro argumentsAmy Huang2019-10-071-1/+11
| | | | | | | | | | | | | | | | | Summary: Avoid parsing __pragma into an annotation token when macro arguments are pre-expanded. This is what clang currently does when parsing _Pragmas. Fixes https://bugs.llvm.org/show_bug.cgi?id=41128, where clang crashed when trying to get the length of an annotation token. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68114 llvm-svn: 373950
* [OPENMP50]Treat range-based for as canonical loop.Alexey Bataev2019-10-0721-29/+194
| | | | | | | According to OpenMP 5.0, range-based for is also considered as a canonical form of loops. llvm-svn: 373939
* Fix Calling Convention through aliasesErich Keane2019-10-071-0/+21
| | | | | | | | | | | | | | r369697 changed the behavior of stripPointerCasts to no longer include aliases. However, the code in CGDeclCXX.cpp's createAtExitStub counted on the looking through aliases to properly set the calling convention of a call. The result of the change was that the calling convention mismatch of the call would be replaced with a llvm.trap, causing a runtime crash. Differential Revision: https://reviews.llvm.org/D68584 llvm-svn: 373929
* clang-cl: Ignore the new /ZH optionsHans Wennborg2019-10-071-0/+3
| | | | | | | | | These were added to the MS docs in https://github.com/MicrosoftDocs/cpp-docs/commit/85b9b6967e58e485251450f7451673f6fc873e88 and are supposedly available in VS 2019 16.4 (though my 2019 Preview, version 16.4.0-pre.1.0 don't seem to have them.) llvm-svn: 373887
* [c++20] Check for a class-specific operator delete when deleting anRichard Smith2019-10-071-0/+19
| | | | | | object of class type with a virtual destructor. llvm-svn: 373875
* Fix behavior of __builtin_bit_cast when the From and To types are theRichard Smith2019-10-072-0/+21
| | | | | | | | | | same. We were missing the lvalue-to-rvalue conversion entirely in this case, and in fact still need the full CK_LValueToRValueBitCast conversion to perform a load with no TBAA. llvm-svn: 373874
* Implements CWG 1601 in [over.ics.rank/4.2]Richard Smith2019-10-062-5/+22
| | | | | | | | | | | | | | | | | | | Summary: The overload resolution for enums with a fixed underlying type has changed in the C++14 standard. This patch implements the new rule. Patch by Mark de Wever! Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65695 llvm-svn: 373866
* [Sema] Avoids an assertion failure when an invalid conversion declaration is ↵Richard Smith2019-10-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | used Summary: When using a user-defined conversion function template with a deduced return type the compiler gives a set of warnings: ``` bug.cc:252:44: error: cannot specify any part of a return type in the declaration of a conversion function; use an alias template to declare a conversion to 'auto (Ts &&...) const' template <typename... Ts> operator auto()(Ts &&... xs) const; ^~~~~~~~~~~~~~~~~~~ bug.cc:252:29: error: conversion function cannot convert to a function type template <typename... Ts> operator auto()(Ts &&... xs) const; ^ error: pointer to function type cannot have 'const' qualifier ``` after which it triggers an assertion failure. It seems the last error is incorrect and doesn't have any location information. This patch stops the compilation after the second warning. Fixes bug 31422. Patch by Mark de Wever! Reviewers: rsmith Reviewed By: rsmith Subscribers: bbannier, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64820 llvm-svn: 373862
* [InstCombine] don't assume 'inbounds' for bitcast pointer to GEP transform ↵Sanjay Patel2019-10-063-45/+45
| | | | | | | | | | | | (PR43501) https://bugs.llvm.org/show_bug.cgi?id=43501 We can't declare a GEP 'inbounds' in general. But we may salvage that information if we have known dereferenceable bytes on the source pointer. Differential Revision: https://reviews.llvm.org/D68244 llvm-svn: 373847
* [NFCI] Slightly improve warning messageDavid Bolvansky2019-10-051-1/+1
| | | | llvm-svn: 373818
* [Diagnostics] Use Expr::isKnownToHaveBooleanValue() to check bitwise ↵David Bolvansky2019-10-051-0/+2
| | | | | | | | negation of bool in languages without a bool type Thanks for this advice, Richard Trieu! llvm-svn: 373817
* [clang] fix a typo from r372531Yuanfang Chen2019-10-041-1/+1
| | | | | | | | | | | | Reviewers: xbolva00 Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68482 llvm-svn: 373792
* [Sema] Split out -Wformat-type-confusion from -Wformat-pedanticErik Pilkington2019-10-043-9/+45
| | | | | | | | | The warnings now in -Wformat-type-confusion don't align with how we interpret 'pedantic' in clang, and don't belong in -pedantic. Differential revision: https://reviews.llvm.org/D67775 llvm-svn: 373774
* [OPENMP50]Suppport for multiple vendors in the same vendor contextAlexey Bataev2019-10-044-12/+15
| | | | | | | | | selector. According to OpenMP 5.0, multiple vendors could be specified in the vendor context selector via ',' as a separator. llvm-svn: 373756
* Further improve -Wbool-operation bitwise negation messageSam McCall2019-10-041-3/+3
| | | | llvm-svn: 373749
* [clang-rename] Fix a crash when renaming a class without definition.Haojian Wu2019-10-041-0/+4
| | | | | | | | | | | | Reviewers: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68459 llvm-svn: 373748
* [clang] Prevent false positives in arm-mfpu-none codegen test.Simon Tatham2019-10-041-0/+1
| | | | | | | | | | | | | | | | | A user pointed out to me in private email that this test will fail if it sees the letter 's' followed by a digit in any part of clang's assembly output after the function label. That includes the .ident at the end, which can include a full pathname or hostname or both from the system clang was built on. So if that path or hostname includes any text like 's5' then it will cause the test to fail. Fixed by adding a check for `.fnend`, to limit the scope of the `CHECK-NOT` to only the actual generated code for the test function. (Committed without prior review on the basis that it's a simple and obvious pure test-suite fix and also in a test I contributed myself.) llvm-svn: 373744
* [NFCI] Improve the -Wbool-operation's warning messageDavid Bolvansky2019-10-041-2/+4
| | | | | | Based on the request from the post commit review. Also added one new test. llvm-svn: 373743
* [CodeComplete] Ensure object is the same in compareOverloads()Ilya Biryukov2019-10-041-0/+13
| | | | | | | | | | | | | | | | | | Summary: This fixes a regression that led to size() not being available in clangd when completing 'deque().^' and using libc++. Reviewers: sammccall Reviewed By: sammccall Subscribers: jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68335 llvm-svn: 373710
* Properly handle instantiation-dependent array bounds.Richard Smith2019-10-042-3/+2
| | | | | | | | | We previously failed to treat an array with an instantiation-dependent but not value-dependent bound as being an instantiation-dependent type. We now track the array bound expression as part of a constant array type if it's an instantiation-dependent expression. llvm-svn: 373685
* [OPENMP]Fix the test on Windows, NFC.Alexey Bataev2019-10-031-1/+1
| | | | llvm-svn: 373672
* [OPENMP50]Codegen support for scores in context selectors.Alexey Bataev2019-10-031-2/+24
| | | | | | | | If the context selector has associated score and several contexts selectors matches current context, the function with the highest score must be selected. llvm-svn: 373661
* [HIP] Use option -nogpulib to disable linking device libYaxun Liu2019-10-031-0/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D68300 llvm-svn: 373649
* Check for qualified function types after substituting into the operandRichard Smith2019-10-031-0/+9
| | | | | | | | | | of 'typeid'. This is a rare place where it's valid for a function type to be substituted but not valid for a qualified function type to be substituted, so needs a special check. llvm-svn: 373648
* PR43547: substitute into the type of a non-type template parameter ifRichard Smith2019-10-031-0/+12
| | | | | | | | it's instantiation-dependent, even if it's not dependent. There might be a SFINAE check in the parameter type. llvm-svn: 373643
* [HIP] Enable specifying different default gpu arch for HIP/CUDA.Michael Liao2019-10-031-0/+7
| | | | | | | | | | | | Reviewers: tra, yaxunl Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68394 llvm-svn: 373634
* [OPENMP]Fix emission of the declare target variables in device mode.Alexey Bataev2019-10-031-15/+8
| | | | | | | Declare target variables must be emitted in device mode, target triples can be empty in this case. llvm-svn: 373624
* [OPENMP]Improve diagnostics for not found declare target entries.Alexey Bataev2019-10-031-4/+2
| | | | | | | We can point to the target region + emit parent functions names/real var names if they were not found in host module during device codegen. llvm-svn: 373620
* [Diagnostics] Bitwise negation of a boolean expr always evaluates to true; ↵David Bolvansky2019-10-031-0/+20
| | | | | | | | | warn with -Wbool-operation Requested here: http://lists.llvm.org/pipermail/cfe-dev/2019-October/063452.html llvm-svn: 373614
* Fix driver tests when `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is `ON`Serge Pavlov2019-10-032-7/+35
| | | | | | | | | | | | | | | | Some Driver tests relied on the default resource direcory having per-os per-arch subdirectory layout, and when clang is built with `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON`, those test fail, because clang by default assumes per-target subdirectories. Explicitly set `-resource-dir` flag to point to a tree with per-os per-arch layout. See also: D45604, D62469 Differential Revision: https://reviews.llvm.org/D66981 Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>. llvm-svn: 373565
* [HIP] Support -emit-llvm for device compilationYaxun Liu2019-10-031-0/+72
| | | | | | | | | | | Sometimes it is useful to compile HIP device code to LLVM BC. It is not convenient to use clang -cc1 since there are lots of options needed. This patch allows clang driver to compile HIP device code to LLVM BC with -emit-llvm -c. Differential Revision: https://reviews.llvm.org/D68284 llvm-svn: 373561
* Revert 373538 and follow-ups 373549 and 373552.Nico Weber2019-10-0317-166/+69
| | | | | | They break tests on (at least) macOS. llvm-svn: 373556
* PR43519: don't inject a diagnostic when constant-evaulation of aRichard Smith2019-10-031-0/+5
| | | | | | | | | | pointer-to-member call can't determine a callee. We will have produced a diagnostic already if the callee is known to be unevaluatable, and diagnosing here rejects valid code during potential constant expression checking. llvm-svn: 373553
* Fixing broken builds due to r373538, issues with filepath and hexagon toolchain.Puyan Lotfi2019-10-031-9/+16
| | | | | | | | It appears there are some issues with the hexagon toolchain, and also the file path for the library file. If this doesn't fix the remaining breakages I will attempt a revert. llvm-svn: 373552
* Fixing broken builds due to r373538 due to test that should have been deleted.Puyan Lotfi2019-10-031-14/+0
| | | | | | test/InterfaceStubs/object.cpp should have been deleted. llvm-svn: 373549
* Mark P0784R7 as complete and start defining its feature-test macro.Richard Smith2019-10-031-0/+4
| | | | | | | Note that this only covers the language side of this feature. (The library side has its own feature test macro.) llvm-svn: 373548
* For P0784R7: support placement new-expressions in constant evaluation.Richard Smith2019-10-031-0/+83
| | | | | | | | | For now, we restrict this support to use from within the standard library implementation, since we're required to make parts of the standard library that use placement new work, but not permitted to make uses of placement new from user code work. llvm-svn: 373547
* For P0784R7: allow direct calls to operator new / operator delete fromRichard Smith2019-10-031-0/+85
| | | | | | std::allocator::{allocate,deallocate} in constant evaluation. llvm-svn: 373546
* [clang][ifs] Clang Interface Stubs ToolChain plumbing.Puyan Lotfi2019-10-0216-55/+159
| | | | | | | | | | | | | | | | | | | | | This patch enables end to end support for generating ELF interface stubs directly from clang. Now the following: clang -emit-interface-stubs -o libfoo.so a.cpp b.cpp c.cpp will product an ELF binary with visible symbols populated. Visibility attributes and -fvisibility can be used to control what gets populated. * Adding ToolChain support for clang Driver IFS Merge Phase * Implementing a default InterfaceStubs Merge clang Tool, used by ToolChain * Adds support for the clang Driver to involve llvm-ifs on ifs files. * Adds -emit-merged-ifs flag, to tell llvm-ifs to emit a merged ifs text file instead of the final object format (normally ELF) Differential Revision: https://reviews.llvm.org/D63978 llvm-svn: 373538
* [OPENMP50]Add parsing/sema analysis for declare variant score.Alexey Bataev2019-10-024-10/+32
| | | | | | | | Context selectors may include optional score clause in format `score(<expr>):`, where `<expr>` must be a constant integer expression. Added parsing/sema analysis only. llvm-svn: 373502
* [clang-rename] Better renaming the typedef decl.Haojian Wu2019-10-021-0/+8
| | | | | | | | | | | | | | Summary: when renaming a typedef decl, we used to rename the underlying decl of the typedef, we should rename the typedef itself. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68322 llvm-svn: 373440
* Revert r368237 - Update fix-it hints for std::move warnings.Richard Trieu2019-10-022-50/+44
| | | | | | | | r368237 attempted to improve fix-its for move warnings, but introduced some regressions to -Wpessimizing-move. Revert that change and add the missing test cases to the pessimizing move test to prevent future regressions. llvm-svn: 373421
* Fix crash on constant-evaluation of pseudo-destruction of a pointer.Richard Smith2019-10-021-0/+9
| | | | | | | We got confused and thought we might be pseudo-destroying the pointee instead. llvm-svn: 373418
OpenPOWER on IntegriCloud