blob: 89d95fc97d8125139d1d0903992649425e8194a5 [file] [log] [blame]
Daniel Dunbar4ee24092009-11-14 10:42:35 +00001//===--- FrontendAction.cpp -----------------------------------------------===//
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#include "clang/Frontend/FrontendAction.h"
Sebastian Redlffaab3e2010-07-30 00:29:29 +000011#include "clang/AST/ASTConsumer.h"
Daniel Dunbar4ee24092009-11-14 10:42:35 +000012#include "clang/AST/ASTContext.h"
Nico Weber5aa74af2011-01-25 20:34:14 +000013#include "clang/AST/DeclGroup.h"
Daniel Dunbar4ee24092009-11-14 10:42:35 +000014#include "clang/Lex/HeaderSearch.h"
15#include "clang/Lex/Preprocessor.h"
16#include "clang/Frontend/ASTUnit.h"
17#include "clang/Frontend/CompilerInstance.h"
18#include "clang/Frontend/FrontendDiagnostic.h"
Nico Weber5aa74af2011-01-25 20:34:14 +000019#include "clang/Frontend/FrontendPluginRegistry.h"
20#include "clang/Frontend/MultiplexConsumer.h"
John McCall19510852010-08-20 18:27:03 +000021#include "clang/Parse/ParseAST.h"
Argyrios Kyrtzidisb9728582010-10-14 20:14:18 +000022#include "clang/Serialization/ASTDeserializationListener.h"
Argyrios Kyrtzidisb0f4b9a2011-03-09 17:21:42 +000023#include "clang/Serialization/ChainedIncludesSource.h"
Daniel Dunbar4ee24092009-11-14 10:42:35 +000024#include "llvm/Support/MemoryBuffer.h"
25#include "llvm/Support/Timer.h"
26#include "llvm/Support/ErrorHandling.h"
27#include "llvm/Support/raw_ostream.h"
28using namespace clang;
29
Argyrios Kyrtzidisb9728582010-10-14 20:14:18 +000030namespace {
31
32/// \brief Dumps deserialized declarations.
33class DeserializedDeclsDumper : public ASTDeserializationListener {
34 ASTDeserializationListener *Previous;
35
36public:
37 DeserializedDeclsDumper(ASTDeserializationListener *Previous)
38 : Previous(Previous) { }
39
40 virtual void DeclRead(serialization::DeclID ID, const Decl *D) {
41 llvm::outs() << "PCH DECL: " << D->getDeclKindName();
42 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
43 llvm::outs() << " - " << ND->getNameAsString();
44 llvm::outs() << "\n";
45
46 if (Previous)
47 Previous->DeclRead(ID, D);
48 }
Argyrios Kyrtzidisb9728582010-10-14 20:14:18 +000049};
50
Argyrios Kyrtzidis3e785932010-10-14 20:14:25 +000051 /// \brief Checks deserialized declarations and emits error if a name
52 /// matches one given in command-line using -error-on-deserialized-decl.
53 class DeserializedDeclsChecker : public ASTDeserializationListener {
54 ASTContext &Ctx;
55 std::set<std::string> NamesToCheck;
56 ASTDeserializationListener *Previous;
57
58 public:
59 DeserializedDeclsChecker(ASTContext &Ctx,
60 const std::set<std::string> &NamesToCheck,
61 ASTDeserializationListener *Previous)
62 : Ctx(Ctx), NamesToCheck(NamesToCheck), Previous(Previous) { }
63
64 virtual void DeclRead(serialization::DeclID ID, const Decl *D) {
65 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
66 if (NamesToCheck.find(ND->getNameAsString()) != NamesToCheck.end()) {
67 unsigned DiagID
68 = Ctx.getDiagnostics().getCustomDiagID(Diagnostic::Error,
69 "%0 was deserialized");
70 Ctx.getDiagnostics().Report(Ctx.getFullLoc(D->getLocation()), DiagID)
71 << ND->getNameAsString();
72 }
73
74 if (Previous)
75 Previous->DeclRead(ID, D);
76 }
Argyrios Kyrtzidis3e785932010-10-14 20:14:25 +000077};
78
Argyrios Kyrtzidisb9728582010-10-14 20:14:18 +000079} // end anonymous namespace
80
Kovarththanan Rajaratnamf79bafa2009-11-29 09:57:35 +000081FrontendAction::FrontendAction() : Instance(0) {}
Daniel Dunbar4ee24092009-11-14 10:42:35 +000082
83FrontendAction::~FrontendAction() {}
84
Chris Lattner5f9e2722011-07-23 10:55:15 +000085void FrontendAction::setCurrentFile(StringRef Value, InputKind Kind,
Daniel Dunbar685ac662010-06-07 23:25:49 +000086 ASTUnit *AST) {
Daniel Dunbar4ee24092009-11-14 10:42:35 +000087 CurrentFile = Value;
Daniel Dunbar685ac662010-06-07 23:25:49 +000088 CurrentFileKind = Kind;
Daniel Dunbar4ee24092009-11-14 10:42:35 +000089 CurrentASTUnit.reset(AST);
90}
91
Nico Weber5aa74af2011-01-25 20:34:14 +000092ASTConsumer* FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI,
Chris Lattner5f9e2722011-07-23 10:55:15 +000093 StringRef InFile) {
Nico Weber5aa74af2011-01-25 20:34:14 +000094 ASTConsumer* Consumer = CreateASTConsumer(CI, InFile);
95 if (!Consumer)
96 return 0;
97
98 if (CI.getFrontendOpts().AddPluginActions.size() == 0)
99 return Consumer;
100
101 // Make sure the non-plugin consumer is first, so that plugins can't
102 // modifiy the AST.
103 std::vector<ASTConsumer*> Consumers(1, Consumer);
104
105 for (size_t i = 0, e = CI.getFrontendOpts().AddPluginActions.size();
106 i != e; ++i) {
107 // This is O(|plugins| * |add_plugins|), but since both numbers are
108 // way below 50 in practice, that's ok.
109 for (FrontendPluginRegistry::iterator
110 it = FrontendPluginRegistry::begin(),
111 ie = FrontendPluginRegistry::end();
112 it != ie; ++it) {
113 if (it->getName() == CI.getFrontendOpts().AddPluginActions[i]) {
114 llvm::OwningPtr<PluginASTAction> P(it->instantiate());
115 FrontendAction* c = P.get();
Nico Weberf25649c2011-01-29 21:21:49 +0000116 if (P->ParseArgs(CI, CI.getFrontendOpts().AddPluginArgs[i]))
Nico Weber5aa74af2011-01-25 20:34:14 +0000117 Consumers.push_back(c->CreateASTConsumer(CI, InFile));
118 }
119 }
120 }
121
122 return new MultiplexConsumer(Consumers);
123}
124
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000125bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
Chris Lattner5f9e2722011-07-23 10:55:15 +0000126 StringRef Filename,
Daniel Dunbard3598a62010-06-07 23:23:06 +0000127 InputKind InputKind) {
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000128 assert(!Instance && "Already processing a source file!");
129 assert(!Filename.empty() && "Unexpected empty filename!");
Daniel Dunbar685ac662010-06-07 23:25:49 +0000130 setCurrentFile(Filename, InputKind);
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000131 setCompilerInstance(&CI);
132
Argyrios Kyrtzidise665d692011-06-18 00:53:41 +0000133 if (!BeginInvocation(CI))
134 goto failure;
135
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000136 // AST files follow a very different path, since they share objects via the
137 // AST unit.
Daniel Dunbar20560482010-06-07 23:23:50 +0000138 if (InputKind == IK_AST) {
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000139 assert(!usesPreprocessorOnly() &&
140 "Attempt to pass AST file to preprocessor only action!");
Daniel Dunbareb58d832010-06-07 23:24:43 +0000141 assert(hasASTFileSupport() &&
142 "This action does not have AST file support!");
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000143
Douglas Gregor28019772010-04-05 23:52:57 +0000144 llvm::IntrusiveRefCntPtr<Diagnostic> Diags(&CI.getDiagnostics());
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000145 std::string Error;
Argyrios Kyrtzidis389db162010-11-03 22:45:23 +0000146 ASTUnit *AST = ASTUnit::LoadFromASTFile(Filename, Diags,
147 CI.getFileSystemOpts());
Daniel Dunbar5262fda2009-12-03 01:45:44 +0000148 if (!AST)
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000149 goto failure;
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000150
Daniel Dunbar685ac662010-06-07 23:25:49 +0000151 setCurrentFile(Filename, InputKind, AST);
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000152
153 // Set the shared objects, these are reset when we finish processing the
154 // file, otherwise the CompilerInstance will happily destroy them.
155 CI.setFileManager(&AST->getFileManager());
156 CI.setSourceManager(&AST->getSourceManager());
157 CI.setPreprocessor(&AST->getPreprocessor());
158 CI.setASTContext(&AST->getASTContext());
159
160 // Initialize the action.
161 if (!BeginSourceFileAction(CI, Filename))
162 goto failure;
163
164 /// Create the AST consumer.
Nico Weber5aa74af2011-01-25 20:34:14 +0000165 CI.setASTConsumer(CreateWrappedASTConsumer(CI, Filename));
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000166 if (!CI.hasASTConsumer())
167 goto failure;
168
169 return true;
170 }
171
Daniel Dunbarfaddc3e2010-06-07 23:26:47 +0000172 // Set up the file and source managers, if needed.
Daniel Dunbar20560482010-06-07 23:23:50 +0000173 if (!CI.hasFileManager())
174 CI.createFileManager();
175 if (!CI.hasSourceManager())
Chris Lattner39b49bc2010-11-23 08:35:12 +0000176 CI.createSourceManager(CI.getFileManager());
Daniel Dunbarfaddc3e2010-06-07 23:26:47 +0000177
178 // IR files bypass the rest of initialization.
179 if (InputKind == IK_LLVM_IR) {
180 assert(hasIRSupport() &&
181 "This action does not have IR file support!");
182
183 // Inform the diagnostic client we are processing a source file.
184 CI.getDiagnosticClient().BeginSourceFile(CI.getLangOpts(), 0);
185
186 // Initialize the action.
187 if (!BeginSourceFileAction(CI, Filename))
188 goto failure;
189
190 return true;
191 }
192
193 // Set up the preprocessor.
Daniel Dunbar20560482010-06-07 23:23:50 +0000194 CI.createPreprocessor();
195
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000196 // Inform the diagnostic client we are processing a source file.
197 CI.getDiagnosticClient().BeginSourceFile(CI.getLangOpts(),
198 &CI.getPreprocessor());
199
200 // Initialize the action.
201 if (!BeginSourceFileAction(CI, Filename))
202 goto failure;
203
204 /// Create the AST context and consumer unless this is a preprocessor only
205 /// action.
206 if (!usesPreprocessorOnly()) {
207 CI.createASTContext();
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000208
Nico Weber5aa74af2011-01-25 20:34:14 +0000209 llvm::OwningPtr<ASTConsumer> Consumer(
210 CreateWrappedASTConsumer(CI, Filename));
Fariborz Jahaniand3057192010-10-29 19:49:13 +0000211 if (!Consumer)
212 goto failure;
Sebastian Redlffaab3e2010-07-30 00:29:29 +0000213
Argyrios Kyrtzidis7b903402010-10-24 17:26:36 +0000214 CI.getASTContext().setASTMutationListener(Consumer->GetASTMutationListener());
215
Argyrios Kyrtzidisb0f4b9a2011-03-09 17:21:42 +0000216 if (!CI.getPreprocessorOpts().ChainedIncludes.empty()) {
217 // Convert headers to PCH and chain them.
218 llvm::OwningPtr<ExternalASTSource> source;
219 source.reset(ChainedIncludesSource::create(CI));
220 if (!source)
221 goto failure;
222 CI.getASTContext().setExternalSource(source);
223
224 } else if (!CI.getPreprocessorOpts().ImplicitPCHInclude.empty()) {
225 // Use PCH.
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000226 assert(hasPCHSupport() && "This action does not have PCH support!");
Douglas Gregorf62d43d2011-07-19 16:10:42 +0000227 ASTDeserializationListener *DeserialListener =
228 Consumer->GetASTDeserializationListener();
Argyrios Kyrtzidisb9728582010-10-14 20:14:18 +0000229 if (CI.getPreprocessorOpts().DumpDeserializedPCHDecls)
230 DeserialListener = new DeserializedDeclsDumper(DeserialListener);
Argyrios Kyrtzidis3e785932010-10-14 20:14:25 +0000231 if (!CI.getPreprocessorOpts().DeserializedPCHDeclsToErrorOn.empty())
232 DeserialListener = new DeserializedDeclsChecker(CI.getASTContext(),
233 CI.getPreprocessorOpts().DeserializedPCHDeclsToErrorOn,
234 DeserialListener);
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000235 CI.createPCHExternalASTSource(
Douglas Gregorfae3b2f2010-07-27 00:27:13 +0000236 CI.getPreprocessorOpts().ImplicitPCHInclude,
Sebastian Redlffaab3e2010-07-30 00:29:29 +0000237 CI.getPreprocessorOpts().DisablePCHValidation,
Douglas Gregor8ef6c8c2011-02-05 19:42:43 +0000238 CI.getPreprocessorOpts().DisableStatCache,
Argyrios Kyrtzidisb9728582010-10-14 20:14:18 +0000239 DeserialListener);
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000240 if (!CI.getASTContext().getExternalSource())
241 goto failure;
242 }
Sebastian Redl77f46032010-07-09 21:00:24 +0000243
Sebastian Redlffaab3e2010-07-30 00:29:29 +0000244 CI.setASTConsumer(Consumer.take());
Sebastian Redl77f46032010-07-09 21:00:24 +0000245 if (!CI.hasASTConsumer())
246 goto failure;
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000247 }
248
249 // Initialize builtin info as long as we aren't using an external AST
250 // source.
251 if (!CI.hasASTContext() || !CI.getASTContext().getExternalSource()) {
252 Preprocessor &PP = CI.getPreprocessor();
253 PP.getBuiltinInfo().InitializeBuiltins(PP.getIdentifierTable(),
Fariborz Jahanian67aba812010-11-30 17:35:24 +0000254 PP.getLangOptions());
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000255 }
256
257 return true;
258
259 // If we failed, reset state since the client will not end up calling the
260 // matching EndSourceFile().
261 failure:
262 if (isCurrentFileAST()) {
Ted Kremenek4f327862011-03-21 18:40:17 +0000263 CI.setASTContext(0);
264 CI.setPreprocessor(0);
265 CI.setSourceManager(0);
266 CI.setFileManager(0);
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000267 }
268
269 CI.getDiagnosticClient().EndSourceFile();
Daniel Dunbar685ac662010-06-07 23:25:49 +0000270 setCurrentFile("", IK_None);
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000271 setCompilerInstance(0);
272 return false;
273}
274
275void FrontendAction::Execute() {
276 CompilerInstance &CI = getCompilerInstance();
277
278 // Initialize the main file entry. This needs to be delayed until after PCH
279 // has loaded.
280 if (isCurrentFileAST()) {
281 // Set the main file ID to an empty file.
282 //
283 // FIXME: We probably shouldn't need this, but for now this is the
284 // simplest way to reuse the logic in ParseAST.
285 const char *EmptyStr = "";
286 llvm::MemoryBuffer *SB =
Chris Lattnera0a270c2010-04-05 22:42:27 +0000287 llvm::MemoryBuffer::getMemBuffer(EmptyStr, "<dummy input>");
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000288 CI.getSourceManager().createMainFileIDForMemBuffer(SB);
289 } else {
290 if (!CI.InitializeSourceManager(getCurrentFile()))
291 return;
292 }
293
Kovarththanan Rajaratnamf79bafa2009-11-29 09:57:35 +0000294 if (CI.hasFrontendTimer()) {
295 llvm::TimeRegion Timer(CI.getFrontendTimer());
296 ExecuteAction();
297 }
298 else ExecuteAction();
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000299}
300
301void FrontendAction::EndSourceFile() {
302 CompilerInstance &CI = getCompilerInstance();
303
Douglas Gregor92b97f22011-02-09 18:47:31 +0000304 // Inform the diagnostic client we are done with this source file.
305 CI.getDiagnosticClient().EndSourceFile();
306
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000307 // Finalize the action.
308 EndSourceFileAction();
309
310 // Release the consumer and the AST, in that order since the consumer may
311 // perform actions in its destructor which require the context.
312 //
313 // FIXME: There is more per-file stuff we could just drop here?
314 if (CI.getFrontendOpts().DisableFree) {
315 CI.takeASTConsumer();
Douglas Gregorf18d0d82010-08-12 23:31:19 +0000316 if (!isCurrentFileAST()) {
317 CI.takeSema();
Ted Kremenek4f327862011-03-21 18:40:17 +0000318 CI.resetAndLeakASTContext();
Douglas Gregorf18d0d82010-08-12 23:31:19 +0000319 }
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000320 } else {
Douglas Gregorf18d0d82010-08-12 23:31:19 +0000321 if (!isCurrentFileAST()) {
322 CI.setSema(0);
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000323 CI.setASTContext(0);
Douglas Gregorf18d0d82010-08-12 23:31:19 +0000324 }
325 CI.setASTConsumer(0);
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000326 }
327
Daniel Dunbardbd82092010-03-23 05:09:10 +0000328 // Inform the preprocessor we are done.
329 if (CI.hasPreprocessor())
330 CI.getPreprocessor().EndSourceFile();
331
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000332 if (CI.getFrontendOpts().ShowStats) {
333 llvm::errs() << "\nSTATISTICS FOR '" << getCurrentFile() << "':\n";
334 CI.getPreprocessor().PrintStats();
335 CI.getPreprocessor().getIdentifierTable().PrintStats();
336 CI.getPreprocessor().getHeaderSearchInfo().PrintStats();
337 CI.getSourceManager().PrintStats();
338 llvm::errs() << "\n";
339 }
340
341 // Cleanup the output streams, and erase the output files if we encountered
342 // an error.
Argyrios Kyrtzidisbe3aab62010-11-18 21:47:07 +0000343 CI.clearOutputFiles(/*EraseFiles=*/CI.getDiagnostics().hasErrorOccurred());
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000344
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000345 if (isCurrentFileAST()) {
Douglas Gregorf18d0d82010-08-12 23:31:19 +0000346 CI.takeSema();
Ted Kremenek4f327862011-03-21 18:40:17 +0000347 CI.resetAndLeakASTContext();
348 CI.resetAndLeakPreprocessor();
349 CI.resetAndLeakSourceManager();
350 CI.resetAndLeakFileManager();
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000351 }
352
353 setCompilerInstance(0);
Daniel Dunbar685ac662010-06-07 23:25:49 +0000354 setCurrentFile("", IK_None);
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000355}
356
357//===----------------------------------------------------------------------===//
358// Utility Actions
359//===----------------------------------------------------------------------===//
360
361void ASTFrontendAction::ExecuteAction() {
362 CompilerInstance &CI = getCompilerInstance();
363
364 // FIXME: Move the truncation aspect of this into Sema, we delayed this till
365 // here so the source manager would be initialized.
366 if (hasCodeCompletionSupport() &&
367 !CI.getFrontendOpts().CodeCompletionAt.FileName.empty())
368 CI.createCodeCompletionConsumer();
369
370 // Use a code completion consumer?
371 CodeCompleteConsumer *CompletionConsumer = 0;
372 if (CI.hasCodeCompletionConsumer())
373 CompletionConsumer = &CI.getCodeCompletionConsumer();
374
Douglas Gregorf18d0d82010-08-12 23:31:19 +0000375 if (!CI.hasSema())
376 CI.createSema(usesCompleteTranslationUnit(), CompletionConsumer);
377
378 ParseAST(CI.getSema(), CI.getFrontendOpts().ShowStats);
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000379}
380
381ASTConsumer *
382PreprocessorFrontendAction::CreateASTConsumer(CompilerInstance &CI,
Chris Lattner5f9e2722011-07-23 10:55:15 +0000383 StringRef InFile) {
Jeffrey Yasskin9f61aa92009-12-12 05:05:38 +0000384 llvm_unreachable("Invalid CreateASTConsumer on preprocessor action!");
Daniel Dunbar4ee24092009-11-14 10:42:35 +0000385}
Chandler Carruthf7f81882011-06-16 16:17:05 +0000386
387ASTConsumer *WrapperFrontendAction::CreateASTConsumer(CompilerInstance &CI,
Chris Lattner5f9e2722011-07-23 10:55:15 +0000388 StringRef InFile) {
Chandler Carruthf7f81882011-06-16 16:17:05 +0000389 return WrappedAction->CreateASTConsumer(CI, InFile);
390}
Argyrios Kyrtzidise665d692011-06-18 00:53:41 +0000391bool WrapperFrontendAction::BeginInvocation(CompilerInstance &CI) {
392 return WrappedAction->BeginInvocation(CI);
393}
Chandler Carruthf7f81882011-06-16 16:17:05 +0000394bool WrapperFrontendAction::BeginSourceFileAction(CompilerInstance &CI,
Chris Lattner5f9e2722011-07-23 10:55:15 +0000395 StringRef Filename) {
Argyrios Kyrtzidise665d692011-06-18 00:53:41 +0000396 WrappedAction->setCurrentFile(getCurrentFile(), getCurrentFileKind());
397 WrappedAction->setCompilerInstance(&CI);
Chandler Carruthf7f81882011-06-16 16:17:05 +0000398 return WrappedAction->BeginSourceFileAction(CI, Filename);
399}
400void WrapperFrontendAction::ExecuteAction() {
401 WrappedAction->ExecuteAction();
402}
403void WrapperFrontendAction::EndSourceFileAction() {
404 WrappedAction->EndSourceFileAction();
405}
406
407bool WrapperFrontendAction::usesPreprocessorOnly() const {
408 return WrappedAction->usesPreprocessorOnly();
409}
410bool WrapperFrontendAction::usesCompleteTranslationUnit() {
411 return WrappedAction->usesCompleteTranslationUnit();
412}
413bool WrapperFrontendAction::hasPCHSupport() const {
414 return WrappedAction->hasPCHSupport();
415}
416bool WrapperFrontendAction::hasASTFileSupport() const {
417 return WrappedAction->hasASTFileSupport();
418}
419bool WrapperFrontendAction::hasIRSupport() const {
420 return WrappedAction->hasIRSupport();
421}
422bool WrapperFrontendAction::hasCodeCompletionSupport() const {
423 return WrappedAction->hasCodeCompletionSupport();
424}
425
426WrapperFrontendAction::WrapperFrontendAction(FrontendAction *WrappedAction)
427 : WrappedAction(WrappedAction) {}
428