clang API Documentation

Namespaces | Defines | Functions
Tooling.cpp File Reference
#include "clang/Tooling/Tooling.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Tool.h"
#include "clang/Frontend/ASTUnit.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
#include "clang/Tooling/ArgumentsAdjusters.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/raw_ostream.h"
#include <unistd.h>
Include dependency graph for Tooling.cpp:

Go to the source code of this file.

Namespaces

namespace  clang
namespace  clang::tooling

Defines

#define DEBUG_TYPE   "clang-tooling"

Functions

static clang::driver::Driverclang::tooling::newDriver (clang::DiagnosticsEngine *Diagnostics, const char *BinaryName)
 Builds a clang driver initialized for running clang tools.
static const
llvm::opt::ArgStringList * 
clang::tooling::getCC1Arguments (clang::DiagnosticsEngine *Diagnostics, clang::driver::Compilation *Compilation)
 Retrieves the clang CC1 specific flags out of the compilation's jobs.
static clang::CompilerInvocationclang::tooling::newInvocation (clang::DiagnosticsEngine *Diagnostics, const llvm::opt::ArgStringList &CC1Args)
 Returns a clang build invocation initialized from the CC1 flags.
bool clang::tooling::runToolOnCode (clang::FrontendAction *ToolAction, const Twine &Code, const Twine &FileName="input.cc")
 Runs (and deletes) the tool on 'Code' with the -fsyntax-only flag.
static std::vector< std::string > clang::tooling::getSyntaxOnlyToolArgs (const std::vector< std::string > &ExtraArgs, StringRef FileName)
bool clang::tooling::runToolOnCodeWithArgs (clang::FrontendAction *ToolAction, const Twine &Code, const std::vector< std::string > &Args, const Twine &FileName="input.cc")
 Runs (and deletes) the tool on 'Code' with the -fsyntax-only flag and with additional other flags.
std::string clang::tooling::getAbsolutePath (StringRef File)
 Returns the absolute path of File, by prepending it with the current directory if File is not absolute.
std::unique_ptr< ASTUnit > clang::tooling::buildASTFromCode (const Twine &Code, const Twine &FileName="input.cc")
 Builds an AST for 'Code'.
std::unique_ptr< ASTUnit > clang::tooling::buildASTFromCodeWithArgs (const Twine &Code, const std::vector< std::string > &Args, const Twine &FileName="input.cc")
 Builds an AST for 'Code' with additional flags.

Define Documentation

#define DEBUG_TYPE   "clang-tooling"

Definition at line 41 of file Tooling.cpp.


Variable Documentation

FrontendAction* Action [static]
std::vector<std::unique_ptr<ASTUnit> >& ASTs [static]