aboutsummaryrefslogtreecommitdiff
path: root/clang/tools
AgeCommit message (Collapse)AuthorFilesLines
2023-10-17[clang-format] Fix a serious bug in git-clang-format (#65723)Owen Pan1-1/+1
When applying format changes to staged files, git-clang-format erroneously checks out all files in the index and thus may overwrite unstaged changes. Fixes #65643. (cherry picked from commit 743659be87daff4cc8861c525d4a6229d787ef14)
2023-09-04[Tooling/Inclusion] Add std::range symbols in the mapping.Haojian Wu1-0/+5
Fixes https://github.com/llvm/llvm-project/issues/64191 Differential Revision: https://reviews.llvm.org/D156648 (cherry picked from commit 171868dc2cd60c6e3eaeb3861b18ba0e22461291)
2023-08-30[CMake] Add a few more missing dependencies on ClangDriverOptionsJon Roelofs1-0/+6
This often breaks modules-enabled bootstrap builds. (cherry picked from commit 1e4d6122cda6529781ecf467c2ae84e5dd41acdf)
2023-07-25Revert "[OpenMP] Add the `ompx_attribute` clause for target directives"Aaron Ballman1-2/+0
This reverts commit ef9ec4bbcca2fa4f64df47bc426f1d1c59ea47e2. The changes broke several bots: https://lab.llvm.org/buildbot/#/builders/176/builds/3408 https://lab.llvm.org/buildbot/#/builders/198/builds/4028 https://lab.llvm.org/buildbot/#/builders/197/builds/8491 https://lab.llvm.org/buildbot/#/builders/197/builds/8491
2023-07-25[Clang] Fix crash in CIndex, when visiting a static_assert without messageKai Stierand1-1/+1
After implementation of "[Clang] Implement P2741R3 - user-generated static_assert messages" (47ccfd7a89e2a9a747a7114db18db1376324799c) the c indexer crashes when handling a `static_assert` w/o any message. This is caused by using `dyn_cast` to get the literal string, which isn't working on `nullptr`. Reviewed By: cor3ntin Differential Revision: https://reviews.llvm.org/D156053
2023-07-24[OpenMP] Add the `ompx_attribute` clause for target directivesJohannes Doerfert1-0/+2
CUDA and HIP have kernel attributes to tune the code generation (in the backend). To reuse this functionality for OpenMP target regions we introduce the `ompx_attribute` clause that takes these kernel attributes and emits code as if they had been attached to the kernel fuction (which is implicitly generated). To limit the impact, we only support three kernel attributes: `amdgpu_waves_per_eu`, for AMDGPU `amdgpu_flat_work_group_size`, for AMDGPU `launch_bounds`, for NVPTX The existing implementations of those attributes are used for error checking and code generation. `ompx_attribute` can be attached to any executable target region and it can hold more than one kernel attribute. Differential Revision: https://reviews.llvm.org/D156184
2023-07-20[Clang] Implement P2741R3 - user-generated static_assert messagesCorentin Jabot1-1/+1
Reviewed By: #clang-language-wg, aaron.ballman Differential Revision: https://reviews.llvm.org/D154290
2023-07-19[tools] Use "#pragma GCC" instead of "#pragma clang" to ignore -Wcast-qual ↵Jie Fu1-10/+10
in c-index-test.c (NFC)
2023-07-19[tools] Fix buildbot build failureJie Fu1-0/+8
/buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:234: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:235: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:236:10: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:237:10: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:238: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:3765: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:3766: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:3767:10: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:3768: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
2023-07-19[tools] Ignore -Wcast-qual in c-index-test.c after D153911 (NFC)Jie Fu1-0/+6
/Users/jiefu/llvm-project/clang/tools/c-index-test/c-index-test.c:234:18: error: cast from 'const char *' to 'char *' drops const qualifier [-Werror,-Wcast-qual] free((char *)unsaved_files[i].Filename); ^ /Users/jiefu/llvm-project/clang/tools/c-index-test/c-index-test.c:235:18: error: cast from 'const char *' to 'char *' drops const qualifier [-Werror,-Wcast-qual] free((char *)unsaved_files[i].Contents); ^ /Users/jiefu/llvm-project/clang/tools/c-index-test/c-index-test.c:3762:32: error: cast from 'const char *' to 'void *' drops const qualifier [-Werror,-Wcast-qual] return (CXIdxClientContainer)"TU"; ^ 3 errors generated.
2023-07-18[clang] scan-view: Remove unused python importTulio Magno Quites Machado Filho1-1/+0
Python's module imp is not being used and is not available on Python 3.12 anymore. Reviewed By: tbaeder Differential Revision: https://reviews.llvm.org/D155192
2023-07-18[clang-extdef-mapping] register necessary targest for ms-style asm blockdingfei2-0/+8
Without targets registered gives: "error: MS-style inline assembly is not available: Unable to find target for this triple (no targets are registered)" Differential Revision: https://reviews.llvm.org/D154983
2023-07-08[clang] Make amdgpu-arch tool work on WindowsYaxun (Sam) Liu4-102/+228
Currently amdgpu-arch tool detects AMD GPU by dynamically loading HSA runtime shared library and using HSA API's, which is not available on Windows. This patch makes it work on Windows by dynamically loading HIP runtime dll and using HIP API's. Reviewed by: Matt Arsenault, Joseph Huber, Johannes Doerfert Differential Revision: https://reviews.llvm.org/D153725
2023-06-30[clang] Fix leak in LoadFromCommandLineWorkingDirectory unit testHamish Knight1-2/+2
Change `ASTUnit::LoadFromCommandLine` to return a `std::unique_ptr` instead of a +1 pointer, fixing a leak in the unit test `LoadFromCommandLineWorkingDirectory`. Reviewed By: bnbarham, benlangmuir Differential Revision: https://reviews.llvm.org/D154257
2023-06-29[OMP5.2] Initial support for doacross clause.Jennifer Yu1-0/+3
2023-06-27[clang][Sema] Add CodeCompletionContext::CCC_ObjCClassForwardDeclDavid Goldman1-0/+1
- Use this new context in Sema to limit completions to seen ObjC class names - Use this new context in clangd to disable include insertions when completing ObjC forward decls Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D150978
2023-06-25[llvm] Add missing StringExtras.h includesElliot Goodrich2-0/+2
In preparation for removing the `#include "llvm/ADT/StringExtras.h"` from the header to source file of `llvm/Support/Error.h`, first add in all the missing includes that were previously included transitively through this header.
2023-06-23[ClangPackager] Add an option to extract inputs to an archiveJoseph Huber1-29/+65
Currently we simply overwrite the output file if we get muliple matches in the fatbinary. This patch introduces the `--archive` option which allows us to combine all of the files into a static archive instead. This is usefuly for creating a device specific static archive library from a fatbinary. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D153568
2023-06-20[clang-format] Add InsertNewlineAtEOF to .clang-format filesOwen Pan1-0/+1
Also, reformat all clang-format related files. Differential Revision: https://reviews.llvm.org/D153208
2023-06-20[LinkerWrapper] Support linking vendor bitcode lateJoseph Huber2-4/+28
The GPU vendors currently provide bitcode files for their device runtime. These files need to be handled specially as they are not built to be linked in with a standard `llvm-link` call or through LTO linking. This patch adds an alternative to use the existing clang handling of these libraries that does the necessary magic to make this work. We do this by causing the LTO backend to emit bitcode before running the backend. We then pass this through to clang which uses the existing support which has been fixed to support this by D152391. The backend will then be run with the merged module. This patch adds the `--builtin-bitcode=<triple>=file.bc` to specify a single file, or just `--clang-backend` to let the toolchain handle its defaults (currently nothing for NVPTX and the ROCm device libs for AMDGPU). This may have a performance impact due to running the optimizations again, we could potentially disable optimizations in LTO and only do the linking if this is an issue. This should allow us to resolve issues when relying on the `linker-wrapper` to do a late linking that may depend on vendor libraries. Depends on D152391 Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D152442
2023-06-20[clang][index] Fix cast warningJan Svoboda1-1/+2
This is a follow-up to D151938 that should fix GCC's -Wcast-qual warning.
2023-06-15[clang][index] NFCI: Make `CXFile` a `FileEntryRef`Jan Svoboda10-81/+103
This patch swaps out the `void *` behind `CXFile` from `FileEntry *` to `FileEntryRef::MapEntry *`. This allows us to remove some deprecated uses of `FileEntry::getName()`. Depends on D151854. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D151938
2023-06-13[clang] Use DenseMapBase::lookup (NFC)Kazu Hirata1-22/+3
2023-06-09[libclang] Add CXBinaryOperatorKind and CXUnaryOperatorKindMineGame1592-0/+42
Adds 2 new functions to the C libclang api for retrieving operator kinds for binary and unary operators from cursors. Also adds 2 functions for retrieving the spelling of the new enums. Fixes https://github.com/llvm/llvm-project/issues/29138 Differential Revision: https://reviews.llvm.org/D150910
2023-06-07Reland "D144999 [MC][MachO]Only emits compact-unwind format for "canonical" ↵Vy Nguyen1-0/+9
personality symbols. For the rest, use DWARFs." Reasons for rolling forward: - the crash reported from Chromium was fixed in D151824 (not related to this patch at all) - since D152824 was committed, it should now be safe to roll this forward. New change: - add an additional _ in name check This reverts commit 4980eead4d0b4666d53dad07afb091375b3a13a0.
2023-06-01[clang] Use `FileEntryRef` in modular header search (part 1/2)Jan Svoboda1-1/+2
This patch removes some deprecated uses of `{File,Directory}Entry::getName()`. No functional change indended. Depends on D151853. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D151854
2023-06-01[LinkerWrapper] Fix static library symbol resolutionJoseph Huber1-19/+37
The linker wrapper performs its own very basic symbol resolution for the purpose of supporting standard static library semantics. We do this here because the Nvidia `nvlink` wrapper does not support static linking and we have some offloading specific extensions. Currently, we always place symbols in the "table" even if they aren't extracted. This caused the logic to fail when many files were used that referenced the same undefined variable. This patch changes the pass to only add the symbols to the global "table" if the file is actually extracted. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D151839
2023-05-28[clang-repl] Fix REPL_EXTERNAL_VISIBILITY and building libclang-cpp.dll for ↵Martin Storsjö1-0/+8
MinGW configurations This fixes two issues that are observed after 5111286f06e1e10f24745007a45a830760f1790c: For builds with GCC with LLVM_LINK_LLVM_DYLIB=ON, we previously got build errors, as libclang-cpp.dll suddenly only contained the functions that were marked dllexport via REPL_EXTERNAL_VISIBILITY, instead of all symbols as expected. For MinGW builds with Clang, building previously succeeded (as it used either the __attribute__((visibility("default"))) annotation or nothing at all), and the functions were exported from libclang-cpp.dll if that was built, but the unit test failed (as neither of those cases made the functions exported from an EXE). Don't use the visibility attributes on MinGW targets for these purposes; setting default visibility only makes a difference if building with e.g. -fvisibility=hidden, but it doesn't make the symbols exported from an EXE. Differential Revision: https://reviews.llvm.org/D151620
2023-05-27Reland "[CMake] Bumps minimum version to 3.20.0.Mark de Wever1-1/+1
This reverts commit d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6. Adds the patch by @hans from https://github.com/llvm/llvm-project/issues/62719 This patch fixes the Windows build. d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 reverted the reviews D144509 [CMake] Bumps minimum version to 3.20.0. This partly undoes D137724. This change has been discussed on discourse https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193 Note this does not remove work-arounds for older CMake versions, that will be done in followup patches. D150532 [OpenMP] Compile assembly files as ASM, not C Since CMake 3.20, CMake explicitly passes "-x c" (or equivalent) when compiling a file which has been set as having the language C. This behaviour change only takes place if "cmake_minimum_required" is set to 3.20 or newer, or if the policy CMP0119 is set to new. Attempting to compile assembly files with "-x c" fails, however this is workarounded in many cases, as OpenMP overrides this with "-x assembler-with-cpp", however this is only added for non-Windows targets. Thus, after increasing cmake_minimum_required to 3.20, this breaks compiling the GNU assembly for Windows targets; the GNU assembly is used for ARM and AArch64 Windows targets when building with Clang. This patch unbreaks that. D150688 [cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump The build uses other mechanism to select the runtime. Fixes #62719 Reviewed By: #libc, Mordante Differential Revision: https://reviews.llvm.org/D151344
2023-05-27[clang-repl][CUDA] Re-land: Initial interactive CUDA support for clang-replAnubhab Ghosh1-5/+48
CUDA support can be enabled in clang-repl with --cuda flag. Device code linking is not yet supported. inline must be used with all __device__ functions. Differential Revision: https://reviews.llvm.org/D146389
2023-05-23Reland "Reland [clang-repl] Introduce Value to capture expression results"Jun Zhang1-0/+1
This reverts commit 094ab4781262b6cb49d57b0ecdf84b047c879295. Reland with changing `ParseAndExecute` to `Parse` in `Interpreter::create`. This avoid creating JIT instance everytime even if we don't really need them. This should fixes failures like https://lab.llvm.org/buildbot/#/builders/38/builds/11955 The original reverted patch also causes GN bot fails on M1. (https://lab.llvm.org/buildbot/#/builders/38/builds/11955) However, we can't reproduce it so let's reland it and see what happens. See discussions here: https://reviews.llvm.org/rGd71a4e02277a64a9dece591cdf2b34f15c3b19a0
2023-05-23[NFC][Py Reformat] Reformat python files in clang and clang-tools-extraTobias Hieta33-2924/+3443
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black`. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Reviewed By: MatzeB Differential Revision: https://reviews.llvm.org/D150761
2023-05-23[C++20] [Modules] Don't ignore -fmodule-file when we compile pcm filesChuanqi Xu3-5/+9
Close https://github.com/llvm/llvm-project/issues/62843. Previously when we compile .pcm files into .o files, the `-fmodule-file=<module-name>=<module-path>` option is ignored. This is conflicted with our consensus in https://github.com/llvm/llvm-project/issues/62707.
2023-05-20[clang-repl] Enable basic multiline support.Vassil Vassilev1-10/+20
This patch allows the users to use backslash to tell clang-repl that more input is coming. This would help support OpenMP directives which generally require to be in separate lines.
2023-05-20Revert "[clang-repl][CUDA] Initial interactive CUDA support for clang-repl"Anubhab Ghosh1-48/+2
This reverts commit 80e7eed6a610ab3c7289e6f9b7ec006bc7d7ae31.
2023-05-20[clang-repl][CUDA] Initial interactive CUDA support for clang-replAnubhab Ghosh1-2/+48
CUDA support can be enabled in clang-repl with --cuda flag. Device code linking is not yet supported. inline must be used with all __device__ functions. Differential Revision: https://reviews.llvm.org/D146389
2023-05-19Revert "[RFC][MC][MachO]Only emits compact-unwind format for "canonical" ↵Nico Weber1-9/+0
personality symbols. For the rest, use DWARFs." This reverts commit 09aaf53a05e3786eea374f3ce57574225036412d. Causes toolchain asserts building libc++ for x86_64, see https://reviews.llvm.org/D144999#4356215
2023-05-19Revert "Reland [clang-repl] Introduce Value to capture expression results"Jun Zhang1-1/+0
This reverts commit d71a4e02277a64a9dece591cdf2b34f15c3b19a0. See http://45.33.8.238/macm1/61024/step_7.txt
2023-05-19Reland [clang-repl] Introduce Value to capture expression resultsJun Zhang1-0/+1
This reverts commit 7158fd381a0bc0222195d6a07ebb42ea57957bda. * Fixes endianness issue on big endian machines like PowerPC-bl * Disable tests on platforms that having trouble to support JIT Signed-off-by: Jun Zhang <jun@junz.org>
2023-05-18[RFC][MC][MachO]Only emits compact-unwind format for "canonical" personality ↵Vy Nguyen1-0/+9
symbols. For the rest, use DWARFs. Details: https://github.com/rust-lang/rust/issues/102754 The MachO format uses 2 bits to encode these personality funtions, with 0 reserved for "no-personality". This means we can only have up to 3 personality. There are already three popular personalities: __gxx_personality_v0, __gcc_personality_v0, and __objc_personality_v0. As a result, any system that needs custom-personality will run into a problem. This patch implemented jyknight's proposal to simply force DWARFs for all non-canonical personality functions. Differential Revision: https://reviews.llvm.org/D144999
2023-05-17[Clang] Remove direct linking of offloading runtimes from the arch toolsJoseph Huber4-38/+2
The tools `amdgpu-arch` and `nvptx-arch` are used to query the supported GPUs on a system to implement features like `--offload-arch=native` as well as generally being useful for setting up tests. However, we currently directly link these if they are availible. This patch removes this because it causes many problems on the user not having the libaries present or misconfigured at build time. Since these are built unconditionally we shoudl keep the dependencies away from clang. Fixes https://github.com/llvm/llvm-project/issues/62784 Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D150807
2023-05-17Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""Nico Weber1-1/+1
This reverts commit 65429b9af6a2c99d340ab2dcddd41dab201f399c. Broke several projects, see https://reviews.llvm.org/D144509#4347562 onwards. Also reverts follow-up commit "[OpenMP] Compile assembly files as ASM, not C" This reverts commit 4072c8aee4c89c4457f4f30d01dc9bb4dfa52559. Also reverts fix attempt "[cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump" This reverts commit 7d47dac5f828efd1d378ba44a97559114f00fb64.
2023-05-16Revert "[clang-repl] Introduce Value to capture expression results"Jun Zhang1-1/+0
This reverts commit a423b7f1d7ca8b263af85944f57a69aa08fc942c. See https://lab.llvm.org/buildbot/#/changes/95083
2023-05-16[clang-repl] Introduce Value to capture expression resultsJun Zhang1-0/+1
This is the second part of the below RFC: https://discourse.llvm.org/t/rfc-handle-execution-results-in-clang-repl/68493 This patch implements a Value class that can be used to carry expression results in clang-repl. In other words, when we see a top expression without semi, it will be captured and stored to a Value object. You can explicitly specify where you want to store the object, like: ``` Value V; llvm::cantFail(Interp->ParseAndExecute("int x = 42;")); llvm::cantFail(Interp->ParseAndExecute("x", &V)); ``` `V` now stores some useful infomation about `x`, you can get its real value (42), it's `clang::QualType` or anything interesting. However, if you don't specify the optional argument, it will be captured to a local variable, and automatically called `Value::dump`, which is not implemented yet in this patch. Signed-off-by: Jun Zhang <jun@junz.org>
2023-05-13Reland "[CMake] Bumps minimum version to 3.20.0."Mark de Wever1-1/+1
The owner of the last two failing buildbots updated CMake. This reverts commit e8e8707b4aa6e4cc04c0cffb2de01d2de71165fc.
2023-05-12[Driver] -ftime-trace: derive trace file names from -o and -dumpdirFangrui Song1-14/+3
Inspired by D133662. Close https://github.com/llvm/llvm-project/issues/57285 When -ftime-trace is specified and the driver performs both compilation and linking phases, the trace files are currently placed in the temporary directory (/tmp by default on *NIX). A more sensible behavior would be to derive the trace file names from the -o option, similar to how GCC derives auxiliary and dump file names. Use -dumpdir (D149193) to implement the -gsplit-dwarf like behavior. The following script demonstrates the time trace filenames. ``` #!/bin/sh -e PATH=/tmp/Rel/bin:$PATH # adapt according to your build directory mkdir -p d e f echo 'int main() {}' > d/a.c echo > d/b.c a() { rm $1 || exit 1; } clang -ftime-trace d/a.c d/b.c # previously /tmp/[ab]-*.json a a-a.json; a a-b.json clang -ftime-trace d/a.c d/b.c -o e/x # previously /tmp/[ab]-*.json a e/x-a.json; a e/x-b.json clang -ftime-trace d/a.c d/b.c -o e/x -dumpdir f/ a f/a.json; a f/b.json clang -ftime-trace=f d/a.c d/b.c -o e/x a f/a-*.json; a f/b-*.json clang -c -ftime-trace d/a.c d/b.c a a.json b.json clang -c -ftime-trace=f d/a.c d/b.c a f/a.json f/b.json clang -c -ftime-trace d/a.c -o e/xa.o a e/xa.json clang -c -ftime-trace d/a.c -o e/xa.o -dumpdir f/g a f/ga.json ``` The driver checks `-ftime-trace` and `-ftime-trace=`, infers the trace file name, and passes `-ftime-trace=` to cc1. The `-ftime-trace` cc1 option is removed. With offloading, previously `-ftime-trace` is passed to all offloading actions, causing the same trace file to be overwritten by host and offloading actions. This patch doesn't attempt to support offloading (D133662), but makes a sensible change (`OffloadingPrefix.empty()`) to ensure we don't overwrite the trace file. Minor behavior differences: the trace file is now a result file, which will be removed upon an error. -ftime-trace-granularity=0, like -ftime-trace, can now cause a -Wunused-command-line-argument warning. Reviewed By: Maetveis Differential Revision: https://reviews.llvm.org/D150282
2023-05-06Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""Mark de Wever1-1/+1
Unfortunatly not all buildbots are updated. This reverts commit ffb807ab5375b3f78df198dc5d4302b3b552242f.
2023-05-06Reland "[CMake] Bumps minimum version to 3.20.0."Mark de Wever1-1/+1
All build bots should be updated now. This reverts commit 44d38022ab29a3156349602733b3459df5beef93.
2023-05-03[clang][deps] Make clang-scan-deps write modules in raw formatBen Langmuir2-2/+2
We have no use for debug info for the scanner modules, and writing raw ast files speeds up scanning ~15% in some cases. Note that the compile commands produced by the scanner will still build the obj format (if requested), and the scanner can *read* obj format pcms, e.g. from a PCH. rdar://108807592 Differential Revision: https://reviews.llvm.org/D149693
2023-04-26[clang-rename] Exit gracefully when no input providedShivam Gupta1-0/+4
clang-rename on a non existing file segfaults Command to run - $ clang-rename -offset=0 -new-name=plop asdasd Error while processing llvm-project/asdasd. clang-rename: llvm-project/llvm/include/llvm/Support/ErrorOr.h:237: llvm::ErrorOr<T>::storage_type* llvm::ErrorOr<T>::getStorage() [with T = const clang::FileEntry*; llvm::ErrorOr<T>::storage_type = const clang::FileEntry*]: Assertion `!HasError && "Cannot get value when an error exists!"' failed. [1] 827497 IOT instruction clang-rename -offset=0 -new-name=plop asdasd This fixes https://github.com/llvm/llvm-project/issues/36471. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D148439