SuccessChanges

Summary

  1. [X86] Rename X86::getImpliedFeatures to X86::updateImpliedFeatures and pass clang's StringMap directly to it. (details)
  2. [clang-tidy] Fix bugprone-bad-signal-to-kill-thread crash when `SIGTERM` was undefined after definition. (details)
  3. [clang-tidy] Fix bugprone-bad-signal-to-kill-thread crash when `SIGTERM` is not a literal. (details)
Commit 504a197fe54de83be791ea0aa2ed290f6b9285b0 by craig.topper
[X86] Rename X86::getImpliedFeatures to X86::updateImpliedFeatures and pass clang's StringMap directly to it.

No point in building a vector of StringRefs for clang to apply to the
StringMap. Just pass the StringMap and modify it directly.
The file was modifiedllvm/lib/Support/X86TargetParser.cpp (diff)
The file was modifiedclang/lib/Basic/Targets/X86.cpp (diff)
The file was modifiedllvm/include/llvm/Support/X86TargetParser.h (diff)
Commit 86711668330cf48325a5e960f30d33f6a7364db2 by platonov.aleksandr
[clang-tidy] Fix bugprone-bad-signal-to-kill-thread crash when `SIGTERM` was undefined after definition.

`PP->getMacroInfo()` returns nullptr for undefined macro, which leads to null-dereference at `MI->tockens().back()`.
Stack dump:
```
#0 0x000000000217d15a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/llvm-project/build/bin/clang-tidy+0x217d15a)
#1 0x000000000217b17c llvm::sys::RunSignalHandlers() (/llvm-project/build/bin/clang-tidy+0x217b17c)
#2 0x000000000217b2e3 SignalHandler(int) (/llvm-project/build/bin/clang-tidy+0x217b2e3)
#3 0x00007f39be5b1390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x0000000000593532 clang::tidy::bugprone::BadSignalToKillThreadCheck::check(clang::ast_matchers::MatchFinder::MatchResult const&) (/llvm-project/build/bin/clang-tidy+0x593532)
```

Reviewed By: hokein

Differential Revision: https://reviews.llvm.org/D85401
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-bad-signal-to-kill-thread-undef-sigterm.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/BadSignalToKillThreadCheck.cpp (diff)
Commit 216ad2da74f0e952af8f1c8ac84e19146d739ff2 by platonov.aleksandr
[clang-tidy] Fix bugprone-bad-signal-to-kill-thread crash when `SIGTERM` is not a literal.

If `SIGTERM` is not a literal (e.g. `#define SIGTERM ((unsigned)15)`) bugprone-bad-signal-to-kill-thread check crashes.
Stack dump:
```
#0 0x000000000217d15a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/llvm-project/build/bin/clang-tidy+0x217d15a)
#1 0x000000000217b17c llvm::sys::RunSignalHandlers() (/llvm-project/build/bin/clang-tidy+0x217b17c)
#2 0x000000000217b2e3 SignalHandler(int) (/llvm-project/build/bin/clang-tidy+0x217b2e3)
#3 0x00007f6a7efb1390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x000000000212ac9b llvm::StringRef::getAsInteger(unsigned int, llvm::APInt&) const (/llvm-project/build/bin/clang-tidy+0x212ac9b)
#5 0x0000000000593501 clang::tidy::bugprone::BadSignalToKillThreadCheck::check(clang::ast_matchers::MatchFinder::MatchResult const&) (/llvm-project/build/bin/clang-tidy+0x593501)
```

Reviewed By: hokein

Differential Revision: https://reviews.llvm.org/D85398
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-bad-signal-to-kill-thread-sigterm-not-a-literal.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/BadSignalToKillThreadCheck.cpp (diff)