Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
c6f450af
Commit
c6f450af
authored
Mar 09, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
b5b9c098
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
plugins/refcount_checker/refcount_checker.cpp
plugins/refcount_checker/refcount_checker.cpp
+11
-11
No files found.
plugins/refcount_checker/refcount_checker.cpp
View file @
c6f450af
...
...
@@ -34,7 +34,7 @@ using namespace std;
// Apply a custom category to all command-line options so that they are the
// only ones displayed.
static
cl
::
OptionCategory
My
ToolCategory
(
"my-tool options"
);
static
cl
::
OptionCategory
Refchecking
ToolCategory
(
"my-tool options"
);
// CommonOptionsParser declares HelpMessage with a description of the common
// command-line options related to the compilation database and input files.
...
...
@@ -72,7 +72,7 @@ static void dump(DeclContext* ctx) {
}
}
class
MyVisitor
:
public
RecursiveASTVisitor
<
My
Visitor
>
{
class
RefcheckingVisitor
:
public
RecursiveASTVisitor
<
Refchecking
Visitor
>
{
private:
ASTContext
*
Context
;
...
...
@@ -392,10 +392,10 @@ private:
}
public:
explicit
My
Visitor
(
ASTContext
*
Context
)
:
Context
(
Context
)
{
explicit
Refchecking
Visitor
(
ASTContext
*
Context
)
:
Context
(
Context
)
{
}
virtual
~
My
Visitor
()
{
virtual
~
Refchecking
Visitor
()
{
}
virtual
bool
VisitFunctionDecl
(
FunctionDecl
*
func
)
{
...
...
@@ -427,12 +427,12 @@ public:
}
};
class
My
ASTConsumer
:
public
ASTConsumer
{
class
Refchecking
ASTConsumer
:
public
ASTConsumer
{
private:
My
Visitor
visitor
;
Refchecking
Visitor
visitor
;
public:
explicit
My
ASTConsumer
(
ASTContext
*
Context
)
:
visitor
(
Context
)
{
explicit
Refchecking
ASTConsumer
(
ASTContext
*
Context
)
:
visitor
(
Context
)
{
}
virtual
void
HandleTranslationUnit
(
ASTContext
&
Context
)
{
...
...
@@ -441,16 +441,16 @@ public:
}
};
class
My
FrontendAction
:
public
ASTFrontendAction
{
class
Refchecking
FrontendAction
:
public
ASTFrontendAction
{
public:
virtual
std
::
unique_ptr
<
ASTConsumer
>
CreateASTConsumer
(
CompilerInstance
&
CI
,
StringRef
fname
)
{
return
std
::
unique_ptr
<
ASTConsumer
>
(
new
My
ASTConsumer
(
&
CI
.
getASTContext
()));
return
std
::
unique_ptr
<
ASTConsumer
>
(
new
Refchecking
ASTConsumer
(
&
CI
.
getASTContext
()));
}
};
int
main
(
int
argc
,
const
char
**
argv
)
{
CommonOptionsParser
OptionsParser
(
argc
,
argv
,
My
ToolCategory
);
CommonOptionsParser
OptionsParser
(
argc
,
argv
,
Refchecking
ToolCategory
);
ClangTool
Tool
(
OptionsParser
.
getCompilations
(),
OptionsParser
.
getSourcePathList
());
return
Tool
.
run
(
newFrontendActionFactory
<
My
FrontendAction
>
().
get
());
return
Tool
.
run
(
newFrontendActionFactory
<
Refchecking
FrontendAction
>
().
get
());
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment