llvm-project/clang-tools-extra/clang-tidy/abseil
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
..
AbseilMatcher.h [NFC][clang-tidy] Put abseil headers in alphabetical order 2020-08-18 15:52:47 +01:00
AbseilTidyModule.cpp [clang-tidy] Add abseil-string-find-str-contains checker. 2020-05-28 12:35:57 -04:00
CMakeLists.txt [openmp] Add missing dependencies for OMP.h.inc after d90443b 2020-06-23 11:48:04 -04:00
DurationAdditionCheck.cpp [clang-tidy] Rename time lookup functions; NFC 2019-02-02 19:57:37 +00:00
DurationAdditionCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
DurationComparisonCheck.cpp [clang-tidy] Add the abseil-time-compare check 2019-03-11 16:47:45 +00:00
DurationComparisonCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
DurationConversionCastCheck.cpp Fix typo. "piont" => "point" 2019-08-20 00:28:21 +00:00
DurationConversionCastCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
DurationDivisionCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
DurationDivisionCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
DurationFactoryFloatCheck.cpp [clang-tidy][NFC] Tweak some generation of diag messages 2021-02-26 19:10:25 +00:00
DurationFactoryFloatCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
DurationFactoryScaleCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
DurationFactoryScaleCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
DurationRewriter.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
DurationRewriter.h [clang-tidy] Add the abseil-time-compare check 2019-03-11 16:47:45 +00:00
DurationSubtractionCheck.cpp [clang-tidy] Rename the absl duration helper functions; NFC 2019-01-24 19:23:50 +00:00
DurationSubtractionCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
DurationUnnecessaryConversionCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
DurationUnnecessaryConversionCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
FasterStrsplitDelimiterCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
FasterStrsplitDelimiterCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
NoInternalDependenciesCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
NoInternalDependenciesCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
NoNamespaceCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
NoNamespaceCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
RedundantStrcatCallsCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
RedundantStrcatCallsCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
StrCatAppendCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
StrCatAppendCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
StringFindStartswithCheck.cpp [clang-tidy][NFC] Tweak some generation of diag messages 2021-02-26 19:10:25 +00:00
StringFindStartswithCheck.h [clang-tidy] Refactor IncludeInserter 2020-07-27 12:48:55 +01:00
StringFindStrContainsCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
StringFindStrContainsCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
TimeComparisonCheck.cpp [clang-tidy] Add the abseil-time-compare check 2019-03-11 16:47:45 +00:00
TimeComparisonCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
TimeSubtractionCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
TimeSubtractionCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
UpgradeDurationConversionsCheck.cpp [clang-tidy] Use DenseSet<SourceLocation> in UpgradeDurationConversionsCheck, NFCI 2021-01-14 13:50:16 +00:00
UpgradeDurationConversionsCheck.h [clang-tidy] Use DenseSet<SourceLocation> in UpgradeDurationConversionsCheck, NFCI 2021-01-14 13:50:16 +00:00