1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 17:55:39 +02:00

- renamed catch by reference checker

This commit is contained in:
Alena Laskavaia 2010-04-13 00:55:39 +00:00
parent 6f66ef520e
commit c9823a073f
3 changed files with 9 additions and 7 deletions

View file

@ -12,3 +12,5 @@ Require-Bundle: org.eclipse.core.runtime,
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: Eclipse CDT
Export-Package: org.eclipse.cdt.codan.checkers,
org.eclipse.cdt.codan.internal.checkers;x-friends:="org.eclipse.cdt.codan.checkers.ui"

View file

@ -44,14 +44,14 @@
</checker>
<checker
class="org.eclipse.cdt.codan.internal.checkers.CatchUsesReference"
id="org.eclipse.cdt.codan.internal.checkers.CatchUsesReference"
name="CatchUsesReferenceChecker">
class="org.eclipse.cdt.codan.internal.checkers.CatchByReference"
id="org.eclipse.cdt.codan.internal.checkers.CatchByReference"
name="CatchByReferenceChecker">
<problem
category="org.eclipse.cdt.codan.core.categories.ProgrammingProblems"
defaultSeverity="Warning"
description="Catching by reference is recommended by C++ experts, &quot;Throw by value, catch by reference&quot;. &#x0A; For one thing, this avoids copying and potentially slicing the exception."
id="org.eclipse.cdt.codan.internal.checkers.CatchUsesReference"
description="Catching by reference is recommended by C++ experts, &quot;Throw by value, catch by reference&quot;. For one thing, this avoids copying and potentially slicing the exception."
id="org.eclipse.cdt.codan.internal.checkers.CatchByReference"
name="Catching by reference is recommended"
messagePattern="Catching by reference is recommended for non-basic types">
</problem>

View file

@ -34,8 +34,8 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTryBlockStatement;
* For one thing, this avoids copying and potentially slicing the exception.
*
*/
public class CatchUsesReference extends AbstractIndexAstChecker {
private static final String ER_ID = "org.eclipse.cdt.codan.internal.checkers.CatchUsesReference";
public class CatchByReference extends AbstractIndexAstChecker {
public static final String ER_ID = "org.eclipse.cdt.codan.internal.checkers.CatchByReference";
public void processAst(IASTTranslationUnit ast) {
// traverse the ast using the visitor pattern.