clang 22.0.0git
JSONCompilationDatabase.cpp File Reference
#include "clang/Tooling/JSONCompilationDatabase.h"
#include "clang/Basic/LLVM.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "clang/Tooling/CompilationDatabasePluginRegistry.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/StringSaver.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Support/YAMLParser.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Host.h"
#include <cassert>
#include <memory>
#include <optional>
#include <string>
#include <system_error>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
namespace  clang::tooling

Functions

static CompilationDatabasePluginRegistry::Add< JSONCompilationDatabasePlugin > X ("json-compilation-database", "Reads JSON formatted compilation databases")
static llvm::StringRef stripExecutableExtension (llvm::StringRef Name)
static bool unwrapCommand (std::vector< std::string > &Args)
static std::vector< std::string > nodeToCommandLine (JSONCommandLineSyntax Syntax, const std::vector< llvm::yaml::ScalarNode * > &Nodes)

Function Documentation

◆ nodeToCommandLine()

std::vector< std::string > nodeToCommandLine ( JSONCommandLineSyntax Syntax,
const std::vector< llvm::yaml::ScalarNode * > & Nodes )
static

Definition at line 292 of file JSONCompilationDatabase.cpp.

References unwrapCommand().

◆ stripExecutableExtension()

llvm::StringRef stripExecutableExtension ( llvm::StringRef Name)
static

Definition at line 253 of file JSONCompilationDatabase.cpp.

Referenced by unwrapCommand().

◆ unwrapCommand()

bool unwrapCommand ( std::vector< std::string > & Args)
static

Definition at line 262 of file JSONCompilationDatabase.cpp.

References stripExecutableExtension().

Referenced by nodeToCommandLine().

◆ X()

CompilationDatabasePluginRegistry::Add< JSONCompilationDatabasePlugin > X ( "json-compilation-database" ,
"Reads JSON formatted compilation databases"  )
static