diff --git a/op-finder/OperationFinder.cpp b/op-finder/OperationFinder.cpp index 1c04481..128d4ea 100644 --- a/op-finder/OperationFinder.cpp +++ b/op-finder/OperationFinder.cpp @@ -31,11 +31,6 @@ StatementMatcher UnaryArithmeticMatcher = StatementMatcher CompoundMatcher = compoundStmt().bind("compound_stmt"); -bool isInMainFile(const MatchFinder::MatchResult &result, const SourceLocation &loc) -{ - return result.Context->getSourceManager().isWrittenInMainFile(loc); -} - template StringRef getOpcode(const TOp *op) { @@ -78,9 +73,6 @@ void OperationFinder::_processAssignment(const clang::ast_matchers::MatchFinder: assert(op); - if (!isInMainFile(result, op->getBeginLoc())) - return; - const auto& loc = op->getBeginLoc(); const auto& source_manager = *result.SourceManager; @@ -101,9 +93,6 @@ void OperationFinder::_processArithmetic(const MatchFinder::MatchResult& result) assert(op); - if (!isInMainFile(result, op->getBeginLoc())) - return; - const auto& loc = op->getBeginLoc(); const auto& source_manager = *result.SourceManager; @@ -128,9 +117,6 @@ void OperationFinder::_processCompoundStmt(const clang::ast_matchers::MatchFinde if (!op || !op->isCompoundAssignmentOp()) return; - if (!isInMainFile(result, op->getBeginLoc())) - return; - const auto& loc = op->getBeginLoc(); const auto& source_manager = *result.SourceManager; @@ -152,9 +138,6 @@ void OperationFinder::_processUnaryArithmetic(const MatchFinder::MatchResult &re assert(op); assert(lhs); - if (!isInMainFile(result, lhs->getBeginLoc())) - return; - const auto& loc = lhs->getBeginLoc(); const auto& source_manager = *result.SourceManager;