llvm-project/clang/lib/Tooling
Mikhail Maltsev a0e30914f8 [clang][Tooling] Get rid of a hack in SymbolOccurrences, NFCI
The class `SymbolOccurrences` can store either a single `SourceRange`
in-place or multiple `SourceRanges` on the heap. In the latter case
the number of source ranges is stored in the internal representation
of the beginning `SourceLocation` of the in-place `SourceRange`
object.

This change gets rid of such hack by placing `SourceRange` in a union
which holds either a valid `SourceRange` or an `unsigned int` (a number
of ranges).

The change also adds `static_assert`s that check that `SourceRange` and
`SourceLocation` are trivially destructible (this is required for the
current patch and for D94237 which has already been committed).

Reviewed By: MarkMurrayARM, simon_tatham

Differential Revision: https://reviews.llvm.org/D94599
2021-01-22 13:01:41 +00:00
..
ASTDiff [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
Core Tooling: Migrate to FileEntryRef in clang::tooling::applyAllReplacements, NFC 2020-12-09 16:31:38 -08:00
DependencyScanning ADT: Allow IntrusiveRefCntPtr construction from std::unique_ptr, NFC 2020-12-08 17:33:19 -08:00
Inclusions [clang-format] Add option for case sensitive regexes for sorted includes 2020-12-05 16:33:21 +00:00
Refactoring [clang][Tooling] Get rid of a hack in SymbolOccurrences, NFCI 2021-01-22 13:01:41 +00:00
Syntax [Syntax] Tablegen literal expressions. 2020-11-12 01:26:02 +01:00
Transformer [libTooling] Change `addInclude` to use expansion locs. 2021-01-15 03:08:56 +00:00
AllTUsExecution.cpp ADT: Allow IntrusiveRefCntPtr construction from std::unique_ptr, NFC 2020-12-08 17:33:19 -08:00
ArgumentsAdjusters.cpp getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver 2020-09-08 10:21:18 +02:00
CMakeLists.txt [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
CommonOptionsParser.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
CompilationDatabase.cpp [CompilationDatabase] Pass Twine by const reference instead of by value. NFCI. 2021-01-07 12:53:28 +00:00
Execution.cpp [NFC] Refactor Registry loops to range for 2020-06-19 00:40:10 +01:00
ExpandResponseFilesCompilationDatabase.cpp Remove unused Endian.h includes, NFC 2020-03-11 15:45:34 -07:00
FileMatchTrie.cpp [clang][Tooling] Try to avoid file system access if there is no record for the file in compile_commads.json 2020-07-17 18:49:14 +02:00
FixIt.cpp [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation. 2019-04-05 14:05:03 +00:00
GuessTargetAndModeCompilationDatabase.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
InterpolatingCompilationDatabase.cpp Fix syntax error 2020-04-09 13:46:23 -07:00
JSONCompilationDatabase.cpp [Tooling] JSONCompilationDatabase::loadFromBuffer retains the buffer, copy it. 2020-12-04 21:54:55 +01:00
Refactoring.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
RefactoringCallbacks.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
StandaloneExecution.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Tooling.cpp test commit 2020-11-18 09:20:37 +01:00