summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* [LibTooling] Add `before` and `after` selectors for selecting point-ranges ↵Yitzhak Mandelbaum2019-05-291-0/+22
| | | | | | | | | | | | | | | | | | | | relative to nodes. Summary: The `before` and `after` selectors allow users to specify a zero-length range -- a point -- at the relevant location in an AST-node's source. Point ranges can be useful, for example, to insert a change using an API that takes a range to be modified (e.g. `tooling::change()`). Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62419 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361955 91177308-0d34-0410-b5e6-96231b3b80d8
* [Index] Correctly set symbol kind of IndirectFieldDeclIlya Biryukov2019-05-291-0/+1
| | | | | | | | | | | | | | | | Summary: The kind has been 'unknown' before, now it is 'field'. Reviewers: kadircet Reviewed By: kadircet Subscribers: jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62573 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361941 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Fix i386 struct and union parameter alignmentPengfei Wang2019-05-291-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to i386 System V ABI 2.1: Structures and unions assume the alignment of their most strictly aligned component. But current implementation always takes them as 4-byte aligned which will result in incorrect code, e.g: 1 #include <immintrin.h> 2 typedef union { 3 int d[4]; 4 __m128 m; 5 } M128; 6 extern void foo(int, ...); 7 void test(void) 8 { 9 M128 a; 10 foo(1, a); 11 foo(1, a.m); 12 } The first call (line 10) takes the second arg as 4-byte aligned while the second call (line 11) takes the second arg as 16-byte aligned. There is oxymoron for the alignment of the 2 calls because they should be the same. This patch fixes the bug by following i386 System V ABI and apply it to Linux only since other System V OS (e.g Darwin, PS4 and FreeBSD) don't want to spend any effort dealing with the ramifications of ABI breaks at present. Patch by Wei Xiao (wxiao3) Differential Revision: https://reviews.llvm.org/D60748 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361934 91177308-0d34-0410-b5e6-96231b3b80d8
* revert rC361928: [PowerPC] [Clang] Port SSE intrinsics to PowerPCZi Xuan Wu2019-05-293-1888/+0
| | | | | | | Because test fails in other targets rather than PowerPC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361930 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] [Clang] Port SSE intrinsics to PowerPCZi Xuan Wu2019-05-293-0/+1888
| | | | | | | | | | | | | | | | Port xmmintrin.h which include Intel SSE intrinsics implementation to PowerPC platform (using Altivec). The new headers containing those implemenations are located into a directory named ppc_wrappers which has higher priority when the platform is PowerPC on Linux. They are mainly developed by Steven Munroe, with contributions from Paul Clarke, Bill Schmidt, Jinsong Ji and Zixuan Wu. Patched by: Qiu Chaofan <qiucf@cn.ibm.com> Reviewed By: Jinsong Ji Differential Revision: https://reviews.llvm.org/D62121 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361928 91177308-0d34-0410-b5e6-96231b3b80d8
* Make __has_builtin work with __builtin_LINE and friends.Eric Fiselier2019-05-291-0/+4
| | | | | | | | | | The source location builtins are implemented as keywords, but __has_builtin should still report true for them. This patch also fixes a test failure on systemz where the alignment of string literals is 2 not 1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361920 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Search the toolchain dir with -print-file-namePetr Hosek2019-05-291-0/+5
| | | | | | | | | | This is useful when looking for directories or files relative to the toolchain root, e.g. include/c++/v1. This change also adds a test to make sure this functionality doesn't regress in the future. Differential Revision: https://reviews.llvm.org/D62558 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361903 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Fix the Sema checks for getmant builtins to only allow 4 and 8 for ↵Craig Topper2019-05-281-7/+4
| | | | | | | | | rounding immediates. These don't support embedded rounding so we shouldn't be setting HasRC. That way we only allow current direction and suppress all exceptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361897 91177308-0d34-0410-b5e6-96231b3b80d8
* Defer creating fields for captures until we finish building theRichard Smith2019-05-287-150/+103
| | | | | | | | | | | | | | | capturing expression or statement. No functionality change yet. The intent is that we will also delay building the initialization expression until the enclosing context, so that: a) we build the initialization expression in the right context, and b) we can elide captures that are not odr-used, as suggested by P0588R1. This also consolidates some duplicated code building capture fields into a single place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361893 91177308-0d34-0410-b5e6-96231b3b80d8
* If capturing a variable fails, add a capture anyway (and mark itRichard Smith2019-05-284-50/+68
| | | | | | invalid) so that we can avoid repeated diagnostics for the same capture. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361891 91177308-0d34-0410-b5e6-96231b3b80d8
* Move code to mark a variable as odr-used adjacement to all the relatedRichard Smith2019-05-282-5/+39
| | | | | | | | code. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361890 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Fix -working-directory issuesMichael J. Spencer2019-05-282-27/+18
| | | | | | | | | | | | | | | | Currently the `-working-directory` option does not actually impact the working directory for all of the clang driver, it only impacts how files are looked up to make sure they exist. This means that that clang passes the wrong paths to -fdebug-compilation-dir and -coverage-notes-file. This patch fixes that by changing all the places in the driver where we convert to absolute paths to use the VFS, and then calling setCurrentWorkingDirectory on the VFS. This also changes the default VFS for `Driver` to use a virtualized working directory, instead of changing the process's working directory. Differential Revision: https://reviews.llvm.org/D62271 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361885 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA][HIP] Emit dependent libs for host onlyYaxun Liu2019-05-281-1/+6
| | | | | | | | | | | | | | Recently D60274 was introduced to allow lld to handle dependent libs. However current usage of dependent libs (e.g. pragma comment(lib, *) in windows header files) are intended for host only. Emitting the metadata in device IR causes link error in device path. Until there is a way to different it dependent libs for device or host, metadata for dependent libs should be emitted for host only. This patch enforces that. Differential Revision: https://reviews.llvm.org/D62483 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361880 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Handle lrint/llrint builtinsAdhemerval Zanella2019-05-281-0/+16
| | | | | | | | | | | | | As for other floating-point rounding builtins that can be optimized when build with -fno-math-errno, this patch adds support for lrint and llrint. It currently only optimize for AArch64 backend. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D62019 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361878 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Set pragma start loc to `#pragma` locJoel E. Denny2019-05-281-1/+1
| | | | | | | | | | | | | | | This patch adjusts `PragmaOpenMPHandler` to set the location of `tok::annot_pragma_openmp` to the `#pragma` location instead of the `omp` location so that the former becomes the start location of the OpenMP AST node. This can be useful when, for example, rewriting a directive using Clang's Rewrite facility. Most of this patch updates tests for changes to locations in diagnostics and `-ast-dump` output. Reviewed By: ABataev, lebedev.ri, Meinersbur, aaron.ballman Differential Revision: https://reviews.llvm.org/D61509 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361867 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM] Replace fp-only-sp and d16 with fp64 and d32.Simon Tatham2019-05-281-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those two subtarget features were awkward because their semantics are reversed: each one indicates the _lack_ of support for something in the architecture, rather than the presence. As a consequence, you don't get the behavior you want if you combine two sets of feature bits. Each SubtargetFeature for an FP architecture version now comes in four versions, one for each combination of those options. So you can still say (for example) '+vfp2' in a feature string and it will mean what it's always meant, but there's a new string '+vfp2d16sp' meaning the version without those extra options. A lot of this change is just mechanically replacing positive checks for the old features with negative checks for the new ones. But one more interesting change is that I've rearranged getFPUFeatures() so that the main FPU feature is appended to the output list *before* rather than after the features derived from the Restriction field, so that -fp64 and -d32 can override defaults added by the main feature. Reviewers: dmgreen, samparker, SjoerdMeijer Subscribers: srhines, javed.absar, eraman, kristof.beyls, hiraditya, zzheng, Petar.Avramovic, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D60691 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361845 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeComplete] Set preferred type for qualified-idIlya Biryukov2019-05-282-6/+15
| | | | | | | | | | | | | | Reviewers: kadircet Reviewed By: kadircet Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62514 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361838 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeComplete] Consistently break after '{' in multi-line patternsIlya Biryukov2019-05-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Completion can return multi-line patterns in some cases, e.g. for (<#init#>; <#cond#>; <#inc#>) { <#body#> } However, most patterns break the line only before closing brace, resulting in code like: namespace <#name#> { <#decls#> } While some (e.g. the 'for' example above) are breaking lines after the opening brace too. This change ensures all patterns consistently break after the opening brace, this leads to nicer UX when using those in an actual editor. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62405 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361829 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analyzer] Replace `CXXSelfAssignmentBRVisitor` with `NoteTags`Adam Balogh2019-05-284-56/+27
| | | | | | | | | | | | | | The `cplusplus.SelfAssignment` checker has a visitor that is added to every `BugReport` to mark the to branch of the self assignment operator with e.g. `rhs == *this` and `rhs != *this`. With the new `NoteTag` feature this visitor is not needed anymore. Instead the checker itself marks the two branches using the `NoteTag`s. Differential Revision: https://reviews.llvm.org/D62479 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361818 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert [test] Fix plugin testsDon Hinton2019-05-2811-169/+0
| | | | | | | | This reverts r361790 (git commit fe5eaab2b5b4523886bd63aebcfea8cfce586fa1) It's causing buildbot breakage, so reverting while I investigate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361793 91177308-0d34-0410-b5e6-96231b3b80d8
* [test] Fix plugin testsDon Hinton2019-05-2811-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The following changes were required to fix these tests: 1) Change LLVM_ENABLE_PLUGINS to an option and move it to llvm/CMakeLists.txt with an appropriate default -- which matches the original default behavior. 2) Move the plugins directory from clang/test/Analysis clang/lib/Analysis. It's not enough to add an exclude to the lit.local.cfg file because add_lit_testsuites recurses the tree and automatically adds the appropriate `check-` targets, which don't make sense for the plugins because they aren't tests and don't have `RUN` statements. Here's a list of the `clang-check-anlysis*` targets with this change: ``` $ ninja -t targets all| sed -n "s/.*\/\(check[^:]*\):.*/\1/p" | sort -u | grep clang-analysis check-clang-analysis check-clang-analysis-checkers check-clang-analysis-copypaste check-clang-analysis-diagnostics check-clang-analysis-engine check-clang-analysis-exploration_order check-clang-analysis-html_diagnostics check-clang-analysis-html_diagnostics-relevant_lines check-clang-analysis-inlining check-clang-analysis-objc check-clang-analysis-unified-sources check-clang-analysis-z3 ``` 3) Simplify the logic and only include the subdirectories under clang/lib/Analysis/plugins if LLVM_ENABLE_PLUGINS is set. Reviewed By: NoQ Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62445 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361790 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Change layout of per-target runtimes to resemble multiarchPetr Hosek2019-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This is a follow up to r361432, changing the layout of per-target runtimes to more closely resemble multiarch. While before, we used the following layout: [RESOURCE_DIR]/<target>/lib/libclang_rt.<runtime>.<ext> Now we use the following layout: [RESOURCE_DIR]/lib/<target>/libclang_rt.<runtime>.<ext> This also more closely resembles the existing "non-per-target" layout: [RESOURCE_DIR]/lib/<os>/libclang_rt.<runtime>-<arch>.<ext> This change will enable further simplification of the driver logic in follow up changes. Differential Revision: https://reviews.llvm.org/D62469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361784 91177308-0d34-0410-b5e6-96231b3b80d8
* [Preprocessor] Fix crash emitting note with framework location for "file not ↵Volodymyr Sapsai2019-05-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | found" error. A filename can be remapped with a header map to point to a framework header and we can find the corresponding framework without the header. But if the original filename doesn't have a remapped framework name, we'll fail to find its location and will dereference a null pointer during diagnostics emission. Fix by tracking remappings better and emit the note only if a framework is found before any of the remappings. rdar://problem/48883447 Reviewers: arphaman, erik.pilkington, jkorous Reviewed By: arphaman Subscribers: dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D61707 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361779 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Respect TerseOutput when printing lambdasKadir Cetinkaya2019-05-271-1/+4
| | | | | | | | | | | | Reviewers: ilya-biryukov, hokein, sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62487 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361771 91177308-0d34-0410-b5e6-96231b3b80d8
* When dumping the AST to JSON, dump the type information from a typeid ↵Aaron Ballman2019-05-272-2/+12
| | | | | | expression with a type operand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361769 91177308-0d34-0410-b5e6-96231b3b80d8
* When dumping the AST to JSON, dump whether a function is variadic or not.Aaron Ballman2019-05-271-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361768 91177308-0d34-0410-b5e6-96231b3b80d8
* When dumping the AST to JSON, dump the declared name of a MemberExpr operand.Aaron Ballman2019-05-271-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361767 91177308-0d34-0410-b5e6-96231b3b80d8
* When dumping the AST to JSON, dump the argument name to a sizeof pack ↵Aaron Ballman2019-05-271-0/+4
| | | | | | expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361766 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Fix file-scope const sampler variable for 2.0Yaxun Liu2019-05-271-1/+15
| | | | | | | | | | | | | | | | | | | | OpenCL spec v2.0 s6.13.14: Samplers can also be declared as global constants in the program source using the following syntax. const sampler_t <sampler name> = <value> This works fine for OpenCL 1.2 but fails for 2.0, because clang duduces address space of file-scope const sampler variable to be in global address space whereas spec v2.0 s6.9.b forbids file-scope sampler variable to be in global address space. The fix is not to deduce address space for file-scope sampler variables. Differential Revision: https://reviews.llvm.org/D62197 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361757 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeComplete] Complete 'return true/false' in boolean functionsIlya Biryukov2019-05-271-11/+26
| | | | | | | | | | | | | | Reviewers: kadircet Reviewed By: kadircet Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62391 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361753 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASTImporter] Added visibility context check for CXXRecordDecl.Balazs Keri2019-05-271-0/+3
| | | | | | | | | | | | | | | | | | | Summary: ASTImporter makes now difference between classes with same name in different translation units if these are not visible outside. These classes are not linked into one decl chain. Reviewers: martong, a.sidorin, shafik Reviewed By: shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62312 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361752 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver][RISCV] Simplify. NFCFangrui Song2019-05-261-31/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361710 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Update handling of c++ and runtime directoriesPetr Hosek2019-05-262-43/+55
| | | | | | | | | | | | This is a follow up to r361432 and r361504 which addresses issues introduced by those changes. Specifically, it avoids duplicating file and runtime paths in case when the effective triple is the same as the cannonical one. Furthermore, it fixes the broken multilib setup in the Fuchsia driver and deduplicates some of the code. Differential Revision: https://reviews.llvm.org/D62442 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361709 91177308-0d34-0410-b5e6-96231b3b80d8
* Permit static local structured bindings to be named from arbitrary scopes ↵Richard Smith2019-05-253-4/+14
| | | | | | inside their declaring scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361686 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename clangToolingRefactor to clangToolingRefactoring for consistency with ↵Nico Weber2019-05-251-1/+1
| | | | | | | | | | its directory See "[cfe-dev] The name of clang/lib/Tooling/Refactoring". Differential Revision: https://reviews.llvm.org/D62420 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361684 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Add a prunable note for skipping vbase inits in subclasses.Artem Dergachev2019-05-243-2/+31
| | | | | | | | | | | | | When initialization of virtual base classes is skipped, we now tell the user about it, because this aspect of C++ isn't very well-known. The implementation is based on the new "note tags" feature (r358781). In order to make use of it, allow note tags to produce prunable notes, and move the note tag factory to CoreEngine. Differential Revision: https://reviews.llvm.org/D61817 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361682 91177308-0d34-0410-b5e6-96231b3b80d8
* [CFG] Add branch to skip vbase inits when they're handled by superclass.Artem Dergachev2019-05-245-20/+80
| | | | | | | | | | | | | | | | | | | This patch adds the run-time CFG branch that would skip initialization of virtual base classes depending on whether the constructor is called from a superclass constructor or not. Previously the Static Analyzer was already skipping virtual base-class initializers in such constructors, but it wasn't skipping their arguments and their potential side effects, which was causing pr41300 (and was generally incorrect). The previous skipping behavior is now replaced with a hard assertion that we're not even getting there due to how our CFG works. The new CFG element is under a CFG build option so that not to break other consumers of the CFG by this change. Static Analyzer support for this change is implemented. Differential Revision: https://reviews.llvm.org/D61816 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361681 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix crash deserializing a CUDAKernelCallExpr with a +Asserts binary.Richard Smith2019-05-241-1/+1
| | | | | | | The assertion in setConfig read from the (uninitialized) CONFIG expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361680 91177308-0d34-0410-b5e6-96231b3b80d8
* Default arguments are potentially constant evaluated.Richard Smith2019-05-241-5/+1
| | | | | | | | We need to eagerly instantiate constexpr functions used in them even if the default argument is never actually used, because we might evaluate portions of it when performing semantic checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361670 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor use-marking to better match standard terminology. NoRichard Smith2019-05-241-162/+244
| | | | | | functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361668 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analyzer] Checker for non-determinism caused by iteration of unordered ↵Mandeep Singh Grang2019-05-242-0/+101
| | | | | | | | | | | | | | | | | | container of pointers Summary: Added a checker for non-determinism caused by iterating unordered containers like std::unordered_set containing pointer elements. Reviewers: NoQ, george.karpenkov, whisperity, Szelethus, baloghadamsoftware Reviewed By: Szelethus Subscribers: mgorny, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, jdoerfert, Charusso, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59279 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361664 91177308-0d34-0410-b5e6-96231b3b80d8
* Add JSON dumping tests for ObjC statements; add support for dumping @catch ↵Aaron Ballman2019-05-241-0/+7
| | | | | | catch-all statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361660 91177308-0d34-0410-b5e6-96231b3b80d8
* [NewPassManager] Add tuning option: LoopUnrolling [clang-change]Alina Sbirlea2019-05-241-0/+1
| | | | | | | | | | | | | | | | Summary: Use CodeGenOpts's setting for loop unrolling. [to be coupled with D61618] Reviewers: chandlerc Subscribers: jlebar, dmgreen, cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61620 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361653 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for dumping Objective C AST declaration nodes to JSON.Aaron Ballman2019-05-241-4/+155
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361652 91177308-0d34-0410-b5e6-96231b3b80d8
* [WebAssembly] Use "linker" as linker shortname.Sam Clegg2019-05-242-10/+4
| | | | | | | | | | | This is in line with other platforms. Also, move the single statement methods into the header (also in line with other platform). Differential Revision: https://reviews.llvm.org/D62406 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361651 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASTImporter] Call to HandleNameConflict in VisitRecordDecl mistakeningly ↵Shafik Yaghmour2019-05-241-1/+1
| | | | | | | | | | | | | using Name instead of SearchName Summary: https://reviews.llvm.org/D51633 added error handling to the ASTNodeImporter::VisitRecordDecl for the conflicting names case. This could lead to erroneous return of an error in that case since we should have been using SearchName. Name may be empty in the case where we find the name via D->getTypedefNameForAnonDecl()->getDeclName(). This fix is very similar to https://reviews.llvm.org/D59665 Differential Revision: https://reviews.llvm.org/D62352 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361650 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeComplete] Add whitespace around braces in lambda completionsIlya Biryukov2019-05-241-0/+3
| | | | | | | This produces nicer output. Trivial follow-up to r361461, so sending without review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361645 91177308-0d34-0410-b5e6-96231b3b80d8
* [LibTooling] Add Explanation parameter to `makeRule`.Yitzhak Mandelbaum2019-05-241-4/+4
| | | | | | | | | | | | | | | | | Summary: Conceptually, a single-case RewriteRule has a matcher, edit(s) and an (optional) explanation. `makeRule` previously only took the matcher and edit(s). This change adds (optional) support for the explanation. Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62390 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361643 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add support for the cl_arm_integer_dot_product extensionsKevin Petit2019-05-241-0/+28
| | | | | | | | | | The specification is available in the Khronos OpenCL registry: https://www.khronos.org/registry/OpenCL/extensions/arm/cl_arm_integer_dot_product.txt Signed-off-by: Kevin Petit <kevin.petit@arm.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361641 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeComplete] Filter override completions by function nameIlya Biryukov2019-05-241-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | Summary: We put only part of the signature starting with a function name into "typed text" chunks now, previously the whole signature was "typed text". This leads to meaningful fuzzy match scores, giving better signals to compare with other completion items. Ideally, we would not display the result type to the user, but that requires adding a new kind of completion chunk. Reviewers: kadircet Reviewed By: kadircet Subscribers: jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62298 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361623 91177308-0d34-0410-b5e6-96231b3b80d8