/external/clang/unittests/Format/ |
D | CleanupTest.cpp | 24 const std::vector<tooling::Range> &Ranges, in cleanup() 26 tooling::Replacements Replaces = format::cleanup(Style, Code, Ranges); in cleanup() 46 std::vector<tooling::Range> Ranges; in TEST_F() 47 Ranges.push_back(tooling::Range(28, 0)); in TEST_F() 48 Ranges.push_back(tooling::Range(91, 6)); in TEST_F() 49 Ranges.push_back(tooling::Range(132, 0)); in TEST_F() 66 std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); in TEST_F() 79 std::vector<tooling::Range> Ranges(1, tooling::Range(14, 0)); in TEST_F() 93 std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); in TEST_F() 110 std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); in TEST_F() [all …]
|
/external/llvm-project/clang/include/clang/Tooling/ |
D | DiagnosticsYaml.h | 23 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::tooling::Diagnostic) 24 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::tooling::DiagnosticMessage) in LLVM_YAML_IS_SEQUENCE_VECTOR() 25 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::tooling::FileByteRange) in LLVM_YAML_IS_SEQUENCE_VECTOR() 30 template <> struct MappingTraits<clang::tooling::FileByteRange> { in LLVM_YAML_IS_SEQUENCE_VECTOR() 31 static void mapping(IO &Io, clang::tooling::FileByteRange &R) { in LLVM_YAML_IS_SEQUENCE_VECTOR() 38 template <> struct MappingTraits<clang::tooling::DiagnosticMessage> { in LLVM_YAML_IS_SEQUENCE_VECTOR() 39 static void mapping(IO &Io, clang::tooling::DiagnosticMessage &M) { in LLVM_YAML_IS_SEQUENCE_VECTOR() 43 std::vector<clang::tooling::Replacement> Fixes; in LLVM_YAML_IS_SEQUENCE_VECTOR() 60 template <> struct MappingTraits<clang::tooling::Diagnostic> { in LLVM_YAML_IS_SEQUENCE_VECTOR() 66 : DiagLevel(clang::tooling::Diagnostic::Level::Warning) {} in LLVM_YAML_IS_SEQUENCE_VECTOR() [all …]
|
D | ReplacementsYaml.h | 22 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::tooling::Replacement) in LLVM_YAML_IS_SEQUENCE_VECTOR() 29 template <> struct MappingTraits<clang::tooling::Replacement> { in LLVM_YAML_IS_SEQUENCE_VECTOR() 36 NormalizedReplacement(const IO &, const clang::tooling::Replacement &R) in LLVM_YAML_IS_SEQUENCE_VECTOR() 40 clang::tooling::Replacement denormalize(const IO &) { in LLVM_YAML_IS_SEQUENCE_VECTOR() 41 return clang::tooling::Replacement(FilePath, Offset, Length, in LLVM_YAML_IS_SEQUENCE_VECTOR() 51 static void mapping(IO &Io, clang::tooling::Replacement &R) { in LLVM_YAML_IS_SEQUENCE_VECTOR() 52 MappingNormalization<NormalizedReplacement, clang::tooling::Replacement> in LLVM_YAML_IS_SEQUENCE_VECTOR() 63 template <> struct MappingTraits<clang::tooling::TranslationUnitReplacements> { in LLVM_YAML_IS_SEQUENCE_VECTOR() 65 clang::tooling::TranslationUnitReplacements &Doc) { in LLVM_YAML_IS_SEQUENCE_VECTOR()
|
/external/llvm-project/clang/unittests/Format/ |
D | SortIncludesTest.cpp | 23 std::vector<tooling::Range> GetCodeRange(StringRef Code) { in GetCodeRange() 24 return std::vector<tooling::Range>(1, tooling::Range(0, Code.size())); in GetCodeRange() 27 std::string sort(StringRef Code, std::vector<tooling::Range> Ranges, in sort() 31 Ranges = tooling::calculateRangesAfterReplacements(Replaces, Ranges); in sort() 52 tooling::IncludeStyle &Style = FmtStyle.IncludeStyle; 69 {tooling::Range(25, 1)})); in TEST_F() 73 FmtStyle.IncludeStyle.IncludeBlocks = tooling::IncludeStyle::IBS_Regroup; in TEST_F() 172 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Merge; in TEST_F() 182 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Regroup; in TEST_F() 329 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Merge; in TEST_F() [all …]
|
D | CleanupTest.cpp | 16 using clang::tooling::ReplacementTest; 17 using clang::tooling::toReplacements; 26 const std::vector<tooling::Range> &Ranges, in cleanup() 28 tooling::Replacements Replaces = format::cleanup(Style, Code, Ranges); in cleanup() 39 std::vector<tooling::Range> Ranges; in cleanupAroundOffsets() 41 Ranges.push_back(tooling::Range(Offset, 0)); in cleanupAroundOffsets() 73 std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); in TEST_F() 97 std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); in TEST_F() 114 std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); in TEST_F() 133 std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); in TEST_F() [all …]
|
D | SortImportsTestJava.cpp | 12 std::vector<tooling::Range> GetCodeRange(StringRef Code) { in GetCodeRange() 13 return std::vector<tooling::Range>(1, tooling::Range(0, Code.size())); in GetCodeRange() 16 std::string sort(StringRef Code, std::vector<tooling::Range> Ranges) { in sort() 18 Ranges = tooling::calculateRangesAfterReplacements(Replaces, Ranges); in sort() 120 std::vector<tooling::Range> Ranges = {tooling::Range(27, 15)}; in TEST_F() 135 std::vector<tooling::Range> Ranges = {tooling::Range(27, 20)}; in TEST_F()
|
D | UsingDeclarationsSorterTest.cpp | 23 const std::vector<tooling::Range> &Ranges, in sortUsingDeclarations() 27 tooling::Replacements Replaces = in sortUsingDeclarations() 38 /*Ranges=*/{1, tooling::Range(0, Code.size())}, in sortUsingDeclarations() 316 {tooling::Range(10, 15)})); in TEST_F() 325 {tooling::Range(10, 15)})); in TEST_F() 343 {tooling::Range(19, 1)})); in TEST_F()
|
/external/llvm-project/clang-tools-extra/clangd/ |
D | Format.cpp | 90 tooling::Replacement replacement(llvm::StringRef Code, llvm::StringRef From, in replacement() 94 return tooling::Replacement(Filename, From.data() - Code.data(), in replacement() 110 tooling::Replacements Changes; 113 std::vector<tooling::Range> FormatRanges; 178 tooling::Range(Trailing.data() - Code.data() + 1, 1)); in getIncrementalChangesAfterNewline() 183 tooling::Range(Leading.data() - Code.data(), Leading.size())); in getIncrementalChangesAfterNewline() 207 std::vector<tooling::Replacement> 208 split(const tooling::Replacements &Replacements, unsigned OldCursor, in split() 210 std::vector<tooling::Replacement> Result; in split() 212 for (const tooling::Replacement &R : Replacements) { in split() [all …]
|
D | GlobalCompilationDatabase.h | 40 virtual llvm::Optional<tooling::CompileCommand> 51 virtual tooling::CompileCommand getFallbackCommand(PathRef File) const; 76 llvm::Optional<tooling::CompileCommand> 104 std::shared_ptr<const tooling::CompilationDatabase> CDB; 129 tooling::ArgumentsAdjuster Adjuster = nullptr); 131 llvm::Optional<tooling::CompileCommand> 133 tooling::CompileCommand getFallbackCommand(PathRef File) const override; 141 llvm::Optional<tooling::CompileCommand> CompilationCommand); 145 llvm::StringMap<tooling::CompileCommand> Commands; /* GUARDED_BY(Mut) */ 147 tooling::ArgumentsAdjuster ArgsAdjuster;
|
D | GlobalCompilationDatabase.cpp | 46 tooling::CompileCommand 56 tooling::CompileCommand Cmd(llvm::sys::path::parent_path(File), in getFallbackCommand() 94 std::shared_ptr<tooling::CompilationDatabase> CDB; 108 std::shared_ptr<const tooling::CompilationDatabase> 148 CDB = tooling::CompilationDatabase::loadFromDirectory(Path, Error); in load() 157 CDB = tooling::CompilationDatabase::loadFromDirectory(BuildDir, Error); in load() 178 llvm::Optional<tooling::CompileCommand> 244 std::shared_ptr<const tooling::CompilationDatabase> CDB = nullptr; in lookupCDB() 349 tooling::ArgumentsAdjuster Adjuster) in OverlayCDB() 358 llvm::Optional<tooling::CompileCommand> [all …]
|
/external/llvm-project/clang/unittests/Rename/ |
D | ClangRenameTest.h | 55 tooling::FileContentMappings FileContents = {{HeaderName, HeaderContent}, in runClangRenameOnCode() 61 tooling::USRFindingAction FindingAction({}, {std::string(OldName)}, false); in runClangRenameOnCode() 62 std::unique_ptr<tooling::FrontendActionFactory> USRFindingActionFactory = in runClangRenameOnCode() 63 tooling::newFrontendActionFactory(&FindingAction); in runClangRenameOnCode() 65 if (!tooling::runToolOnCodeWithArgs( in runClangRenameOnCode() 74 std::map<std::string, tooling::Replacements> FileToReplacements; in runClangRenameOnCode() 75 tooling::QualifiedRenamingAction RenameAction(NewNames, USRList, in runClangRenameOnCode() 77 auto RenameActionFactory = tooling::newFrontendActionFactory(&RenameAction); in runClangRenameOnCode() 78 if (!tooling::runToolOnCodeWithArgs( in runClangRenameOnCode() 96 tooling::Replacements Replaces = format::reformat( in format() [all …]
|
/external/clang/include/clang/Tooling/ |
D | ReplacementsYaml.h | 24 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::tooling::Replacement) in LLVM_YAML_IS_SEQUENCE_VECTOR() 31 template <> struct MappingTraits<clang::tooling::Replacement> { in LLVM_YAML_IS_SEQUENCE_VECTOR() 38 NormalizedReplacement(const IO &, const clang::tooling::Replacement &R) in LLVM_YAML_IS_SEQUENCE_VECTOR() 42 clang::tooling::Replacement denormalize(const IO &) { in LLVM_YAML_IS_SEQUENCE_VECTOR() 43 return clang::tooling::Replacement(FilePath, Offset, Length, in LLVM_YAML_IS_SEQUENCE_VECTOR() 53 static void mapping(IO &Io, clang::tooling::Replacement &R) { in LLVM_YAML_IS_SEQUENCE_VECTOR() 54 MappingNormalization<NormalizedReplacement, clang::tooling::Replacement> in LLVM_YAML_IS_SEQUENCE_VECTOR() 65 template <> struct MappingTraits<clang::tooling::TranslationUnitReplacements> { in LLVM_YAML_IS_SEQUENCE_VECTOR() 67 clang::tooling::TranslationUnitReplacements &Doc) { in LLVM_YAML_IS_SEQUENCE_VECTOR()
|
/external/llvm-project/clang-tools-extra/clang-apply-replacements/lib/Tooling/ |
D | ApplyReplacements.cpp | 69 tooling::TranslationUnitReplacements TU; in collectReplacementsFromDirectory() 113 tooling::TranslationUnitDiagnostics TU; in collectReplacementsFromDirectory() 139 static llvm::DenseMap<const FileEntry *, std::vector<tooling::Replacement>> 143 llvm::DenseMap<const FileEntry *, std::vector<tooling::Replacement>> in groupReplacements() 150 std::map<tooling::Replacement, in groupReplacements() 151 const tooling::TranslationUnitDiagnostics *>> in groupReplacements() 154 auto AddToGroup = [&](const tooling::Replacement &R, in groupReplacements() 155 const tooling::TranslationUnitDiagnostics *SourceTU) { in groupReplacements() 176 for (const tooling::Replacement &R : TU.Replacements) in groupReplacements() 181 if (const auto *ChoosenFix = tooling::selectFirstFix(D)) { in groupReplacements() [all …]
|
/external/llvm-project/clang/unittests/Tooling/ |
D | ReplacementTest.h | 21 namespace tooling { 26 inline tooling::Replacements 27 toReplacements(const std::set<tooling::Replacement> &Replaces) { in toReplacements() 28 tooling::Replacements Result; in toReplacements() 34 return tooling::Replacements(); in toReplacements() 43 tooling::Replacement createReplacement(SourceLocation Start, unsigned Length, in createReplacement() 45 return tooling::Replacement(Context.Sources, Start, Length, in createReplacement()
|
/external/llvm-project/clang/include/clang/Tooling/Inclusions/ |
D | IncludeStyle.h | 17 namespace tooling { 156 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::tooling::IncludeStyle::IncludeCategory) in LLVM_YAML_IS_SEQUENCE_VECTOR() 162 struct MappingTraits<clang::tooling::IncludeStyle::IncludeCategory> { in LLVM_YAML_IS_SEQUENCE_VECTOR() 164 clang::tooling::IncludeStyle::IncludeCategory &Category); in LLVM_YAML_IS_SEQUENCE_VECTOR() 169 clang::tooling::IncludeStyle::IncludeBlocksStyle> { in LLVM_YAML_IS_SEQUENCE_VECTOR() 171 enumeration(IO &IO, clang::tooling::IncludeStyle::IncludeBlocksStyle &Value); in LLVM_YAML_IS_SEQUENCE_VECTOR()
|
D | HeaderIncludes.h | 20 namespace tooling { 72 llvm::Optional<tooling::Replacement> insert(llvm::StringRef Header, 79 tooling::Replacements remove(llvm::StringRef Header, bool IsAngled) const; 83 Include(StringRef Name, tooling::Range R) : Name(Name), R(R) {} in Include() 89 tooling::Range R;
|
/external/llvm-project/clang/lib/Tooling/Transformer/ |
D | SourceCodeBuilders.cpp | 18 using namespace tooling; 20 const Expr *tooling::reallyIgnoreImplicit(const Expr &E) { in reallyIgnoreImplicit() 30 bool tooling::mayEverNeedParens(const Expr &E) { in mayEverNeedParens() 50 bool tooling::needParensAfterUnaryOperator(const Expr &E) { in needParensAfterUnaryOperator() 63 llvm::Optional<std::string> tooling::buildParens(const Expr &E, in buildParens() 74 tooling::buildDereference(const Expr &E, const ASTContext &Context) { in buildDereference() 94 llvm::Optional<std::string> tooling::buildAddressOf(const Expr &E, in buildAddressOf() 115 llvm::Optional<std::string> tooling::buildDot(const Expr &E, in buildDot() 139 llvm::Optional<std::string> tooling::buildArrow(const Expr &E, in buildArrow()
|
/external/llvm-project/clang-tools-extra/clang-apply-replacements/include/clang-apply-replacements/Tooling/ |
D | ApplyReplacements.h | 35 typedef std::vector<clang::tooling::TranslationUnitReplacements> TUReplacements; 41 typedef std::vector<clang::tooling::TranslationUnitDiagnostics> TUDiagnostics; 45 std::vector<tooling::AtomicChange>> 103 applyChanges(StringRef File, const std::vector<tooling::AtomicChange> &Changes, 104 const tooling::ApplyChangesSpec &Spec,
|
/external/llvm-project/clang-tools-extra/clang-tidy/readability/ |
D | ElseAfterReturnCheck.cpp | 128 Diag << tooling::fixit::createRemoval(ElseLoc); in removeElseAndBrackets() 138 Diag << tooling::fixit::createReplacement(CS->getSourceRange(), Repl); in removeElseAndBrackets() 147 Diag << tooling::fixit::createReplacement( in removeElseAndBrackets() 273 Diag << tooling::fixit::createReplacement( in check() 275 (tooling::fixit::getText(*If->getInit(), *Result.Context) + in check() 278 << tooling::fixit::createRemoval(If->getInit()->getSourceRange()); in check() 283 (tooling::fixit::getText(*VDeclStmt, *Result.Context) + in check() 285 tooling::fixit::getText(If->getIfLoc(), *Result.Context)) in check() 287 Diag << tooling::fixit::createReplacement(SourceRange(If->getIfLoc()), in check() 289 << tooling::fixit::createReplacement(VDeclStmt->getSourceRange(), in check() [all …]
|
/external/llvm-project/clang/unittests/StaticAnalyzer/ |
D | CallDescriptionTest.cpp | 102 EXPECT_TRUE(tooling::runToolOnCode( in TEST() 109 EXPECT_TRUE(tooling::runToolOnCode( in TEST() 116 EXPECT_TRUE(tooling::runToolOnCode( in TEST() 123 EXPECT_TRUE(tooling::runToolOnCode( in TEST() 140 EXPECT_TRUE(tooling::runToolOnCode( in TEST() 148 EXPECT_TRUE(tooling::runToolOnCode( in TEST()
|
/external/llvm-project/clang/lib/Format/ |
D | Format.cpp | 923 LLVMStyle.IncludeStyle.IncludeBlocks = tooling::IncludeStyle::IBS_Preserve; in getLLVMStyle() 1024 GoogleStyle.IncludeStyle.IncludeBlocks = tooling::IncludeStyle::IBS_Regroup; in getGoogleStyle() 1128 tooling::IncludeStyle::IBS_Preserve; in getGoogleStyle() 1161 tooling::IncludeStyle::IBS_Preserve; in getChromiumStyle() 1437 std::pair<tooling::Replacements, unsigned> 1442 tooling::Replacements Result; in analyze() 1451 tooling::Replacements &Result) { in requoteJSStringLiteral() 1473 auto Err = Result.add(tooling::Replacement( in requoteJSStringLiteral() 1525 std::pair<tooling::Replacements, unsigned> 1529 tooling::Replacements Result; in analyze() [all …]
|
D | TokenAnalyzer.cpp | 37 ArrayRef<tooling::Range> Ranges, in Environment() 44 for (const tooling::Range &Range : Ranges) { in Environment() 65 std::pair<tooling::Replacements, unsigned> TokenAnalyzer::process() { in process() 66 tooling::Replacements Result; in process() 90 std::pair<tooling::Replacements, unsigned> RunResult = in process() 95 for (tooling::Replacements::const_iterator I = RunResult.first.begin(), in process() 112 return {tooling::Replacements(), 0}; in process()
|
/external/llvm-project/clang/tools/clang-refactor/ |
D | TestSupport.cpp | 69 void dumpChanges(const tooling::AtomicChanges &Changes, raw_ostream &OS) { in dumpChanges() 71 OS << const_cast<tooling::AtomicChange &>(Change).toYAMLString() << "\n"; in dumpChanges() 74 bool areChangesSame(const tooling::AtomicChanges &LHS, in areChangesSame() 75 const tooling::AtomicChanges &RHS) { in areChangesSame() 85 bool printRewrittenSources(const tooling::AtomicChanges &Changes, in printRewrittenSources() 90 tooling::ApplyChangesSpec Spec; in printRewrittenSources() 99 auto Result = tooling::applyAtomicChanges(File, (*BufferErr)->getBuffer(), in printRewrittenSources() 131 void handle(tooling::AtomicChanges Changes) override { in handle() 135 void handle(tooling::SymbolOccurrences Occurrences) override { in handle() 136 tooling::RefactoringResultConsumer::handle(std::move(Occurrences)); in handle() [all …]
|
/external/clang/include/clang/Format/ |
D | Format.h | 767 tooling::Replacements sortIncludes(const FormatStyle &Style, StringRef Code, 768 ArrayRef<tooling::Range> Ranges, 775 llvm::Expected<tooling::Replacements> 776 formatReplacements(StringRef Code, const tooling::Replacements &Replaces, 784 llvm::Expected<tooling::Replacements> 785 cleanupAroundReplacements(StringRef Code, const tooling::Replacements &Replaces, 800 tooling::Replacements reformat(const FormatStyle &Style, 808 tooling::Replacements reformat(const FormatStyle &Style, StringRef Code, 809 ArrayRef<tooling::Range> Ranges, 817 tooling::Replacements cleanup(const FormatStyle &Style, [all …]
|
/external/llvm-project/clang/unittests/Index/ |
D | IndexTests.cpp | 158 tooling::runToolOnCode(std::make_unique<IndexAction>(Index), in TEST() 168 tooling::runToolOnCode(std::make_unique<IndexAction>(Index, Opts), Code); in TEST() 173 tooling::runToolOnCode(std::make_unique<IndexAction>(Index, Opts), Code); in TEST() 183 tooling::runToolOnCode(std::make_unique<IndexAction>(Index, Opts), Code); in TEST() 188 tooling::runToolOnCode(std::make_unique<IndexAction>(Index, Opts), Code); in TEST() 205 tooling::runToolOnCode(std::make_unique<IndexAction>(Index, Opts), Code); in TEST() 226 tooling::runToolOnCode(std::make_unique<IndexAction>(Index, Opts), Code); in TEST() 242 tooling::runToolOnCode(std::make_unique<IndexAction>(Index, Opts), Code); in TEST() 250 tooling::runToolOnCode(std::make_unique<IndexAction>(Index, Opts), Code); in TEST() 270 tooling::runToolOnCode(std::make_unique<IndexAction>(Index, Opts), Code); in TEST() [all …]
|