blob: ca187b16844862ad201075b32dc063283e526cbd [file] [log] [blame]
Manuel Klimekcb971c62012-04-04 12:07:46 +00001//===--- Tooling.h - Framework for standalone Clang tools -------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file implements functions to run clang tools standalone instead
11// of running them as a plugin.
12//
13// A ClangTool is initialized with a CompilationDatabase and a set of files
14// to run over. The tool will then run a user-specified FrontendAction over
15// all TUs in which the given files are compiled.
16//
17// It is also possible to run a FrontendAction over a snippet of code by
Manuel Klimek29541342012-04-23 08:43:08 +000018// calling runToolOnCode, which is useful for unit testing.
Manuel Klimekcb971c62012-04-04 12:07:46 +000019//
20// Applications that need more fine grained control over how to run
21// multiple FrontendActions over code can use ToolInvocation.
22//
23// Example tools:
24// - running clang -fsyntax-only over source code from an editor to get
25// fast syntax checks
26// - running match/replace tools over C++ code
27//
28//===----------------------------------------------------------------------===//
29
30#ifndef LLVM_CLANG_TOOLING_TOOLING_H
31#define LLVM_CLANG_TOOLING_TOOLING_H
32
Stephen Hines176edba2014-12-01 14:53:08 -080033#include "clang/AST/ASTConsumer.h"
Manuel Klimekfa8e7d32013-11-07 23:18:05 +000034#include "clang/Basic/Diagnostic.h"
Manuel Klimekcb971c62012-04-04 12:07:46 +000035#include "clang/Basic/FileManager.h"
36#include "clang/Basic/LLVM.h"
37#include "clang/Driver/Util.h"
Manuel Klimeke6df0ce2012-07-05 18:13:01 +000038#include "clang/Frontend/FrontendAction.h"
Simon Atanasyana01ddc72012-05-09 16:18:30 +000039#include "clang/Tooling/ArgumentsAdjusters.h"
Manuel Klimek00f3c4f2012-05-07 09:17:48 +000040#include "clang/Tooling/CompilationDatabase.h"
Chandler Carruth30a2e162012-12-04 09:18:49 +000041#include "llvm/ADT/StringMap.h"
42#include "llvm/ADT/Twine.h"
Pirama Arumuga Nainar33337ca2015-05-06 11:48:57 -070043#include "llvm/Option/Option.h"
Stephen Hines6bcf27b2014-05-29 04:14:42 -070044#include <memory>
Manuel Klimekcb971c62012-04-04 12:07:46 +000045#include <string>
46#include <vector>
47
48namespace clang {
49
50namespace driver {
51class Compilation;
52} // end namespace driver
53
54class CompilerInvocation;
55class SourceManager;
56class FrontendAction;
57
58namespace tooling {
59
Peter Collingbourne8051db12013-11-06 20:12:45 +000060/// \brief Interface to process a clang::CompilerInvocation.
61///
62/// If your tool is based on FrontendAction, you should be deriving from
63/// FrontendActionFactory instead.
64class ToolAction {
65public:
66 virtual ~ToolAction();
67
68 /// \brief Perform an action for an invocation.
69 virtual bool runInvocation(clang::CompilerInvocation *Invocation,
Manuel Klimekfa8e7d32013-11-07 23:18:05 +000070 FileManager *Files,
71 DiagnosticConsumer *DiagConsumer) = 0;
Peter Collingbourne8051db12013-11-06 20:12:45 +000072};
73
Manuel Klimekcb971c62012-04-04 12:07:46 +000074/// \brief Interface to generate clang::FrontendActions.
Stefanus Du Toit233fbe12013-08-15 00:35:46 +000075///
76/// Having a factory interface allows, for example, a new FrontendAction to be
Peter Collingbourne8051db12013-11-06 20:12:45 +000077/// created for each translation unit processed by ClangTool. This class is
78/// also a ToolAction which uses the FrontendActions created by create() to
79/// process each translation unit.
80class FrontendActionFactory : public ToolAction {
Manuel Klimekcb971c62012-04-04 12:07:46 +000081public:
Pirama Arumuga Nainar33337ca2015-05-06 11:48:57 -070082 ~FrontendActionFactory() override;
Manuel Klimekcb971c62012-04-04 12:07:46 +000083
Peter Collingbourne8051db12013-11-06 20:12:45 +000084 /// \brief Invokes the compiler with a FrontendAction created by create().
Manuel Klimekfa8e7d32013-11-07 23:18:05 +000085 bool runInvocation(clang::CompilerInvocation *Invocation, FileManager *Files,
Stephen Hines651f13c2014-04-23 16:59:28 -070086 DiagnosticConsumer *DiagConsumer) override;
Peter Collingbourne8051db12013-11-06 20:12:45 +000087
Manuel Klimekcb971c62012-04-04 12:07:46 +000088 /// \brief Returns a new clang::FrontendAction.
89 ///
90 /// The caller takes ownership of the returned action.
91 virtual clang::FrontendAction *create() = 0;
92};
93
94/// \brief Returns a new FrontendActionFactory for a given type.
95///
Stefanus Du Toit233fbe12013-08-15 00:35:46 +000096/// T must derive from clang::FrontendAction.
Manuel Klimekcb971c62012-04-04 12:07:46 +000097///
98/// Example:
99/// FrontendActionFactory *Factory =
100/// newFrontendActionFactory<clang::SyntaxOnlyAction>();
101template <typename T>
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700102std::unique_ptr<FrontendActionFactory> newFrontendActionFactory();
Manuel Klimekcb971c62012-04-04 12:07:46 +0000103
Edwin Vane3c16e692013-05-29 16:01:10 +0000104/// \brief Callbacks called before and after each source file processed by a
105/// FrontendAction created by the FrontedActionFactory returned by \c
106/// newFrontendActionFactory.
107class SourceFileCallbacks {
Manuel Klimek9fb6b272012-10-25 08:49:11 +0000108public:
Edwin Vane3c16e692013-05-29 16:01:10 +0000109 virtual ~SourceFileCallbacks() {}
110
111 /// \brief Called before a source file is processed by a FrontEndAction.
112 /// \see clang::FrontendAction::BeginSourceFileAction
Edwin Vane5ec95802013-05-30 13:59:44 +0000113 virtual bool handleBeginSource(CompilerInstance &CI, StringRef Filename) {
Edwin Vane3c16e692013-05-29 16:01:10 +0000114 return true;
115 }
116
117 /// \brief Called after a source file is processed by a FrontendAction.
118 /// \see clang::FrontendAction::EndSourceFileAction
Edwin Vane5ec95802013-05-30 13:59:44 +0000119 virtual void handleEndSource() {}
Manuel Klimek9fb6b272012-10-25 08:49:11 +0000120};
121
Manuel Klimekcb971c62012-04-04 12:07:46 +0000122/// \brief Returns a new FrontendActionFactory for any type that provides an
Manuel Klimeke6df0ce2012-07-05 18:13:01 +0000123/// implementation of newASTConsumer().
Manuel Klimekcb971c62012-04-04 12:07:46 +0000124///
Manuel Klimeke6df0ce2012-07-05 18:13:01 +0000125/// FactoryT must implement: ASTConsumer *newASTConsumer().
Manuel Klimekcb971c62012-04-04 12:07:46 +0000126///
127/// Example:
Manuel Klimeke6df0ce2012-07-05 18:13:01 +0000128/// struct ProvidesASTConsumers {
129/// clang::ASTConsumer *newASTConsumer();
Manuel Klimekcb971c62012-04-04 12:07:46 +0000130/// } Factory;
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700131/// std::unique_ptr<FrontendActionFactory> FactoryAdapter(
132/// newFrontendActionFactory(&Factory));
Manuel Klimekcb971c62012-04-04 12:07:46 +0000133template <typename FactoryT>
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700134inline std::unique_ptr<FrontendActionFactory> newFrontendActionFactory(
135 FactoryT *ConsumerFactory, SourceFileCallbacks *Callbacks = nullptr);
Manuel Klimekcb971c62012-04-04 12:07:46 +0000136
137/// \brief Runs (and deletes) the tool on 'Code' with the -fsyntax-only flag.
138///
139/// \param ToolAction The action to run over the code.
140/// \param Code C++ code.
141/// \param FileName The file name which 'Code' will be mapped as.
142///
143/// \return - True if 'ToolAction' was successfully executed.
144bool runToolOnCode(clang::FrontendAction *ToolAction, const Twine &Code,
145 const Twine &FileName = "input.cc");
146
Stephen Hines0e2c34f2015-03-23 12:09:02 -0700147/// The first part of the pair is the filename, the second part the
148/// file-content.
149typedef std::vector<std::pair<std::string, std::string>> FileContentMappings;
150
Nico Weber56669882012-08-30 02:02:19 +0000151/// \brief Runs (and deletes) the tool on 'Code' with the -fsyntax-only flag and
152/// with additional other flags.
153///
154/// \param ToolAction The action to run over the code.
155/// \param Code C++ code.
156/// \param Args Additional flags to pass on.
157/// \param FileName The file name which 'Code' will be mapped as.
158///
159/// \return - True if 'ToolAction' was successfully executed.
Stephen Hines0e2c34f2015-03-23 12:09:02 -0700160bool runToolOnCodeWithArgs(
161 clang::FrontendAction *ToolAction, const Twine &Code,
162 const std::vector<std::string> &Args, const Twine &FileName = "input.cc",
163 const FileContentMappings &VirtualMappedFiles = FileContentMappings());
Nico Weber56669882012-08-30 02:02:19 +0000164
Peter Collingbourne8051db12013-11-06 20:12:45 +0000165/// \brief Builds an AST for 'Code'.
166///
167/// \param Code C++ code.
168/// \param FileName The file name which 'Code' will be mapped as.
169///
170/// \return The resulting AST or null if an error occurred.
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700171std::unique_ptr<ASTUnit> buildASTFromCode(const Twine &Code,
172 const Twine &FileName = "input.cc");
Peter Collingbourne8051db12013-11-06 20:12:45 +0000173
174/// \brief Builds an AST for 'Code' with additional flags.
175///
176/// \param Code C++ code.
177/// \param Args Additional flags to pass on.
178/// \param FileName The file name which 'Code' will be mapped as.
179///
180/// \return The resulting AST or null if an error occurred.
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700181std::unique_ptr<ASTUnit>
182buildASTFromCodeWithArgs(const Twine &Code,
183 const std::vector<std::string> &Args,
184 const Twine &FileName = "input.cc");
Peter Collingbourne8051db12013-11-06 20:12:45 +0000185
Manuel Klimekcb971c62012-04-04 12:07:46 +0000186/// \brief Utility to run a FrontendAction in a single clang invocation.
187class ToolInvocation {
188 public:
189 /// \brief Create a tool invocation.
190 ///
Alexander Kornienko30c009b2012-06-04 19:02:59 +0000191 /// \param CommandLine The command line arguments to clang. Note that clang
192 /// uses its binary name (CommandLine[0]) to locate its builtin headers.
193 /// Callers have to ensure that they are installed in a compatible location
194 /// (see clang driver implementation) or mapped in via mapVirtualFile.
NAKAMURA Takumif907afe2013-11-06 22:37:12 +0000195 /// \param FAction The action to be executed. Class takes ownership.
Manuel Klimekcb971c62012-04-04 12:07:46 +0000196 /// \param Files The FileManager used for the execution. Class does not take
197 /// ownership.
Stephen Hines651f13c2014-04-23 16:59:28 -0700198 ToolInvocation(std::vector<std::string> CommandLine, FrontendAction *FAction,
Manuel Klimekcb971c62012-04-04 12:07:46 +0000199 FileManager *Files);
200
Peter Collingbourne8051db12013-11-06 20:12:45 +0000201 /// \brief Create a tool invocation.
202 ///
203 /// \param CommandLine The command line arguments to clang.
204 /// \param Action The action to be executed.
205 /// \param Files The FileManager used for the execution.
Stephen Hines651f13c2014-04-23 16:59:28 -0700206 ToolInvocation(std::vector<std::string> CommandLine, ToolAction *Action,
Peter Collingbourne8051db12013-11-06 20:12:45 +0000207 FileManager *Files);
208
209 ~ToolInvocation();
210
Manuel Klimekfa8e7d32013-11-07 23:18:05 +0000211 /// \brief Set a \c DiagnosticConsumer to use during parsing.
Stephen Hines176edba2014-12-01 14:53:08 -0800212 void setDiagnosticConsumer(DiagnosticConsumer *DiagConsumer) {
213 this->DiagConsumer = DiagConsumer;
214 }
Manuel Klimekfa8e7d32013-11-07 23:18:05 +0000215
Manuel Klimekcb971c62012-04-04 12:07:46 +0000216 /// \brief Map a virtual file to be used while running the tool.
217 ///
218 /// \param FilePath The path at which the content will be mapped.
219 /// \param Content A null terminated buffer of the file's content.
220 void mapVirtualFile(StringRef FilePath, StringRef Content);
221
222 /// \brief Run the clang invocation.
223 ///
224 /// \returns True if there were no errors during execution.
225 bool run();
226
227 private:
228 void addFileMappingsTo(SourceManager &SourceManager);
229
230 bool runInvocation(const char *BinaryName,
231 clang::driver::Compilation *Compilation,
Sean Silvad47afb92013-01-20 01:58:28 +0000232 clang::CompilerInvocation *Invocation);
Manuel Klimekcb971c62012-04-04 12:07:46 +0000233
234 std::vector<std::string> CommandLine;
Peter Collingbourne8051db12013-11-06 20:12:45 +0000235 ToolAction *Action;
236 bool OwnsAction;
Manuel Klimekcb971c62012-04-04 12:07:46 +0000237 FileManager *Files;
238 // Maps <file name> -> <file content>.
239 llvm::StringMap<StringRef> MappedFileContents;
Manuel Klimekfa8e7d32013-11-07 23:18:05 +0000240 DiagnosticConsumer *DiagConsumer;
Manuel Klimekcb971c62012-04-04 12:07:46 +0000241};
242
243/// \brief Utility to run a FrontendAction over a set of files.
244///
245/// This class is written to be usable for command line utilities.
Simon Atanasyana01ddc72012-05-09 16:18:30 +0000246/// By default the class uses ClangSyntaxOnlyAdjuster to modify
247/// command line arguments before the arguments are used to run
Manuel Klimek48b3f0f2013-06-04 14:44:44 +0000248/// a frontend action. One could install an additional command line
249/// arguments adjuster by calling the appendArgumentsAdjuster() method.
Manuel Klimekcb971c62012-04-04 12:07:46 +0000250class ClangTool {
251 public:
252 /// \brief Constructs a clang tool to run over a list of files.
253 ///
254 /// \param Compilations The CompilationDatabase which contains the compile
255 /// command lines for the given source paths.
256 /// \param SourcePaths The source files to run over. If a source files is
257 /// not found in Compilations, it is skipped.
258 ClangTool(const CompilationDatabase &Compilations,
259 ArrayRef<std::string> SourcePaths);
260
Stephen Hines176edba2014-12-01 14:53:08 -0800261 ~ClangTool();
Edwin Vaned088a5f2013-01-11 17:04:55 +0000262
Manuel Klimekfa8e7d32013-11-07 23:18:05 +0000263 /// \brief Set a \c DiagnosticConsumer to use during parsing.
Stephen Hines176edba2014-12-01 14:53:08 -0800264 void setDiagnosticConsumer(DiagnosticConsumer *DiagConsumer) {
265 this->DiagConsumer = DiagConsumer;
266 }
Manuel Klimekfa8e7d32013-11-07 23:18:05 +0000267
Manuel Klimekcb971c62012-04-04 12:07:46 +0000268 /// \brief Map a virtual file to be used while running the tool.
269 ///
270 /// \param FilePath The path at which the content will be mapped.
271 /// \param Content A null terminated buffer of the file's content.
272 void mapVirtualFile(StringRef FilePath, StringRef Content);
273
Manuel Klimek48b3f0f2013-06-04 14:44:44 +0000274 /// \brief Append a command line arguments adjuster to the adjuster chain.
275 ///
276 /// \param Adjuster An argument adjuster, which will be run on the output of
277 /// previous argument adjusters.
Stephen Hines0e2c34f2015-03-23 12:09:02 -0700278 void appendArgumentsAdjuster(ArgumentsAdjuster Adjuster);
Manuel Klimek48b3f0f2013-06-04 14:44:44 +0000279
280 /// \brief Clear the command line arguments adjuster chain.
281 void clearArgumentsAdjusters();
282
Peter Collingbourne8051db12013-11-06 20:12:45 +0000283 /// Runs an action over all files specified in the command line.
Manuel Klimekcb971c62012-04-04 12:07:46 +0000284 ///
Peter Collingbourne8051db12013-11-06 20:12:45 +0000285 /// \param Action Tool action.
286 int run(ToolAction *Action);
287
288 /// \brief Create an AST for each file specified in the command line and
289 /// append them to ASTs.
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700290 int buildASTs(std::vector<std::unique_ptr<ASTUnit>> &ASTs);
Manuel Klimekcb971c62012-04-04 12:07:46 +0000291
292 /// \brief Returns the file manager used in the tool.
293 ///
294 /// The file manager is shared between all translation units.
Peter Collingbourne8051db12013-11-06 20:12:45 +0000295 FileManager &getFiles() { return *Files; }
Manuel Klimekcb971c62012-04-04 12:07:46 +0000296
297 private:
Stephen Hines176edba2014-12-01 14:53:08 -0800298 const CompilationDatabase &Compilations;
299 std::vector<std::string> SourcePaths;
Manuel Klimekcb971c62012-04-04 12:07:46 +0000300
Peter Collingbourne8051db12013-11-06 20:12:45 +0000301 llvm::IntrusiveRefCntPtr<FileManager> Files;
Manuel Klimekcb971c62012-04-04 12:07:46 +0000302 // Contains a list of pairs (<file name>, <file content>).
303 std::vector< std::pair<StringRef, StringRef> > MappedFileContents;
Simon Atanasyana01ddc72012-05-09 16:18:30 +0000304
Stephen Hines0e2c34f2015-03-23 12:09:02 -0700305 ArgumentsAdjuster ArgsAdjuster;
Manuel Klimekfa8e7d32013-11-07 23:18:05 +0000306
307 DiagnosticConsumer *DiagConsumer;
Manuel Klimekcb971c62012-04-04 12:07:46 +0000308};
309
310template <typename T>
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700311std::unique_ptr<FrontendActionFactory> newFrontendActionFactory() {
Manuel Klimekcb971c62012-04-04 12:07:46 +0000312 class SimpleFrontendActionFactory : public FrontendActionFactory {
313 public:
Stephen Hines651f13c2014-04-23 16:59:28 -0700314 clang::FrontendAction *create() override { return new T; }
Manuel Klimekcb971c62012-04-04 12:07:46 +0000315 };
316
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700317 return std::unique_ptr<FrontendActionFactory>(
318 new SimpleFrontendActionFactory);
Manuel Klimekcb971c62012-04-04 12:07:46 +0000319}
320
321template <typename FactoryT>
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700322inline std::unique_ptr<FrontendActionFactory> newFrontendActionFactory(
Edwin Vane3c16e692013-05-29 16:01:10 +0000323 FactoryT *ConsumerFactory, SourceFileCallbacks *Callbacks) {
Manuel Klimekcb971c62012-04-04 12:07:46 +0000324 class FrontendActionFactoryAdapter : public FrontendActionFactory {
325 public:
Manuel Klimek9fb6b272012-10-25 08:49:11 +0000326 explicit FrontendActionFactoryAdapter(FactoryT *ConsumerFactory,
Edwin Vane3c16e692013-05-29 16:01:10 +0000327 SourceFileCallbacks *Callbacks)
328 : ConsumerFactory(ConsumerFactory), Callbacks(Callbacks) {}
Manuel Klimekcb971c62012-04-04 12:07:46 +0000329
Stephen Hines651f13c2014-04-23 16:59:28 -0700330 clang::FrontendAction *create() override {
Edwin Vane3c16e692013-05-29 16:01:10 +0000331 return new ConsumerFactoryAdaptor(ConsumerFactory, Callbacks);
Manuel Klimekcb971c62012-04-04 12:07:46 +0000332 }
333
334 private:
Manuel Klimeke6df0ce2012-07-05 18:13:01 +0000335 class ConsumerFactoryAdaptor : public clang::ASTFrontendAction {
336 public:
Manuel Klimek9fb6b272012-10-25 08:49:11 +0000337 ConsumerFactoryAdaptor(FactoryT *ConsumerFactory,
Edwin Vane3c16e692013-05-29 16:01:10 +0000338 SourceFileCallbacks *Callbacks)
339 : ConsumerFactory(ConsumerFactory), Callbacks(Callbacks) {}
Manuel Klimeke6df0ce2012-07-05 18:13:01 +0000340
Stephen Hines176edba2014-12-01 14:53:08 -0800341 std::unique_ptr<clang::ASTConsumer>
342 CreateASTConsumer(clang::CompilerInstance &, StringRef) override {
Manuel Klimeke6df0ce2012-07-05 18:13:01 +0000343 return ConsumerFactory->newASTConsumer();
344 }
345
Manuel Klimek9fb6b272012-10-25 08:49:11 +0000346 protected:
Stephen Hines651f13c2014-04-23 16:59:28 -0700347 bool BeginSourceFileAction(CompilerInstance &CI,
348 StringRef Filename) override {
Edwin Vane3c16e692013-05-29 16:01:10 +0000349 if (!clang::ASTFrontendAction::BeginSourceFileAction(CI, Filename))
350 return false;
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700351 if (Callbacks)
Edwin Vane5ec95802013-05-30 13:59:44 +0000352 return Callbacks->handleBeginSource(CI, Filename);
Edwin Vane3c16e692013-05-29 16:01:10 +0000353 return true;
354 }
Stephen Hines651f13c2014-04-23 16:59:28 -0700355 void EndSourceFileAction() override {
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700356 if (Callbacks)
Edwin Vane5ec95802013-05-30 13:59:44 +0000357 Callbacks->handleEndSource();
Manuel Klimek9fb6b272012-10-25 08:49:11 +0000358 clang::ASTFrontendAction::EndSourceFileAction();
359 }
360
Manuel Klimeke6df0ce2012-07-05 18:13:01 +0000361 private:
362 FactoryT *ConsumerFactory;
Edwin Vane3c16e692013-05-29 16:01:10 +0000363 SourceFileCallbacks *Callbacks;
Manuel Klimeke6df0ce2012-07-05 18:13:01 +0000364 };
365 FactoryT *ConsumerFactory;
Edwin Vane3c16e692013-05-29 16:01:10 +0000366 SourceFileCallbacks *Callbacks;
Manuel Klimekcb971c62012-04-04 12:07:46 +0000367 };
368
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700369 return std::unique_ptr<FrontendActionFactory>(
370 new FrontendActionFactoryAdapter(ConsumerFactory, Callbacks));
Manuel Klimekcb971c62012-04-04 12:07:46 +0000371}
372
Manuel Klimek8fa2fb82012-07-10 13:10:51 +0000373/// \brief Returns the absolute path of \c File, by prepending it with
374/// the current directory if \c File is not absolute.
375///
376/// Otherwise returns \c File.
377/// If 'File' starts with "./", the returned path will not contain the "./".
378/// Otherwise, the returned path will contain the literal path-concatenation of
379/// the current directory and \c File.
380///
Rafael Espindolaa2148242013-08-10 01:40:10 +0000381/// The difference to llvm::sys::fs::make_absolute is the canonicalization this
382/// does by removing "./" and computing native paths.
Manuel Klimek8fa2fb82012-07-10 13:10:51 +0000383///
384/// \param File Either an absolute or relative path.
385std::string getAbsolutePath(StringRef File);
386
Pirama Arumuga Nainar33337ca2015-05-06 11:48:57 -0700387/// \brief Creates a \c CompilerInvocation.
388clang::CompilerInvocation *newInvocation(
389 clang::DiagnosticsEngine *Diagnostics,
390 const llvm::opt::ArgStringList &CC1Args);
391
Manuel Klimekcb971c62012-04-04 12:07:46 +0000392} // end namespace tooling
393} // end namespace clang
394
395#endif // LLVM_CLANG_TOOLING_TOOLING_H