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-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: Eclipse CDT 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>
<checker <checker
class="org.eclipse.cdt.codan.internal.checkers.CatchUsesReference" class="org.eclipse.cdt.codan.internal.checkers.CatchByReference"
id="org.eclipse.cdt.codan.internal.checkers.CatchUsesReference" id="org.eclipse.cdt.codan.internal.checkers.CatchByReference"
name="CatchUsesReferenceChecker"> name="CatchByReferenceChecker">
<problem <problem
category="org.eclipse.cdt.codan.core.categories.ProgrammingProblems" category="org.eclipse.cdt.codan.core.categories.ProgrammingProblems"
defaultSeverity="Warning" 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." 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.CatchUsesReference" id="org.eclipse.cdt.codan.internal.checkers.CatchByReference"
name="Catching by reference is recommended" name="Catching by reference is recommended"
messagePattern="Catching by reference is recommended for non-basic types"> messagePattern="Catching by reference is recommended for non-basic types">
</problem> </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. * For one thing, this avoids copying and potentially slicing the exception.
* *
*/ */
public class CatchUsesReference extends AbstractIndexAstChecker { public class CatchByReference extends AbstractIndexAstChecker {
private static final String ER_ID = "org.eclipse.cdt.codan.internal.checkers.CatchUsesReference"; public static final String ER_ID = "org.eclipse.cdt.codan.internal.checkers.CatchByReference";
public void processAst(IASTTranslationUnit ast) { public void processAst(IASTTranslationUnit ast) {
// traverse the ast using the visitor pattern. // traverse the ast using the visitor pattern.