summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* PR37631: verify that a member deduction guide has the same access as its ↵Richard Smith2018-05-303-7/+54
| | | | | | template. llvm-svn: 333599
* AST: Remove an unused function. NFC.Peter Collingbourne2018-05-301-4/+0
| | | | llvm-svn: 333598
* Add fopen to the list of builtins that we check and whitelist.Eric Christopher2018-05-302-1/+10
| | | | llvm-svn: 333594
* [X86] Add __extension__ to a bunch of places in our intrinsic headers that ↵Craig Topper2018-05-304-103/+109
| | | | | | | | fail if you run it through -pedantic -ansi. All of these are lines that create a 'compound literal' to concatenate elements together. llvm-svn: 333593
* PR34520: after instantiating a non-templated member deduction guide, don't ↵Richard Smith2018-05-302-1/+16
| | | | | | forget to push it into the class scope. llvm-svn: 333589
* As discussed with SG10, bump version of __cpp_deduction_guides macro to ↵Richard Smith2018-05-302-2/+2
| | | | | | indicate support for P0620R0. llvm-svn: 333587
* [AST] Fix loss of enum forward decl from decl contextJoel E. Denny2018-05-303-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | For example, given: enum __attribute__((deprecated)) T *p; -ast-print produced: enum T *p; The attribute was lost because the enum forward decl was lost. Another example is the loss of enum forward decls from C++ namespaces (in MS compatibility mode). The trouble was that the EnumDecl node was suppressed, as revealed by -ast-dump. The suppression of the EnumDecl was intentional in r116122, but I don't understand why. The suppression isn't needed for the test suite to behave. Reviewed by: rsmith Differential Revision: https://reviews.llvm.org/D46846 llvm-svn: 333574
* [X86] Simplify the implementation of _mm_sqrt_ss, _mm_rcp_ss, and _mm_rsqrt_ss.Craig Topper2018-05-302-31/+4
| | | | | | | | We don't need the insertion back into the original vector at the end. The builtin already understands that. This is different than _mm_sqrt_sd which takes two arguments and we do need to insert. llvm-svn: 333572
* [X86] Reduce the number of setzero intrinsics to just the set defined by the ↵Craig Topper2018-05-3013-185/+150
| | | | | | | | | | Intel Intrinsics Guide. We had quite a few for different element sizes of integers sometimes with strange target features attached to them. We only need a single version for each of _m128i, _m256i, and _m512i with the target feature that first introduced those types. llvm-svn: 333568
* [X86] Remove 'return' from a bunch of intrinsics that return void and use a ↵Craig Topper2018-05-309-19/+19
| | | | | | | | builtin that returns void. Found by running the intrinsic headers through -pedantic -ansi. llvm-svn: 333563
* [X86] Lowering FMA intrinsics to native IR (Clang part)Gabor Buella2018-05-309-1233/+2453
| | | | | | | | | | | | | | | | This patch replaces all packed (and scalar without rounding mode) fused intrinsics with fmadd/fmaddsub variations. Then fmadd/fmaddsub are lowered to native IR. Patch by tkrupa Reviewers: craig.topper, sroland, spatel, RKSimon Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D47444 llvm-svn: 333555
* [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in nameBen Hamilton2018-05-303-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Please take a close look at this CL. I haven't touched much of `UnwrappedLineParser` before, so I may have gotten things wrong. Previously, clang-format would incorrectly format the following: ``` @implementation Foo - (Class)class { } - (void)foo { } @end ``` as: ``` @implementation Foo - (Class)class { } - (void)foo { } @end ``` The problem is whenever `UnwrappedLineParser::parseStructuralElement()` sees any of the keywords `class`, `struct`, or `enum`, it calls `parseRecord()` to parse them as a C/C++ record. This causes subsequent lines to be parsed incorrectly, which causes them to be indented incorrectly. In Objective-C/Objective-C++, these keywords are valid selector components. This diff fixes the issue by explicitly handling `+` and `-` lines inside `@implementation` / `@interface` / `@protocol` blocks and parsing them as Objective-C methods. Test Plan: New tests added. Ran tests with: make -j16 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: jolesiak, klimek Reviewed By: jolesiak, klimek Subscribers: klimek, cfe-commits, Wizard Differential Revision: https://reviews.llvm.org/D47095 llvm-svn: 333553
* Revert "Update NRVO logic to support early return"Sam McCall2018-05-3011-290/+82
| | | | | | This reverts commit r333500, which causes stage2 compiler crashes. llvm-svn: 333547
* Revert "[clang-format] Fix putting ObjC message arguments in one line for ↵Jacek Olesiak2018-05-302-58/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multiline receiver" Summary: This reverts commit db9e5e9a616d7fdd4d1ba4c3b2cd89d8a0238533 (rC333171). Mentioned change introduced unintended formatting of ObjC code due to split priorities inherited from C/C++, e.g.: ``` fooooooo = [ [obj fooo] aaa:42 aaa:42]; ``` instead of ``` fooooooo = [[obj fooo] aaa:42 aaa:42]; ``` when formatted with ColumnLimit = 30. Reviewers: krasimir Reviewed By: krasimir Subscribers: benhamilton, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D47527 llvm-svn: 333539
* [Sema] Don't skip function bodies with 'auto' without trailing return typeIlya Biryukov2018-05-303-2/+78
| | | | | | | | | | | | | | | | | | Summary: Skipping them was clearly not intentional. It's impossible to guarantee correctness if the bodies are skipped. Also adds a test case for r327504, now that it does not produce invalid errors that made the test fail. Reviewers: aaron.ballman, sammccall, rsmith Reviewed By: rsmith Subscribers: rayglover-ibm, rwols, cfe-commits Differential Revision: https://reviews.llvm.org/D44480 llvm-svn: 333538
* Revert "Reland "Move #include manipulation code to new lib/Tooling/Inclusions.""Eric Liu2018-05-3012-31/+15
| | | | | | This reverts commit r333532. Revert for now to fix an internal bot issue. llvm-svn: 333534
* Reland "Move #include manipulation code to new lib/Tooling/Inclusions."Eric Liu2018-05-3012-15/+31
| | | | | | | | | This reverts commit r332751 (i.e. reland r332720) after fixing module build. Differential Revision: https://reviews.llvm.org/D47068 llvm-svn: 333532
* [analyzer] Remove the redundant check about same state transition in ↵Henry Wong2018-05-301-3/+1
| | | | | | | | | | | | | | | | `ArrayBoundCheckerV2.cpp`. Summary: Since the `addTransitionImpl()` has a check about same state transition, there is no need to check it in `ArrayBoundCheckerV2.cpp`. Reviewers: NoQ, xazax.hun, george.karpenkov Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, cfe-commits, MTC Differential Revision: https://reviews.llvm.org/D47451 llvm-svn: 333531
* Fix a (possible) division by zero check in the CmpRuns scriptMikhail R. Gadelha2018-05-301-1/+1
| | | | | | I missed updating the check in r333375 llvm-svn: 333529
* [ASTImporter] Corrected lookup at import of templated record declGabor Marton2018-05-302-1/+52
| | | | | | | | | | | | | | | | | | Summary: When a CXXRecordDecl under ClassTemplateDecl is imported, check the templated record decl for similarity instead of the template. Reviewers: a.sidorin Reviewed By: a.sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D47313 Patch by Balazs Keri! llvm-svn: 333522
* Add missing curly from r333509Hans Wennborg2018-05-301-1/+1
| | | | llvm-svn: 333515
* Fix -Wunused in NDEBUG introduced by HIP r333484Sam McCall2018-05-301-3/+2
| | | | llvm-svn: 333514
* Support __iso_volatile_load8 etc on aarch64-win32.Simon Tatham2018-05-304-26/+69
| | | | | | | | | | | | | | | | | These intrinsics are used by MSVC's header files on AArch64 Windows as well as AArch32, so we should support them for both targets. I've factored them out of CodeGenFunction::EmitARMBuiltinExpr into separate functions that EmitAArch64BuiltinExpr can call as well. Reviewers: javed.absar, mstorsjo Reviewed By: mstorsjo Subscribers: kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D47476 llvm-svn: 333513
* [Sparc] Add floating-point register namesDaniel Cederman2018-05-303-2/+73
| | | | | | | | | | | | Reviewers: jyknight Reviewed By: jyknight Subscribers: eraman, fedor.sergeev, jrtc27, cfe-commits Differential Revision: https://reviews.llvm.org/D47137 llvm-svn: 333510
* [X86] Remove masking from the AVX512VNNI builtins. Use a select in IR instead.Craig Topper2018-05-305-228/+190
| | | | llvm-svn: 333509
* Protect a clang-cl file path with --.Peter Collingbourne2018-05-301-1/+1
| | | | llvm-svn: 333501
* Update NRVO logic to support early returnTaiju Tsuiki2018-05-3011-82/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The previous implementation misses an opportunity to apply NRVO (Named Return Value Optimization) below. That discourages user to write early return code. ``` struct Foo {}; Foo f(bool b) { if (b) return Foo(); Foo oo; return oo; } ``` That is, we can/should apply RVO for a local variable if: * It's directly returned by at least one return statement. * And, all reachable return statements in its scope returns the variable directly. While, the previous implementation disables the RVO in a scope if there are multiple return statements that refers different variables. On the new algorithm, local variables are in NRVO_Candidate state at first, and a return statement changes it to NRVO_Disabled for all visible variables but the return statement refers. Then, at the end of the function AST traversal, NRVO is enabled for variables in NRVO_Candidate state and refers from at least one return statement. Reviewers: rsmith Reviewed By: rsmith Subscribers: xbolva00, Quuxplusone, arthur.j.odwyer, cfe-commits Differential Revision: https://reviews.llvm.org/D47067 llvm-svn: 333500
* Sema: Add a flag for rejecting member pointers with incomplete base types.Peter Collingbourne2018-05-308-5/+51
| | | | | | | | | | Codebases that need to be compatible with the Microsoft ABI can pass this flag to avoid issues caused by the lack of a fixed ABI for incomplete member pointers. Differential Revision: https://reviews.llvm.org/D47503 llvm-svn: 333498
* [X86] Fix the names of a bunch of icelake intrinsics.Craig Topper2018-05-306-335/+324
| | | | | | | | Mostly this fixes the names of all the 128-bit intrinsics to start with _mm_ instead of _mm128_ as is the convention and what the Intel docs say. This also fixes the name of the bitshuffle intrinsics to say epi64 for 128 and 256 bit versions. llvm-svn: 333497
* Fix test failure after r333485. Try 2.Eric Fiselier2018-05-301-2/+2
| | | | | | Sorry for the breakage. llvm-svn: 333491
* Make the mangled name collision diagnostic a bit more useful by listing the ↵Richard Smith2018-05-304-10/+11
| | | | | | | | | | mangling. This helps especially when the collision is for a template specialization, where the template arguments are not available from anywhere else in the diagnostic, and are likely relevant to the problem. llvm-svn: 333489
* Fix test failure after r333485.Eric Fiselier2018-05-301-1/+1
| | | | | | | I missed adjusting a test under Misc in the last commit. This patch updates that test. llvm-svn: 333488
* [ODRHash] Support FunctionTemplateDecl in records.Richard Trieu2018-05-304-3/+804
| | | | llvm-svn: 333486
* [Sema] Use %sub to cleanup overload diagnosticsEric Fiselier2018-05-308-347/+234
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds the newly added `%sub` diagnostic modifier to cleanup repetition in the overload candidate diagnostics. I think this should be good to go. @rsmith: Some of the notes now emit `function template` where they only said `function` previously. It seems OK to me, but I would like your sign off on it. Reviewers: rsmith, EricWF Reviewed By: EricWF Subscribers: cfe-commits, rsmith Differential Revision: https://reviews.llvm.org/D47101 llvm-svn: 333485
* Add HIP toolchainYaxun Liu2018-05-308-15/+580
| | | | | | | | | | | | | | This patch adds HIP toolchain to support HIP language mode. It includes: Create specific compiler jobs for HIP. Choose specific libraries for HIP. With contribution from Greg Rodgers. Differential Revision: https://reviews.llvm.org/D45212 llvm-svn: 333484
* Add action builder for HIPYaxun Liu2018-05-302-252/+428
| | | | | | | | | | To support separate compile/link and linking across device IR in different source files, a new HIP action builder is introduced. Basically it compiles/links host and device code separately, and embed fat binary in host linking stage through linker script. Differential Revision: https://reviews.llvm.org/D46476 llvm-svn: 333483
* Revert r332839.Richard Smith2018-05-303-48/+13
| | | | | | | This is causing miscompiles and "definition with same mangled name as another definition" errors. llvm-svn: 333482
* Check pointer null-ness before dereferencing it.Richard Trieu2018-05-292-5/+9
| | | | | | | | -Warc-repeated-use-of-weak may trigger a segmentation fault when the Decl being checked is outside of a function scope, leaving the current function info pointer null. This adds a check before using the function info. llvm-svn: 333471
* [Driver] Rename DefaultTargetTriple to TargetTriplePetr Hosek2018-05-292-20/+22
| | | | | | | | | | | While this value is initialized with the DefaultTargetTriple, it can be later overriden using the -target flag so TargetTriple is a more accurate name. This change also provides an accessor which could be accessed from ToolChain implementations. Differential Revision: https://reviews.llvm.org/D47357 llvm-svn: 333468
* [CodeGen][Darwin] Set the calling-convention of thread-local variableAkira Hatanaka2018-05-292-5/+13
| | | | | | | | | | | | | | | initialization functions to 'cxx_fast_tlscc'. This fixes a bug where instructions calling initialization functions for thread-local static members of c++ template classes were using calling convention 'cxx_fast_tlscc' while the called functions weren't annotated with the calling convention. rdar://problem/40447463 Differential Revision: https://reviews.llvm.org/D47354 llvm-svn: 333447
* [X86] Tag some 128/256 load/store instructions as requiring avx512vl instead ↵Craig Topper2018-05-291-8/+8
| | | | | | of avx512f. llvm-svn: 333446
* add test for r332053Nico Weber2018-05-291-0/+2
| | | | llvm-svn: 333423
* [analyzer] const init: handle non-explicit cases more accuratelyRafael Stahl2018-05-293-7/+61
| | | | | | | | | | | | | | Summary: If the access is out of bounds, return UndefinedVal. If it is missing an explicit init, return the implicit zero value it must have. Reviewers: NoQ, xazax.hun, george.karpenkov Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D46823 llvm-svn: 333417
* Fix emission of phony dependency targets when adding extra depsDavid Stenberg2018-05-292-7/+25
| | | | | | | | | | | | | | | | | | | | | | | Summary: This commit fixes a bug where passing extra dependency entries (using -fdepfile-entry) would result in -MP incorrectly emitting a phony target for the input file, and no phony target for the first extra dependency. The extra dependencies are added first to the filename vector in DFGImpl. That clashed with the emission of the phony targets, as the code assumed that the first index always correspond to the input file. Reviewers: rsmith, pcc, krasin, bruno, vsapsai Reviewed By: vsapsai Subscribers: vsapsai, bruno, cfe-commits Differential Revision: https://reviews.llvm.org/D44568 llvm-svn: 333413
* Testing commit access with whitespace change.Rafael Stahl2018-05-291-2/+2
| | | | llvm-svn: 333396
* [X86] Merge the 3 different flavors of masked vpermi2var/vpermt2var builtins ↵Craig Topper2018-05-2913-658/+504
| | | | | | to a single version without masking. Use select builtins with appropriate operand instead. llvm-svn: 333387
* [RISCV] Add -mrelax/-mno-relax flags to enable/disable RISCV linker relaxationShiva Chen2018-05-293-0/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D44888 llvm-svn: 333385
* [coroutines] Pass implicit object parameter to promise ctor (fix BUG37604)Gor Nishanov2018-05-283-5/+66
| | | | | | | | | | | | | | | | | | Summary: Complete the implementation of p0914r1. Implicit object parameter should be passed to a promise constructor. Fixes: https://bugs.llvm.org/show_bug.cgi?id=37604 Reviewers: modocache, rsmith, lewissbaker Reviewed By: modocache Subscribers: cfe-commits, EricWF Differential Revision: https://reviews.llvm.org/D47454 llvm-svn: 333379
* Introduces --stats-only option to only show changes in statistics.Mikhail R. Gadelha2018-05-281-3/+63
| | | | llvm-svn: 333375
* [DebugInfo] Fix typo. NFCFangrui Song2018-05-271-1/+1
| | | | llvm-svn: 333352
OpenPOWER on IntegriCloud