summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Add "cles_khr_int64" extension.Alexey Bader2018-01-262-0/+12
| | | | | | | | | | | | | | | | | | | Summary: For OpenCL 1.1 embedded profile 64 bit integers i.e. long, ulong including the appropriate vector data types and operations on 64-bit integers are optional. The "cles_khr_int64" extension string will be reported if the embedded profile implementation supports 64-bit integers. Reviewers: Anastasia, bader Reviewed By: Anastasia, bader Subscribers: bader, yaxunl, Anastasia, cfe-commits Differential Revision: https://reviews.llvm.org/D42532 llvm-svn: 323522
* [ASTImporter] Support LambdaExprs and improve template supportAleksei Sidorin2018-01-2613-87/+435
| | | | | | | | | | | | | | Also, a number of style and bug fixes was done: * ASTImporterTest: added sanity check for source node * ExternalASTMerger: better lookup for template specializations * ASTImporter: don't add templated declarations into DeclContext * ASTImporter: introduce a helper, ImportTemplateArgumentListInfo getting SourceLocations * ASTImporter: proper set ParmVarDecls for imported FunctionProtoTypeLoc Differential Revision: https://reviews.llvm.org/D42301 llvm-svn: 323519
* [Tooling] Test more APIs of ToolExecutor. NFC.Eric Liu2018-01-261-3/+8
| | | | llvm-svn: 323517
* [NFC] fix trivial typos in comments and documentsHiroshi Inoue2018-01-269-9/+9
| | | | | | "in in" -> "in", "on on" -> "on" etc. llvm-svn: 323509
* [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel.Amara Emerson2018-01-265-0/+70
| | | | | | Differential Revision: https://reviews.llvm.org/D42276 llvm-svn: 323485
* Don't let test write to the source dir after r323426.Nico Weber2018-01-251-11/+11
| | | | llvm-svn: 323473
* AST: inline a single-use variable (NFC)Saleem Abdulrasool2018-01-251-2/+1
| | | | | | Inline the single use variable into the only use. NFC. llvm-svn: 323461
* Unused diagnostics can occur in tblgen.Benjamin Kramer2018-01-251-1/+1
| | | | llvm-svn: 323435
* [clang-cl] Add support for /arch:AVX512F and /arch:AVX512Nico Weber2018-01-252-5/+46
| | | | | | | | | | | | | | | | | | | | | For /arch:AVX512F: clang-cl and cl.exe both defines __AVX512F__ __AVX512CD__. clang-cl also defines __AVX512ER__ __AVX512PF__. 64-bit cl.exe also defines (according to /Bz) _NO_PREFETCHW. For /arch:AVX512: clang-cl and cl.exe both define __AVX512F__ __AVX512CD__ __AVX512BW__ __AVX512DQ__ __AVX512VL__. 64-bit cl.exe also defines _NO_PREFETCHW. So not 100% identical, but pretty close. Also refactor the existing AVX / AVX2 code to not repeat itself in both the 32-bit and 64-bit cases. https://reviews.llvm.org/D42538 llvm-svn: 323433
* clang-cl: Simplify handling of /arch: flag.Nico Weber2018-01-252-78/+60
| | | | | | | | | | | | | | | | | | | r213083 initially implemented /arch: support by mapping it to CPU features. Then r241077 additionally mapped it to CPU, which made the feature flags redundant (if harmless). This change here removes the redundant mapping to feature flags, and rewrites test/Driver/cl-x86-flags.c to be a bit more of an integration test that checks for preprocessor defines like AVX (like documented on MSDN) instead of for driver flags. To keep emitting warn_drv_unused_argument, use getLastArgNoClaim() followed by an explicit claim() if needed. This is in preparation for adding support for /arch:AVX512(F). No intended behavior change. https://reviews.llvm.org/D42497 llvm-svn: 323426
* [CodeGen] Decorate aggregate accesses with TBAA tagsIvan A. Kosarev2018-01-2516-97/+219
| | | | | | Differential Revision: https://reviews.llvm.org/D41539 llvm-svn: 323421
* [clang-format] Fixes indentation of inner text proto messagesKrasimir Georgiev2018-01-252-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Consider the text proto: ``` message { sub { key: value } } ``` Previously the first `{` was TT_Unknown, which caused the inner message to be indented by the continuation width. This didn't happen for: ``` message { sub: { key: value } } ``` This is because the code to mark the first `{` as a TT_DictLiteral was only considering the case where it marches forward and reaches a `:`. This patch updates this by looking not only for `:`, but also for `<` and `{`. Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42500 llvm-svn: 323419
* [Driver] Add support for mips32 and scudoSimon Dardis2018-01-252-1/+7
| | | | | | | | | | | r317337 missed that scudo is supported on MIPS32, so permit that option for MIPS32. Reviewers: cryptoad, atanasyan Differential Revision: https://reviews.llvm.org/D42416 llvm-svn: 323412
* FreeBSD needs also execinfo (in sanitizers)Kamil Rytarowski2018-01-241-2/+3
| | | | | | | | | | | | | | | | Summary: As NetBSD, FreeBSD needs execinfo for backtrace's matters. Patch by: David CARLIER. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: emaste, krytarowski, cfe-commits Differential Revision: https://reviews.llvm.org/D42467 llvm-svn: 323387
* [analyzer] Do not attempt to get the pointee of void*Alexander Shaposhnikov2018-01-242-0/+15
| | | | | | | | | | | | Do not attempt to get the pointee of void* while generating a bug report (otherwise it will trigger an assert inside RegionStoreManager::getBinding assert(!T->isVoidType() && "Attempting to dereference a void pointer!")). Test plan: make check-all Differential revision: https://reviews.llvm.org/D42396 llvm-svn: 323382
* [coroutines] Pass coro func args to promise ctorBrian Gesiak2018-01-248-36/+200
| | | | | | | | | | | | | | | | | | | Summary: Use corutine function arguments to initialize a promise type, but only if the promise type defines a constructor that takes those arguments. Otherwise, fall back to the default constructor. Test Plan: check-clang Reviewers: rsmith, GorNishanov, eric_niebler Reviewed By: GorNishanov Subscribers: toby-allsopp, lewissbaker, EricWF, cfe-commits Differential Revision: https://reviews.llvm.org/D41820 llvm-svn: 323381
* [analyzer] NFC: Run many existing C++ tests with a custom operator new().Artem Dergachev2018-01-2411-3/+40
| | | | | | | | | | | In order to provide more test coverage for inlined operator new(), add more run-lines to existing test cases, which would trigger our fake header to provide a body for operator new(). Most of the code should still behave reasonably. When behavior intentionally changes, #ifs are provided. Differential Revision: https://reviews.llvm.org/D42221 llvm-svn: 323376
* [analyzer] Enable c++-allocator-inlining by default.Artem Dergachev2018-01-245-13/+13
| | | | | | | | | | | | | | | | | | | | | | This allows the analyzer to analyze ("inline") custom operator new() calls and, even more importantly, inline constructors of objects that were allocated by any operator new() - not necessarily a custom one. All changes in the tests in the current commit are intended improvements, even if they didn't carry any explicit FIXME flag. It is possible to restore the old behavior via -analyzer-config c++-allocator-inlining=false (this flag is supported by scan-build as well, and it can be into a clang --analyze invocation via -Xclang .. -Xclang ..). There is no intention to remove the old behavior for now. Differential Revision: https://reviews.llvm.org/D42219 rdar://problem/12180598 llvm-svn: 323373
* [analyzer] Assume that the allocated value is non-null before construction.Artem Dergachev2018-01-244-19/+90
| | | | | | | | | | | | | | | | | | I.e. not after. In the c++-allocator-inlining=true mode, we need to make the assumption that the conservatively evaluated operator new() has returned a non-null value. Previously we did this on CXXNewExpr, but now we have to do that before calling the constructor, because some clever constructors are sometimes assuming that their "this" is null and doing weird stuff. We would also crash upon evaluating CXXNewExpr when the allocator was inlined and returned null and had a throw specification; this is UB even for custom allocators, but we still need not to crash. Added more FIXME tests to ensure that eventually we fix calling the constructor for null return values. Differential Revision: https://reviews.llvm.org/D42192 llvm-svn: 323370
* Revert r323051 "[cmake] Use CLANG_BINARY_DIR to determine the build directory."Vassil Vassilev2018-01-241-1/+1
| | | | | | | | This broke swift builds. Thanks for the post-commit review of Chris Bieneman and Davide Italiano! llvm-svn: 323368
* IRGen: Emit an inline implementation of __builtin_wmemcmp on MSVCRT platforms.Peter Collingbourne2018-01-242-0/+94
| | | | | | | | | The MSVC runtime library does not provide a definition of wmemcmp, so we need an inline implementation. Differential Revision: https://reviews.llvm.org/D42441 llvm-svn: 323362
* Don't create hidden dllimport global values.Rafael Espindola2018-01-242-0/+12
| | | | | | | | Hidden visibility is almost the opposite of dllimport. We were producing them before (dllimport wins in the existing llvm implementation), but now the llvm verifier produces an error. llvm-svn: 323361
* [Hexagon] Accept lowercase b in -hvx-length=64b and -hvx-length=128bKrzysztof Parzyszek2018-01-242-3/+8
| | | | llvm-svn: 323360
* [CodeComplete] only respect LoadExternal hint at namespace/tu scopeSam McCall2018-01-244-8/+16
| | | | | | | | | | Reviewers: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42428 llvm-svn: 323347
* [CUDA] Disable PGO and coverage instrumentation in NVPTX.Artem Belevich2018-01-242-1/+39
| | | | | | | | | | | | NVPTX does not have runtime support necessary for profiling to work and even call arc collection is prohibitively expensive. Furthermore, there's no easy way to collect the samples. NVPTX also does not support global constructors that clang generates if sample/arc collection is enabled. Differential Revision: https://reviews.llvm.org/D42452 llvm-svn: 323345
* clang-cl: Parse /permissive-, /Bt, Bt+ (PR32672)Hans Wennborg2018-01-242-0/+6
| | | | llvm-svn: 323330
* [clang-format] Disable string literal breaking for text protosKrasimir Georgiev2018-01-241-0/+6
| | | | | | | | | | | | | | | | Summary: Commonly string literals in protos are already multiline, so breaking them further is undesirable. Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42373 llvm-svn: 323319
* Fix typos of occurred and occurrenceMalcolm Parsons2018-01-249-11/+11
| | | | llvm-svn: 323316
* Refactor RecursiveASTVisitor test for post-order traversalRaphael Isemann2018-01-244-129/+117
| | | | | | | | | | | | Summary: The new test is now in the right directory with the other ASTVisitor tests and uses now the provided TestVisitor framework. Subscribers: hintonda, v.g.vassilev, klimek, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D37557 llvm-svn: 323310
* Attempt to fix implicit-fallthrough warning after r323218.Nico Weber2018-01-241-0/+1
| | | | llvm-svn: 323294
* Fix typo in comment.Nico Weber2018-01-241-1/+1
| | | | llvm-svn: 323293
* Fix test Driver/solaris-ld.c for Windows.Douglas Yung2018-01-241-33/+33
| | | | | | | | | - Test needs to be able to handle "clang.exe" on Windows - Test needs to be able to handle either '/' or '\\' used as the path separator Reviewed by Paul Robinson llvm-svn: 323285
* Adjust MaxAtomicInlineWidth for i386/i486 targets.Wei Mi2018-01-232-5/+65
| | | | | | | | | | | | | | This is to fix the bug reported in https://bugs.llvm.org/show_bug.cgi?id=34347#c6. Currently, all MaxAtomicInlineWidth of x86-32 targets are set to 64. However, i386 doesn't support any cmpxchg related instructions. i486 only supports cmpxchg. So in this patch MaxAtomicInlineWidth is reset as follows: For i386, the MaxAtomicInlineWidth should be 0 because no cmpxchg is supported. For i486, the MaxAtomicInlineWidth should be 32 because it supports cmpxchg. For others 32 bits x86 cpu, the MaxAtomicInlineWidth should be 64 because of cmpxchg8b. Differential Revision: https://reviews.llvm.org/D42154 llvm-svn: 323281
* Fix test Driver/solaris-ld.cRichard Trieu2018-01-231-5/+5
| | | | | | Allow test to accept calls to ld without full path. llvm-svn: 323267
* AST: correct mangling for SEL on MS ABISaleem Abdulrasool2018-01-232-1/+45
| | | | | | | | We would previously treat `SEL` as a pointer-only type. This is not the case. It should be treated similarly to `id` and `Class`. Add some test cases to ensure that it will be properly handled as well. llvm-svn: 323257
* [WebAssembly] Factor out settings common to wasm32 and wasm64. NFC.Dan Gohman2018-01-231-2/+1
| | | | | | | MaxAtomicPromoteWidth and MaxAtomicInlineWidth are 64 on both wasm32 and wasm64, so they can be set in shared code. llvm-svn: 323253
* [analyzer] Mark lines as relevant even if they weren't executed but have a ↵George Karpenkov2018-01-232-92/+125
| | | | | | | | label attached Differential Revision: https://reviews.llvm.org/D42320 llvm-svn: 323251
* CodeGen: use `llvm.used` for ObjC protocolsSaleem Abdulrasool2018-01-232-7/+9
| | | | | | | | | These symbols are supposed to be preserved even by the linker. Use the `llvm.used` to ensure that the symbols are not removed by DCE in the linker. This should be a no-op change on MachO since the symbols are annotated as `no_dead_strip`. llvm-svn: 323247
* [analyzer] Show full analyzer invocation for reproducibility in HTML reportsGeorge Karpenkov2018-01-234-1/+38
| | | | | | | | | | | | Analyzing problems which appear in scan-build results can be very difficult, as after the launch no exact invocation is stored, and it's super-hard to launch the debugger. With this patch, the exact analyzer invocation appears in the footer, and can be copied to debug/check reproducibility/etc. rdar://35980230 llvm-svn: 323245
* [html] [NFC] Use raw strings to dump the style table.George Karpenkov2018-01-231-76/+102
| | | | llvm-svn: 323244
* AST: adjust ObjC MS mangling to work with typedefsSaleem Abdulrasool2018-01-232-12/+32
| | | | | | | | | Rather than hardcode the pointerness of the `id` and `class` types, handle them generically. This allows for the template type specialization of `remove_pointer<id>` which would look through the `id` type and deal with the `objc_object` structure without the pointer. llvm-svn: 323241
* [CUDA] CUDA has no device-side library builtins.Artem Belevich2018-01-232-0/+29
| | | | | | | | | | We should (almost) never consider a device-side declaration to match a library builtin functio. Otherwise clang may ignore the implementation provided by the CUDA headers and emit clang's idea of the builtin. Differential Revision: https://reviews.llvm.org/D42319 llvm-svn: 323239
* [OPENMP] Replace call of EmitLoadOfLValue() by EmitLoadOfScalar(), NFC.Alexey Bataev2018-01-232-18/+13
| | | | | | | Replace calls of EmitLoadOfLValue() by EmitLoadOfScalar() functions if it is known that the value is scalar. llvm-svn: 323236
* [Docs] Re-generate command line documentation.Craig Topper2018-01-231-0/+18
| | | | llvm-svn: 323235
* [OPENMP] Remove more empty SourceLocations() from the code.Alexey Bataev2018-01-239-101/+106
| | | | | | | Removed more empty SourceLocations() from the OpenMP code and replaced with the correct locations for better debug info emission. llvm-svn: 323232
* test/Driver: Add some --stdlib=platform, NFC.Jonas Hahnfeld2018-01-231-4/+4
| | | | | | This fixes the failing test when building with CLANG_DEFAULT_CXX_STDLIB. llvm-svn: 323231
* test: simplify the matching logic a bit (NFC)Saleem Abdulrasool2018-01-231-1/+12
| | | | | | | Use CHECK-SAME directives to simplify the test conditions a bit. This makes it easier to see what is being checked. NFC. llvm-svn: 323230
* Name two bool parameters. No behavior change.Nico Weber2018-01-231-1/+2
| | | | llvm-svn: 323228
* clang-format: Support macros in front of @interface / @protocol for ObjC code.Nico Weber2018-01-233-46/+68
| | | | llvm-svn: 323226
* test: adjust the target for some Windows testsSaleem Abdulrasool2018-01-232-6/+6
| | | | | | | | The tests are targeting Windows but do not specify an environment. When executed on Linux, they would use an ELF output rather than the COFF output. Explicitly provide an environment. llvm-svn: 323225
OpenPOWER on IntegriCloud