llvm/clang-tools-extra/clang-tidy
Simon Pilgrim 61cdaf66fe [ADT] Remove APInt/APSInt toString() std::string variants
<string> is currently the highest impact header in a clang+llvm build:

https://commondatastorage.googleapis.com/chromium-browser-clang/llvm-include-analysis.html

One of the most common places this is being included is the APInt.h header, which needs it for an old toString() implementation that returns std::string - an inefficient method compared to the SmallString versions that it actually wraps.

This patch replaces these APInt/APSInt methods with a pair of llvm::toString() helpers inside StringExtras.h, adjusts users accordingly and removes the <string> from APInt.h - I was hoping that more of these users could be converted to use the SmallString methods, but it appears that most end up creating a std::string anyhow. I avoided trying to use the raw_ostream << operators as well as I didn't want to lose having the integer radix explicit in the code.

Differential Revision: https://reviews.llvm.org/D103888
2021-06-11 13:19:15 +01:00
..
abseil [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
altera [clang-tidy] Fix altera-struct-pack-align crash for struct fields with incomplete type 2021-05-17 16:50:47 +03:00
android
boost
bugprone [clang-tidy] Fix a crash on invalid code for memset-usage check. 2021-05-19 09:53:18 +02:00
cert [clang-tidy][NFC] Update tests and Default options to use boolean value 2021-05-04 18:17:56 +01:00
concurrency
cppcoreguidelines [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
darwin
fuchsia
google
hicpp
linuxkernel
llvm [clang-tidy][NFC] Update tests and Default options to use boolean value 2021-05-04 18:17:56 +01:00
llvmlibc
misc [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
modernize [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
mpi [clang-tidy] Fix mpi checks when running multiple TUs per clang-tidy process 2021-03-25 14:38:37 +00:00
objc
openmp
performance [clang-tidy] performance-unnecessary-copy-initialization: Look at the canonical type when checking for aliases. 2021-06-09 16:36:53 -04:00
plugin
portability
readability Fix nits. 2021-04-12 18:46:13 +02:00
tool
utils [clang-tidy] bugprone-infinite-loop: forFunction() -> forCallable(). 2021-05-13 11:25:01 -07:00
zircon
add_new_check.py
clang-tidy-config.h.cmake
ClangTidy.cpp [libtooling][clang-tidy] Fix diagnostics not highlighting fed SourceRanges 2021-04-10 16:43:44 +02:00
ClangTidy.h
ClangTidyCheck.cpp [clang-tidy][NFC] Short circuit getting enum options suggestions. 2021-05-03 11:20:27 +01:00
ClangTidyCheck.h
ClangTidyDiagnosticConsumer.cpp Remark was added to clang tooling Diagnostic 2021-05-24 11:21:44 -04:00
ClangTidyDiagnosticConsumer.h
ClangTidyForceLinker.h
ClangTidyModule.cpp
ClangTidyModule.h
ClangTidyModuleRegistry.h
ClangTidyOptions.cpp
ClangTidyOptions.h
ClangTidyProfiling.cpp
ClangTidyProfiling.h
CMakeLists.txt
ExpandModularHeadersPPCallbacks.cpp
ExpandModularHeadersPPCallbacks.h
GlobList.cpp
GlobList.h
rename_check.py