Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorAlena Laskavaia2010-07-28 22:04:46 -0400
committerAlena Laskavaia2010-07-28 22:04:46 -0400
commitde625aa31dff561fd9513dbf2170877e3f421598 (patch)
tree12ddcf63b4a202b78113ddd61aa658045bebd643 /codan
parent66c8aadbba11488cb9913d30a88fd70c208d259a (diff)
downloadorg.eclipse.cdt-de625aa31dff561fd9513dbf2170877e3f421598.tar.gz
org.eclipse.cdt-de625aa31dff561fd9513dbf2170877e3f421598.tar.xz
org.eclipse.cdt-de625aa31dff561fd9513dbf2170877e3f421598.zip
Bug 316309: fixing void return typedef in C++ (patch from Marc-Andre Laperle)
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java
index 420926ed7b..77e963f73b 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java
@@ -26,6 +26,7 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTStatement;
@@ -33,7 +34,6 @@ import org.eclipse.cdt.core.dom.ast.IBasicType;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
-import org.eclipse.cdt.core.dom.ast.c.ICASTTypedefNameSpecifier;
/**
* The checker suppose to find issue related to mismatched return value/function
@@ -189,8 +189,8 @@ public class ReturnChecker extends AbstractAstFunctionChecker {
int type = -1;
if (declSpecifier instanceof IASTSimpleDeclSpecifier) {
type = ((IASTSimpleDeclSpecifier) declSpecifier).getType();
- } else if (declSpecifier instanceof ICASTTypedefNameSpecifier) {
- IBinding binding = ((ICASTTypedefNameSpecifier) declSpecifier)
+ } else if (declSpecifier instanceof IASTNamedTypeSpecifier) {
+ IBinding binding = ((IASTNamedTypeSpecifier) declSpecifier)
.getName().resolveBinding();
IType utype = CxxAstUtils.getInstance().unwindTypedef(
(IType) binding);

Back to the top