summaryrefslogtreecommitdiff
path: root/clang
AgeCommit message (Collapse)Author
2019-01-15Re-order type param children of ObjC nodesStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55394
2019-01-15NFC: Some cleanups that I missed in the previous commitStephen Kelly
2019-01-15Re-order overrides in FunctionDecl dumpStephen Kelly
Output all content which is local to the FunctionDecl before traversing to child AST nodes. This is necessary so that all of the part which is local to the FunctionDecl can be split into a different method. Reviewers: aaron.ballman Differential Revision: https://reviews.llvm.org/D55083
2019-01-15NFC: Replace iterator loop with cxx_range_forStephen Kelly
2019-01-15[clang-cl] Alias /Zc:alignedNew[-] to -f[no-]aligned-allocationReid Kleckner
Implements PR40180. clang-cl has one minor behavior difference with cl with this change. Clang allows the user to enable the C++17 feature of aligned allocation without enabling all of C++17, but MSVC will not call the aligned allocation overloads unless -std:c++17 is passed. While our behavior is technically incompatible, it would require making driver mode specific changes to match MSVC precisely, and clang's behavior is useful because it allows people to experiment with new C++17 features individually. Therefore, I plan to leave it as is.
2019-01-15Enable IAS for OpenBSD SPARC.Brad Smith
2019-01-15CodeGen: Remove debug printf unintentionally added in r351228.Peter Collingbourne
2019-01-15Implement BlockDecl::Capture dump in terms of visitorsStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56709
2019-01-15NFC: Implement OMPClause dump in terms of visitorsStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56708
2019-01-15Implement CXXCtorInitializer dump in terms of VisitorStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56707
2019-01-15[MSVC Compat] Fix typo correction for inclusion directives.Volodymyr Sapsai
In MSVC compatibility mode we were checking not the typo corrected filename but the original filename. Reviewers: christylee, compnerd Reviewed By: christylee Subscribers: jkorous, dexonsmith, sammccall, hokein, cfe-commits Differential Revision: https://reviews.llvm.org/D56631
2019-01-15[Nios2] Remove Nios2 backendCraig Topper
As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months. Differential Revision: https://reviews.llvm.org/D56690
2019-01-15[Tooling] Fix broken compliation databse tests.Haojian Wu
I forgot to update the unittest in r351222.
2019-01-15[MSP430] Provide a toolchain descriptionAnton Korobeynikov
This is an initial implementation for msp430 toolchain including -mmcu option support -mhwmult options support -integrated-as by default The toolchain uses msp430-elf-as as a linker and supports msp430-gcc toolchain tree. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56658
2019-01-15[Tooling] Make clang-tool find libc++ dir on mac when running on a file ↵Haojian Wu
without compilation database. Summary: This is a regression of r348365. When clang-tools run on a file without a complation database (`clang-check /tmp/t.cc`), we will use fixed compilation database as a fallback. However the actual compiler path in the fallback complation command is just `clang-tool` which is insufficient to detect the libc++ dir. Reviewers: ilya-biryukov, EricWF Reviewed By: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56680
2019-01-15[Solaris] Move enabling IAS for SPARC from the Solaris toolchain to Generic_GCC.Brad Smith
2019-01-15Fix cpu-dispatch MV regression caused by r347812Erich Keane
r347812 permitted forward declarations for cpu-dispatch functions, which are occassionally useful as exposition in header files. However, this inadvertently permitted this function to become multiversioned after a usage. This patch ensures that the "CausesMV" checks are still run in the forward-declaration case. Change-Id: Icb6f975a2d068f088b89e3bbe26cf1d24f5a972c
2019-01-15Revert "[X86] Make _xgetbv/_xsetbv on non-windows platforms"linaro-local/ci/tcwg_kernel/llvm-master-aarch64-next-defconfigBenjamin Kramer
This reverts commit r351160. Breaks building v8.
2019-01-15Revert "Correct the source range returned from preprocessor callbacks."Benjamin Kramer
This reverts commit r350891. Also add a test case that would return an empty string with r350891.
2019-01-15Remove irrelevant references to legacy git repositories fromJames Y Knight
compiler identification lines in test-cases. (Doing so only because it's then easier to search for references which are actually important and need fixing.)
2019-01-15Reduce ASTMatchers stack footprint. Addresses http://llvm.org/PR38851Alexander Kornienko
The BoundNodesTreeBuilder class is used both directly and indirectly as a local variable in matchesAncestorOfRecursively, memoizedMatchesAncestorOfRecursively and other functions that happen to be on long recursive call paths. By reducing the inline storage size of the SmallVector we dramatically reduce the stack requirements of ASTMatchers. Running clang-tidy with a large number of checks enabled on a few arbitrarily chosen files show no performance regression.
2019-01-15Update year in license filesHans Wennborg
In last year's update (D48219) it was suggested that the release manager might want to do this, so here we go.
2019-01-15[OpenCL] opencl-c.h: read_image*(): sampler-less, and image{1,2}d_array_t ↵Roman Lebedev
variants are OpenCL-1.2+, mark them as such Summary: Refer to [[ https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf#page=242 | `6.11.13.2 Built-in Image Functions` ]], and [[ https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf#page=306 | `9.6.8 Image Read and Write Functions` ]] of the OpenCL 1.1 spec. * There is no mention of `image1d_array_t` and `image2d_array_t` anywhere in the OpenCL 1.1 spec. * All the `read_image{f,i,ui,h}()` functions, as of OpenCL 1.1 spec, have a second required parameter `sampler_t sampler` Should have prevented the following regression: https://redmine.darktable.org/issues/12493 Reviewers: yaxunl, Anastasia, echuraev, asavonic Reviewed By: Anastasia Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D56646
2019-01-15[clang][UBSan] Sanitization for alignment assumptions.Roman Lebedev
Summary: UB isn't nice. It's cool and powerful, but not nice. Having a way to detect it is nice though. [[ https://wg21.link/p1007r3 | P1007R3: std::assume_aligned ]] / http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1007r2.pdf says: ``` We propose to add this functionality via a library function instead of a core language attribute. ... If the pointer passed in is not aligned to at least N bytes, calling assume_aligned results in undefined behaviour. ``` This differential teaches clang to sanitize all the various variants of this assume-aligned attribute. Requires D54588 for LLVM IRBuilder changes. The compiler-rt part is D54590. This is a second commit, the original one was r351105, which was mass-reverted in r351159 because 2 compiler-rt tests were failing. Reviewers: ABataev, craig.topper, vsk, rsmith, rnk, #sanitizers, erichkeane, filcab, rjmccall Reviewed By: rjmccall Subscribers: chandlerc, ldionne, EricWF, mclow.lists, cfe-commits, bkramer Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54589
2019-01-15NFC: Move Decl node handling to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56643
2019-01-15[ASTDump] NFC: Move dump of type nodes to NodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56642
2019-01-15[WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses itDan Gohman
This adds support for multilib paths for wasm32 targets, following [Debian's Multiarch conventions], and also adds an experimental OS name in order to test it. [Debian's Multiarch conventions]: https://wiki.debian.org/Multiarch/ Differential Revision: https://reviews.llvm.org/D56553
2019-01-15[X86] Make _xgetbv/_xsetbv on non-windows platformsCraig Topper
Summary: This patch attempts to redo what was tried in r278783, but was reverted. These intrinsics should be available on non-windows platforms with "xsave" feature check. But on Windows platforms they shouldn't have feature check since that's how MSVC behaves. To accomplish this I've added a MS builtin with no feature check. And a normal gcc builtin with a feature check. When _MSC_VER is not defined _xgetbv/_xsetbv will be macros pointing to the gcc builtin name. I've moved the forward declarations from intrin.h to immintrin.h to match the MSDN documentation and used that as the header file for the MS builtin. I'm not super happy with this implementation, and I'm open to suggestions for better ways to do it. Reviewers: rnk, RKSimon, spatel Reviewed By: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56686
2019-01-15Revert alignment assumptions changesVlad Tsyrklevich
Revert r351104-6, r351109, r351110, r351119, r351134, and r351153. These changes fail on the sanitizer bots.
2019-01-15[COFF, ARM64] Add __byteswap intrinsicsMandeep Singh Grang
Reviewers: rnk, efriedma, ssijaric, TomTan, haripul Reviewed By: efriedma Subscribers: javed.absar, cfe-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D56685
2019-01-15[CMake][Fuchsia] Synchronize first and second stage buildsPetr Hosek
This reorders options between the first and second stage builds to make them better lined up. The change also re-enables tests for first stage which is useful e.g. for cross-compiling when we cannot run tests for second stage directly (i.e. without emulation). Differential Revision: https://reviews.llvm.org/D56652
2019-01-14[Sema] Change std::sort to llvm::sortMandeep Singh Grang
2019-01-14[COFF, ARM64] Add __nop intrinsicMandeep Singh Grang
Reviewers: rnk, efriedma, TomTan, haripul, ssijaric Reviewed By: rnk, efriedma Subscribers: javed.absar, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D56671
2019-01-14[ASTDump] NFC: Move dumping of QualType node to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56641
2019-01-14[ASTDump] NFC: Canonicalize handling of TypeLocInfoStephen Kelly
Summary: No need to avoid the Visit method. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56640
2019-01-14[ASTDump] NFC: Move Type Visit implementation to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56639
2019-01-14NFC: Fix nits I missed beforeStephen Kelly
2019-01-14Improve a -Wunguarded-availability noteErik Pilkington
Mention the deployment target, and don't say "partial" which doesn't really mean anything to users. rdar://problem/33601513 Differential revision: https://reviews.llvm.org/D56523
2019-01-14[clang][UBSan] Sanitization for alignment assumptions.Roman Lebedev
Summary: UB isn't nice. It's cool and powerful, but not nice. Having a way to detect it is nice though. [[ https://wg21.link/p1007r3 | P1007R3: std::assume_aligned ]] / http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1007r2.pdf says: ``` We propose to add this functionality via a library function instead of a core language attribute. ... If the pointer passed in is not aligned to at least N bytes, calling assume_aligned results in undefined behaviour. ``` This differential teaches clang to sanitize all the various variants of this assume-aligned attribute. Requires D54588 for LLVM IRBuilder changes. The compiler-rt part is D54590. Reviewers: ABataev, craig.topper, vsk, rsmith, rnk, #sanitizers, erichkeane, filcab, rjmccall Reviewed By: rjmccall Subscribers: chandlerc, ldionne, EricWF, mclow.lists, cfe-commits, bkramer Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54589
2019-01-14[analyzer] [PR39792] false positive on strcpy targeting struct membersGeorge Karpenkov
Patch by Pierre van Houtryve. Differential Revision: https://reviews.llvm.org/D55226
2019-01-14[analyzer] [NFC] Remove unused undefined method.George Karpenkov
Wow, at no point the linker or compiler complaints about that!
2019-01-14[WebAssembly] Remove old builtinsDan Gohman
This removes the old grow_memory and mem.grow-style builtins, leaving just the memory.grow-style builtins. Differential Revision: https://reviews.llvm.org/D56645
2019-01-14[Sema] Expose a control flag for integer to pointer ext warningKristina Brooks
While building openJDK11u, it seems that some of the code in the native core libraries make liberal use of integer to pointer comparisons. We currently have no flag to disabled this warning. This add such a flag. Patch by Kader (abdoul-kader keita) Differential Revision: https://reviews.llvm.org/D56241
2019-01-14[AST] Fix double-traversal of code in top-level lambdas in RAV(implicit = yes).Sam McCall
Summary: Prior to r351069, lambda classes were traversed or not depending on the {Function, Class, Namespace, TU} DeclContext containing them. If it was a function (common case) they were not traversed. If it was a namespace or TU (top-level lambda) they were traversed as part of that DeclContext traversal. r351069 "fixed" RAV to traverse these as part of the LambdaExpr, which is the right place. But top-level lambdas are now traversed twice. We fix that as blocks and block captures were apparently fixed in the past. Maybe it would be nicer to avoid adding the lambda classes to the DeclContext in the first place, but I can't work out the implications of that. Reviewers: bkramer, klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56665
2019-01-14clang-cl: Fix help text for /O<flags>: '/O2y-' means '/O2 /Oy-', not '/O2 /y-'Nico Weber
Differential Revision: https://reviews.llvm.org/D56489
2019-01-14clang-cl: Align help texts for /O1 and O2Nico Weber
Makes it a bit easier to see what exactly the difference is. Also use "same as" instead of "equivalent to", because that's faster to read. Differential Revision: https://reviews.llvm.org/D56488
2019-01-14[OpenCL] Set generic addr space of 'this' in special class members.Anastasia Stulova
Set address spaces of 'this' param correctly for implicit special class members. This also changes initialization conversion sequence to separate address space conversion from other qualifiers in case of binding reference to a temporary. In this case address space conversion should happen after the binding (unlike for other quals). This is needed to materialize it correctly in the alloca address space. Initial patch by Mikael Nilssoni! Differential Revision: https://reviews.llvm.org/D56066
2019-01-14[AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.Sam McCall
Summary: This fixes ASTContext's parent map for nodes in such classes (e.g. operator()). https://bugs.llvm.org/show_bug.cgi?id=39949 This also changes the observed shape of the AST for implicit RAVs. - this includes AST MatchFinder: cxxRecordDecl() now matches lambda classes, functionDecl() matches the call operator, and the parent chain is body -> call operator -> lambda class -> lambdaexpr rather than body -> lambdaexpr. - this appears not to matter for the ASTImporterLookupTable builder - this doesn't matter for the other RAVs in-tree. In order to do this, we remove the TraverseLambdaBody hook. The problem is it's hard/weird to ensure this hook is called when traversing via the implicit class. There were just two users of this hook in-tree, who use it to skip bodies. I replaced these with explicitly traversing the captures only. Another approach would be recording the bodies when the lambda is visited, and then recognizing them later. I'd be open to suggestion on how to preserve this hook, instead. Reviewers: aaron.ballman, JonasToth Subscribers: cfe-commits, rsmith, jdennett Differential Revision: https://reviews.llvm.org/D56444
2019-01-14[X86] Remove mask parameter from avx512 pmultishiftqb intrinsics. Use select ↵Craig Topper
in IR instead. Fixes PR40259
2019-01-14[X86] Remove mask parameter from vpshufbitqmb intrinsics. Change result to a ↵Craig Topper
vXi1 vector. We'll do the scalar<->vXi1 conversions with bitcasts in IR. Fixes PR40258