llvm-project/clang/lib/Tooling
Dmitry Polukhin fceaf86211 [clang] Fix UB when string.front() is used for the empty string
Compilation database might have empty string as a command line argument.
But ExpandResponseFilesDatabase::expand doesn't expect this and assumes
that string.front() can be used for any argument. It is undefined behaviour if
string is empty. With debug build mode it causes crash in clangd.

Test Plan: check-clang

Differential Revision: https://reviews.llvm.org/D105120
2021-06-30 01:07:47 -07:00
..
ASTDiff [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
Core [libtooling][clang-tidy] Fix diagnostics not highlighting fed SourceRanges 2021-04-10 16:43:44 +02:00
DependencyScanning [clang][deps] NFC: Stop using moved-from object 2021-06-14 15:16:08 +02:00
DumpTool Support: Stop using F_{None,Text,Append} compatibility synonyms, NFC 2021-04-30 11:00:03 -07:00
Inclusions [clang] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
Refactoring [clang-rename] Handle designated initializers. 2021-04-12 13:15:14 -07:00
Syntax [clang][Syntax] Handle invalid source range in expandedTokens. 2021-04-07 11:19:01 +02:00
Transformer [libTooling] Change `access` stencil to recognize use of `operator*`. 2021-06-16 20:34:00 +00:00
AllTUsExecution.cpp ADT: Allow IntrusiveRefCntPtr construction from std::unique_ptr, NFC 2020-12-08 17:33:19 -08:00
ArgumentsAdjusters.cpp [clang][deps] Move stripping of diagnostic serialization from `clang-scan-deps` to `DependencyScanning` library 2021-06-14 12:23:32 +02:00
CMakeLists.txt Enable AST introspection on non-X86 2021-04-23 21:56:36 +01:00
CommonOptionsParser.cpp [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
CompilationDatabase.cpp [CompilationDatabase] Pass Twine by const reference instead of by value. NFCI. 2021-01-07 12:53:28 +00:00
EmptyNodeIntrospection.inc.in [AST] Add DeclarationNameInfo to node introspection 2021-04-25 12:12:03 +01:00
Execution.cpp [NFC] Refactor Registry loops to range for 2020-06-19 00:40:10 +01:00
ExpandResponseFilesCompilationDatabase.cpp [clang] Fix UB when string.front() is used for the empty string 2021-06-30 01:07:47 -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
GuessTargetAndModeCompilationDatabase.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
InterpolatingCompilationDatabase.cpp [clang] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
JSONCompilationDatabase.cpp [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
NodeIntrospection.cpp [AST] Sort introspection results without instantiating other data 2021-04-23 16:21:01 +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 [clang][tooling] Create SourceManager for DiagnosticsEngine before command-line parsing 2021-04-06 10:40:47 +02:00