llvm-project/clang-tools-extra/clang-include-fixer
Danila Kutenin cff192739b [clang-include-fixer] Fix incorrect ranking because of dangling references
SymbolAndSignals stores SymbolInfo which stores two std::strings. Then
the values are stored in a llvm::DenseMap<llvm::StringRef, double>. When
the sorting is happening, SymbolAndSignals are swapped and thus because
of small string optimization some strings may become invalid. This
results in incorrect ranking.

This was detected when running new std::sort algorithm against llvm
toolchain. This could have been prevented with running llvm::sort and
EXPENSIVE_CHECKS. Unfortunately, no sanitizer yelled.

I don't have commit rights, kutdanila@yandex.ru Danila Kutenin

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D116037
2021-12-20 15:56:57 +01:00
..
find-all-symbols [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
plugin [openmp] Add missing dependencies for OMP.h.inc after d90443b 2020-06-23 11:48:04 -04:00
tool [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
CMakeLists.txt [openmp] Add missing dependencies for OMP.h.inc after d90443b 2020-06-23 11:48:04 -04:00
FuzzySymbolIndex.cpp [clang-tools-extra] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:52:23 +00:00
FuzzySymbolIndex.h
InMemorySymbolIndex.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
InMemorySymbolIndex.h
IncludeFixer.cpp Cleanup identifier parsing; NFC 2021-09-14 09:12:22 -04:00
IncludeFixer.h [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
IncludeFixerContext.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
IncludeFixerContext.h [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
SymbolIndex.h
SymbolIndexManager.cpp [clang-include-fixer] Fix incorrect ranking because of dangling references 2021-12-20 15:56:57 +01:00
SymbolIndexManager.h
YamlSymbolIndex.cpp
YamlSymbolIndex.h