From d77511f4c409c7aba2f75bace8d1800224d6d272 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sat, 15 Oct 2016 01:34:43 -0400 Subject: [PATCH] Bug 496720 - Respect scope filters for AST-based checkers Change-Id: Ib96879ec50bdc5a14215abbe6d109bcf3767d4f4 --- .../cdt/codan/core/cxx/model/AbstractIndexAstChecker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java index d1b9a8ce869..2d3e2823467 100644 --- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java +++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java @@ -152,13 +152,13 @@ public abstract class AbstractIndexAstChecker extends AbstractCheckerWithProblem protected boolean shouldProduceProblem(IProblem problem, IProblemLocation loc, Object... args) { String suppressionComment = (String) getSuppressionCommentPreference(problem).getValue(); if (suppressionComment.isEmpty()) - return true; + return super.shouldProduceProblem(problem, loc, args); List lineComments = getLineCommentsForLocation(loc); for (IASTComment astComment : lineComments) { if (astComment.getRawSignature().contains(suppressionComment)) return false; } - return true; + return super.shouldProduceProblem(problem, loc, args); } protected List getLineCommentsForLocation(IProblemLocation loc) {