summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [modules] Set the lexical DC for dummy tag decls that refer to hiddenAlex Lorenz2017-08-113-0/+27
| | | | | | | | | | | | | | declarations that are made visible after the dummy is parsed and ODR verified Prior to this commit the "(getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one.")," assertion failure was triggered during semantic analysis of the dummy tag declaration that was declared in another tag declaration because its lexical context did not point to the outer tag decl. rdar://32292196 llvm-svn: 310706
* Revert r302670 for the upcoming 5.0.0 releaseStefan Maksimovic2017-08-111-38/+0
| | | | | | | | | | This is causing failures when compiling clang with -O3 as one of the structures used by clang is passed by value and uses the fastcc calling convention. Faliures manifest for stage2 mips build. llvm-svn: 310704
* Revert r310057Stefan Maksimovic2017-08-112-0/+97
| | | | | | | | Bring back changes which r304953 introduced since they were in fact not the cause of failures described in r310057 commit message. llvm-svn: 310702
* Revert "Thread Safety Analysis: warn on nonsensical attributes."Josh Gao2017-08-112-46/+23
| | | | | | | This reverts commit rL310403, which caused spurious warnings in libc++, because it didn't properly handle templated scoped lockable types. llvm-svn: 310698
* Implement latest feature test macro recommendations, P0096R4.Richard Smith2017-08-111-7/+11
| | | | llvm-svn: 310694
* PR33850: Update cxx_dr_status for Clang 5 branch.Richard Smith2017-08-112-2/+2
| | | | llvm-svn: 310692
* PR33489: A function-style cast to a deduced class template specialization ↵Richard Smith2017-08-111-0/+23
| | | | | | type is type-dependent if it can't be resolved due to a type-dependent argument. llvm-svn: 310691
* [Sema][ObjC] Fix spurious -Wcast-qual warnings.Akira Hatanaka2017-08-111-2/+15
| | | | | | | | | | We do not meaningfully track object const-ness of Objective-C object types. Silence the -Wcast-qual warning that is issued when casting to or from Objective-C object types results in losing const qualification. rdar://problem/33807915 llvm-svn: 310672
* [X86] Implement __builtin_cpu_isCraig Topper2017-08-103-0/+91
| | | | | | | | This patch adds support for __builtin_cpu_is. I've tried to match the strings supported to the latest version of gcc. Differential Revision: https://reviews.llvm.org/D35449 llvm-svn: 310657
* Enable bunch of sanitizers on NetBSD/X86 and X86_64Kamil Rytarowski2017-08-101-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Enable more sanitizers: - i386 and amd64: * SanitizerKind::Vptr; * SanitizerKind::Leak; * SanitizerKind::SafeStack; * SanitizerKind::Function; - amd64 only: * SanitizerKind::Thread; These sanitizers are in the process of upstreaming to LLVM projects. Sponsored by <The NetBSD Foundation> Reviewers: joerg, dim, vitalybuka, kcc, filcab, fjricci Reviewed By: vitalybuka Subscribers: #sanitizers, cfe-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36482 llvm-svn: 310649
* Disabling openmp-offload.c on linux until it is stabilized on all local ↵Alex Shlyapnikov2017-08-101-0/+3
| | | | | | configurations. llvm-svn: 310640
* [OpenMP] Delete tests in openmp-offload.c which cuase failuresGheorghe-Teodor Bercea2017-08-101-65/+0
| | | | | | | | until a better way to perform these tests is figured out. Change connected to diff: D29654 llvm-svn: 310625
* Place implictly declared functions at block scopeMomchil Velikov2017-08-102-3/+41
| | | | | | | | | | | | Such implicitly declared functions behave as if the enclosing block contained the declaration extern int name() (C90, 6.3.3.2 Function calls), thus their names should have block scope (C90, 6.1.2.1 Scope of identifiers). This patch fixes https://bugs.llvm.org/show_bug.cgi?id=33224 Differential Revision: https://reviews.llvm.org/D33676 llvm-svn: 310616
* [mips] Group all `-mabicalls` related checks in the single place. NFCSimon Atanasyan2017-08-102-6/+6
| | | | llvm-svn: 310615
* [mips] Show warning in case of mixing -mlong-calls and -mabicalls optionsSimon Atanasyan2017-08-102-2/+12
| | | | | | | | | | While we do not support `-mshared / -mno-shared` properly, show warning and ignore `-mlong-calls` option in case of implicitly or explicitly provided `-mabicalls` option. Differential revision: https://reviews.llvm.org/D36551 llvm-svn: 310614
* [mips] Notify user that `-mabicalls` is ignored on non-PIC N64 ABISimon Atanasyan2017-08-102-0/+8
| | | | | | | | | | The -mabicalls option does not make sense in the case of non position independent code for the N64 ABI. After this change the driver shows a warning that -mabicalls is ignored in that case. Differential revision: https://reviews.llvm.org/D36550 llvm-svn: 310613
* [Modules] Prevent #import to reenter header if not building a module.Bruno Cardoso Lopes2017-08-102-0/+14
| | | | | | | | | | When non-modular headers are imported while not building a module but in -fmodules mode, be conservative and preserve the default #import semantic: do not reenter headers. rdar://problem/33745031 llvm-svn: 310605
* [ValueTracking] Enabling ValueTracking patch by default (recommit). Part 1.Nikolai Bozhenov2017-08-101-1/+1
| | | | | | | | | | | | | | | The original patch was an improvement to IR ValueTracking on non-negative integers. It has been checked in to trunk (D18777, r284022). But was disabled by default due to performance regressions. Perf impact has improved. The patch would be enabled by default. Reviewers: reames, hfinkel Differential Revision: https://reviews.llvm.org/D34101 Patch by: Olga Chupina <olga.chupina@intel.com> llvm-svn: 310582
* Revert r310489 and follow-up commits r310505, r310519, r310537 and r310549Alex Lorenz2017-08-101-19/+3
| | | | | | | | | | Commit r310489 caused 'openmp-offload.c' test failures on Darwin and other platforms: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/39230/testReport/junit/Clang/Driver/openmp_offload_c/ The follow-up commits tried to fix the test, but the test is still failing. llvm-svn: 310580
* [OpenMP] Remove offending test.Gheorghe-Teodor Bercea2017-08-091-8/+0
| | | | | Diff: D29660 llvm-svn: 310537
* [X86][Asm] Allow negative immediate to appear before bracketed expressionCoby Tayree2017-08-091-3/+9
| | | | | | | | | | | Currently, only non-negative immediate is allowed prior to a brac expression (memory reference). MASM / GAS does not have any problem cope with the left side of the real line, so we should be able to as well. llvm: D36229 Differential Revision: https://reviews.llvm.org/D36230 llvm-svn: 310529
* AMDGPU: Use direct struct returns and argumentsMatt Arsenault2017-08-093-29/+553
| | | | | | | | | | | | | | | | This is an improvement over always using byval for structs. This will use registers until ~16 are used, and then switch back to byval. This needs more work, since I'm not sure it ever really makes sense to use byval. If the register limit is exceeded, the arguments still end up passed on the stack, but with a different ABI. It also may make sense to base this on number of registers used for non-struct arguments, rather than just arguments that appear first in the argument list. llvm-svn: 310527
* [Sema] Assign new flag -Wenum-compare-switch to switch-related parts of ↵Gabor Horvath2017-08-092-4/+4
| | | | | | | | | | -Wenum-compare Patch by: Reka Nikolett Kovacs Differential Revision: https://reviews.llvm.org/D36526 llvm-svn: 310521
* [OpenMP] Fix failing test for D29660.Gheorghe-Teodor Bercea2017-08-091-3/+1
| | | | | | Non-functional change. llvm-svn: 310519
* Make -std=c++17 an alias of -std=c++1zHans Wennborg2017-08-092-2/+3
| | | | | | | | | | | | | | | | As suggested on PR33912. Trying to keep this small to make it easy to merge to the 5.0 branch. We can do a follow-up with more thorough renaming (diagnostic text, options, ids, etc.) later. (For C++14 this was done in r215982, and I think a smaller patch for the 3.5 branch: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20140818/113013.html) Differential Revision: https://reviews.llvm.org/D36532 llvm-svn: 310516
* [OPENMP] Emit non-debug version of outlined functions with originalAlexey Bataev2017-08-094-11/+23
| | | | | | | | | | | name. If the host code is compiled with the debug info, while the target without, there is a problem that the compiler is unable to find the debug wrapper. Patch fixes this problem by emitting special name for the debug version of the code. llvm-svn: 310511
* [OpenMP] Make the PTX version tests general enough to work on all toolchains.Gheorghe-Teodor Bercea2017-08-091-6/+22
| | | | | | | | | | Add explicit test for Darwin and PowerPC. Clean-up tests. Non-functional change. Original diff: D29660 llvm-svn: 310505
* [OpenMP] Add flag for overwriting default PTX version for OpenMP targetsGheorghe-Teodor Bercea2017-08-091-2/+12
| | | | | | | | | | | | | | | | | Summary: This flag "--fopenmp-ptx=" enables the overwriting of the default PTX version used for GPU offloaded OpenMP target regions: "+ptx42". Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar Reviewed By: ABataev Subscribers: rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29660 llvm-svn: 310489
* [OpenMP] Add flag for disabling the default generation of relocatable OpenMP ↵Gheorghe-Teodor Bercea2017-08-091-0/+17
| | | | | | | | | | | | | | | | target code for NVIDIA GPUs. Summary: Previously we have added the "-c" flag which gets passed to PTXAS by default to generate relocatable OpenMP target code by default. This set of flags exposes control over this behaviour. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar Reviewed By: ABataev Subscribers: Hahnfeld, rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29659 llvm-svn: 310484
* [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by defaultGheorghe-Teodor Bercea2017-08-091-0/+8
| | | | | | | | | Original Diff: D29642 This patch was previously reverted due to an error with patch D29654 that this depends on. llvm-svn: 310479
* Reapply Sema: allow imaginary constants via GNU extension if UDL overloads ↵Tim Northover2017-08-091-0/+44
| | | | | | | | | | | | | | | | | | not present. C++14 added user-defined literal support for complex numbers so that you can write something like "complex<double> val = 2i". However, there is an existing GNU extension supporting this syntax and interpreting the result as a _Complex type. This changes parsing so that such literals are interpreted in terms of C++14's operators if an overload is present but otherwise falls back to the original GNU extension. (We now have more robust diagnostics for implicit conversions so the libc++ test that caused the original revert still passes). llvm-svn: 310478
* [X86][Ms-InlineAsm] Extend MS Dot operator to accept "this" + struct/class ↵Coby Tayree2017-08-092-2/+22
| | | | | | | | | | | pointers aliases MS InlineAsm Dot operator accepts "Bases" such as "this" (cpp) and class/struct pointer typedef. This patch enhance its implementation with this behavior. Differential Revision: https://reviews.llvm.org/D36450 llvm-svn: 310472
* [Sema] -Wenum-compare no longer warn on anonymous enums in switch statementsGabor Horvath2017-08-091-0/+7
| | | | | | Patch by: Reka Nikolett Kovacs llvm-svn: 310468
* Revert "PR19668, PR23034: Fix handling of move constructors and deleted copy ↵Diana Picus2017-08-091-104/+33
| | | | | | | | | constructors when deciding whether classes should be passed indirectly." This reverts commit r310401 because it seems to have broken some ARM bot(s). llvm-svn: 310464
* [Sema] Extend -Wenum-compare to handle mixed enum comparisons in switch ↵Gabor Horvath2017-08-092-0/+18
| | | | | | | | | | statements Patch by: Reka Nikolett Kovacs Differential Revision: https://reviews.llvm.org/D36407 llvm-svn: 310449
* Attempt #2 to appease buildbotsGeorge Burgess IV2017-08-091-1/+1
| | | | | | | "error: unable to create target: 'No available targets are compatible with this triple.'" llvm-svn: 310445
* Attempt to appease msc buildbotGeorge Burgess IV2017-08-091-1/+1
| | | | | | | | | | | | | It was timing out on this test, but for reasons unrelated to the specific bug it was testing for. Randomly breaking in gdb with `clang -target i686-windows -fmsc-version=1700` reveals *many* frames from MicrosoftCXXNameMangler. So, it would seem that some caching is needed there, as well... Fingers crossed that specifying a triple is sufficient to work around this. llvm-svn: 310444
* [AST] Cache intermediate visibility/linkage resultsGeorge Burgess IV2017-08-091-0/+41
| | | | | | | | | | | | This is a follow-up to r310436 with actual functional changes. Please see that commit message for a description of why a cache is appearing here. Suggestions for less-bad ways of testing this are appreciated. :) This fixes PR29160. llvm-svn: 310437
* Allow operator delete to be an invalid Decl.Richard Trieu2017-08-091-0/+14
| | | | | | | | Do not discard invalid Decl when searching for the operator delete function. The lookup for this function always expects to find a result, so sometimes the invalid Decl is the only choice possible. This fixes PR34109. llvm-svn: 310435
* [OpenMP] Fix bug regarding cubin integration into host binaryGheorghe-Teodor Bercea2017-08-091-0/+20
| | | | | | | | | | when a BindArchAction is used. This is not a functional change. Original Diff: D29654 llvm-svn: 310433
* Sema: disable implicit conversion from _Complex to real types in C++.Tim Northover2017-08-087-246/+24
| | | | | | | | | | | Converting a _Complex type to a real one simply discards the imaginary part. This can easily lead to loss of information so for safety (and GCC compatibility) this patch disallows that when the conversion would be implicit. The one exception is bool, which actually compares both real and imaginary parts and so is safe. llvm-svn: 310427
* Revert "Lexer: always allow imaginary constants in GNU mode."Tim Northover2017-08-082-26/+1
| | | | | | | This reverts r310423. It was committed by mistake, I intended to commit the improved diagnostics for implicit conversions instead. llvm-svn: 310426
* Lexer: always allow imaginary constants in GNU mode.Tim Northover2017-08-082-1/+26
| | | | llvm-svn: 310423
* [mips] Enable `long_call/short_call` attributes on MIPS64Simon Atanasyan2017-08-082-0/+2
| | | | | | | | | This change enables `long_call/short_call/far/near` attributes on MIPS64 targets. Differential revision: https://reviews.llvm.org/D36208 llvm-svn: 310418
* [codeview] Emit nested enums and typedefs from classesReid Kleckner2017-08-081-0/+25
| | | | | | | | | | Previously we limited ourselves to only emitting nested classes, but we need other kinds of types as well. This fixes the Visual Studio STL visualizers, so that users can visualize std::string and other objects. llvm-svn: 310410
* [sanitizer-coverage] -fsanitize-coverage=bb,inline-8bit-countersKostya Serebryany2017-08-081-0/+2
| | | | llvm-svn: 310409
* [coverage] Special-case calls to noreturn functions.Eli Friedman2017-08-082-0/+24
| | | | | | | | | | | | | | | The code after a noreturn call doesn't execute. The pattern in the testcase is pretty common in LLVM (a switch with a default case that calls llvm_unreachable). The original version of this patch was reverted in r309995 due to a crash. This version includes a fix for that crash (testcase in test/CoverageMapping/md.cpp). Differential Revision: https://reviews.llvm.org/D36250 llvm-svn: 310406
* Thread Safety Analysis: warn on nonsensical attributes.Josh Gao2017-08-082-23/+46
| | | | | | | | | | | | | Add warnings in cases where an implicit `this` argument is expected to attributes because either `this` doesn't exist because the attribute is on a free function, or because `this` is on a type that doesn't have a corresponding capability/lockable/scoped_lockable attribute. Reviewers: delesley, aaron.ballman Differential Revision: https://reviews.llvm.org/D36237 llvm-svn: 310403
* Reland "Thread Safety Analysis: fix assert_capability."Josh Gao2017-08-082-9/+35
| | | | | | | | | | | Delete the test that was broken by rL309725, and add it back in a follow up commit. Also, improve the tests a bit. Reviewers: delesley, aaron.ballman Differential Revision: https://reviews.llvm.org/D36237 llvm-svn: 310402
* PR19668, PR23034: Fix handling of move constructors and deleted copyRichard Smith2017-08-081-33/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | constructors when deciding whether classes should be passed indirectly. This fixes ABI differences between Clang and GCC: * Previously, Clang ignored the move constructor when making this determination. It now takes the move constructor into account, per https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may seem recent, but the ABI change was agreed on the Itanium C++ ABI list a long time ago). * Previously, Clang's behavior when the copy constructor was deleted was unstable -- depending on whether the lazy declaration of the copy constructor had been triggered, you might get different behavior. We now eagerly declare the copy constructor whenever its deletedness is unclear, and ignore deleted copy/move constructors when looking for a trivial such constructor. This also fixes an ABI difference between Clang and MSVC: * If the copy constructor would be implicitly deleted (but has not been lazily declared yet), for instance because the class has an rvalue reference member, we would pass it directly. We now pass such a class indirectly, matching MSVC. llvm-svn: 310401
OpenPOWER on IntegriCloud