class InMemoryToolResults

Declaration

class InMemoryToolResults : public ToolResults { /* full declaration omitted */ };

Description

Stores the key-value results in memory. It maintains the lifetime of the result. Clang tools using this class are expected to generate a small set of different results, or a large set of duplicated results.

Declared at: clang/include/clang/Tooling/Execution.h:59

Inherits from: ToolResults

Member Variables

private llvm::BumpPtrAllocator Arena
private llvm::UniqueStringSaver Strings
private std::vector< std::pair<llvm::StringRef, llvm::StringRef>> KVResults

Method Overview

Inherited from ToolResults:

Methods

std::vector<
    std::pair<llvm::StringRef, llvm::StringRef>>
AllKVResults()

Declared at: clang/include/clang/Tooling/Execution.h:64

InMemoryToolResults()

Declared at: clang/include/clang/Tooling/Execution.h:61

void addResult(llvm::StringRef Key,
               llvm::StringRef Value)

Declared at: clang/include/clang/Tooling/Execution.h:62

Parameters

llvm::StringRef Key
llvm::StringRef Value

void forEachResult(
    llvm::function_ref<void(StringRef, StringRef)>
        Callback)

Declared at: clang/include/clang/Tooling/Execution.h:65

Parameters

llvm::function_ref<void(StringRef, StringRef)> Callback