Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: tools/clang/BindMigrate/BindMigrateConsumer.h

Issue 7886056: Clang plugin that rewrites PostTask(_, NewRunnableMethod(...)) to PostTask(_, base::Bind(...)); (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix lifetime issue where BindMigrateAction is deleted before the ASTConsumer is finished. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2011 Google Inc. All Rights Reserved.
2 // Author: ajwong@google.com (Albert Wong)
3
4 #ifndef BIND_MIGRATE_CONSUSUMER_H_
5 #define BIND_MIGRATE_CONSUSUMER_H_
6
7 #include <memory>
8
9 #include "clang/AST/ASTConsumer.h"
10 #include "clang/Basic/SourceLocation.h"
11 #include "clang/Rewrite/Rewriter.h"
12
13 #include "BindMigrateOptions.h"
14 #include "DiagnosticEmitter.h"
15 #include "FileRemapper.h"
16
17 namespace clang {
18
19 namespace arcmt_hack {
20 class FileRemapper;
21 } // namespace arcmt_hack
22
23 class DiagnosticEmitter;
24
25 class BindMigrateConsumer : public clang::ASTConsumer {
26 public:
27 BindMigrateConsumer(clang::CompilerInstance* instance,
28 const BindMigrateOptions& options);
29 virtual ~BindMigrateConsumer();
30
31 virtual void Initialize(clang::ASTContext &context);
32 virtual void HandleTranslationUnit(clang::ASTContext &context);
33
34 private:
35 clang::CompilerInstance* instance_;
36 DiagnosticEmitter error_emitter_;
37 clang::FileID source_file_;
38 clang::Rewriter rewriter_;
39 arcmt_hack::FileRemapper remapper_;
40 BindMigrateOptions options_;
41 };
42
43 } // namespace clang
44
45
46 #endif // BIND_MIGRATE_CONSUSUMER_H_
OLDNEW
« no previous file with comments | « tools/clang/BindMigrate/BindMigrateAction.cpp ('k') | tools/clang/BindMigrate/BindMigrateConsumer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698