commit 8a81f36b704dee56ca9ebb6ec0693b98553caf7d
parent 6afc1bd2f67bdc302322073d314cbfb11ac74307
Author: Kyle Milz <kyle@0x30.net>
Date: Wed, 10 Aug 2016 22:31:31 -0600
Revert "src: add a counter for system header statements"
This reverts commit 6afc1bd2f67bdc302322073d314cbfb11ac74307.
Diffstat:
8 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/check.in b/src/check.in
@@ -46,7 +46,6 @@ FINE[9]="Return statement values"
FINE[10]="Call expressions"
FINE[11]="Total statements"
FINE[12]="Errors rewriting source"
-FINE[13]="Statements in system headers"
fine_len=${#FINE[@]}
echo -n Checking .
diff --git a/src/inst_visitor.cc b/src/inst_visitor.cc
@@ -29,10 +29,8 @@ RewriteASTVisitor::TraverseStmt(clang::Stmt *s)
clang::SourceLocation start_loc = s->getLocStart();
clang::FullSourceLoc full_loc(start_loc, m_SM);
- if (full_loc.isInSystemHeader()) {
- m_counters[SYS_HEADER_STMT]++;
+ if (full_loc.isInSystemHeader())
return false;
- }
RecursiveASTVisitor<RewriteASTVisitor>::TraverseStmt(s);
return true;
diff --git a/src/inst_visitor.h b/src/inst_visitor.h
@@ -14,7 +14,6 @@ enum counters {
CALL_EXPR,
TOTAL_STMT,
REWRITE_ERROR,
- SYS_HEADER_STMT,
NCOUNTERS
};
@@ -33,8 +32,7 @@ public:
"Return statement values",
"Call expressions",
"Total statements",
- "Errors rewriting source code",
- "Statements in system headers"
+ "Errors rewriting source code"
}),
m_TheRewriter(R),
m_SM(R.getSourceMgr()),
diff --git a/t/inst_correct.t b/t/inst_correct.t
@@ -51,7 +51,6 @@ Totals:
5 Return statement values
4 Call expressions
58 Total statements
- 13 Statements in system headers
EOF
cc -o fib fib.c
diff --git a/t/inst_for.t b/t/inst_for.t
@@ -46,7 +46,6 @@ Totals:
4 Function definitions
1 For loops
15 Total statements
- 13 Statements in system headers
EOF
citrun-inst -c for.c
diff --git a/t/inst_if.t b/t/inst_if.t
@@ -62,7 +62,6 @@ Totals:
3 Return statement values
2 Call expressions
33 Total statements
- 13 Statements in system headers
EOF
citrun-inst -c if.c
diff --git a/t/inst_log.t b/t/inst_log.t
@@ -60,7 +60,6 @@ Instrumentation of '' finished:
4 Return statement values
4 Call expressions
58 Total statements
- 13 Statements in system headers
Modified source written successfully.
Instrumentation successful.
Running native compiler on modified source code.
diff --git a/t/inst_stdout.t b/t/inst_stdout.t
@@ -34,7 +34,6 @@ Totals:
1 Return statement values
1 Call expressions
9 Total statements
- 8 Statements in system headers
EOF
cc -o hello hello.c