Code should use C++11 [[noreturn]] or C11 _Noreturn instead.
- Group Reviewers
- rG09529892b518: [Support] Remove LLVM_ATTRIBUTE_NORETURN
I had to format my changes using clang format, which is why the file has formatting changes.
I would like to see you undo all the formatting changes.
They are not germane for this patch, and (IMHO) reduce the readability of the code.
Every touched file that isn't Compiler.h had to be slightly tweaked (just word order change in function declarations) in order for the compilation to go through without any errors
[[noreturn]] is C++11.
In Oct 2016, the minimum compiler requirement was raised to GCC 4.8/MSVC 2015.
We can use [[noreturn]] since then.
I migrated lld/. I will watch the build bots and migrate llvm/
Removed LLVM_ATTRIBUTE_NORETURN entirely since the project's minimum requirements now allow us to use [[noreturn]] directly.
Also, I rebased my fork to LLVM 13 Release Branch so they don't clash with your changes
I migrated all llvm/ files. You need to remove them from the patch.
It is a good idea to drop the macro definition in llvm/include/llvm/Support/Compiler.h separately.
It makes it easy to bring back the definition if some important downstream users want extended time for migration.
(Note: the policy is that downstream is on their own. Our thinking of this is kindness, not an obligation of llvm-project.)
For example, swift is using LLVM_ATTRIBUTE_NORETURN.
(I researched a bit: LLVM_ATTRIBUTE_NORETURN is not common in downstream projects.)
Had to fix a clang-tidy issue for this to even compile, because buildbot was throwing a fit about it
If you click a harbomaster URI, sometimes the builds are good
x64 debian passed x64 windows passed
and sometimes there may be failures apparently unrelated to your patch.
Some discretion is needed.
I ended up making the refactoring by myself. Your change included some whole-file clang-format formatting which wasn't suitable.
I usually run git diff -U0 --no-color 'HEAD^' | clang/tools/clang-format/clang-format-diff.py -i -p1 to only format related lines.