Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorSergey Prigogin2015-04-03 17:29:40 +0000
committerSergey Prigogin2015-04-03 17:37:47 +0000
commitbec85475fd4dab43b5da5e9923ebe23218395558 (patch)
tree360016a25ccd78b56b6d1f4c23f9b17c9fbd290b /codan
parent76f23d05c3a3cec7f9e4a46d462ef1ac6ae2e8da (diff)
downloadorg.eclipse.cdt-bec85475fd4dab43b5da5e9923ebe23218395558.tar.gz
org.eclipse.cdt-bec85475fd4dab43b5da5e9923ebe23218395558.tar.xz
org.eclipse.cdt-bec85475fd4dab43b5da5e9923ebe23218395558.zip
Reverted erroneous commits.
Change-Id: I7e914e27413f102d4b84c62f53f300c4ec5d23e8 Signed-off-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/CxxAstUtils.java29
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocation.java22
2 files changed, 27 insertions, 24 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/CxxAstUtils.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/CxxAstUtils.java
index 443b5c3cd93..e3edb4db8a3 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/CxxAstUtils.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/CxxAstUtils.java
@@ -169,7 +169,7 @@ public final class CxxAstUtils {
* For any BinaryExpression, guess the type from the other operand. (A good
* guess for =, ==; hard to get a better guess for others)
*
- * @return inferred type or {@code null} if couldn't infer
+ * @return inferred type or null if couldn't infer
*/
private static IType tryInferTypeFromBinaryExpr(IASTName astName) {
if (astName.getParent() instanceof IASTIdExpression && astName.getParent().getParent() instanceof IASTBinaryExpression) {
@@ -188,8 +188,9 @@ public final class CxxAstUtils {
* For a function call, tries to find a matching function declaration.
* Checks the argument count.
*
- * @param index the index
- * @return a generated declaration or {@code null} if not suitable
+ * @param index
+ *
+ * @return a generated declaration or null if not suitable
*/
private static IASTSimpleDeclaration tryInferTypeFromFunctionCall(IASTName astName, INodeFactory factory, IIndex index) {
if (astName.getParent() instanceof IASTIdExpression && astName.getParent().getParent() instanceof IASTFunctionCallExpression
@@ -302,11 +303,13 @@ public final class CxxAstUtils {
/**
* If the function definition belongs to a class, returns the class.
- * Otherwise, returns {@code null}.
+ * Otherwise, returns null.
*
- * @param function the function definition to check
- * @param index the index to use for name lookup
- * @return either a type specifier or {@code null}
+ * @param function
+ * the function definition to check
+ * @param index
+ * the index to use for name lookup
+ * @return Either a type specifier or null
*/
public static IASTCompositeTypeSpecifier getCompositeTypeFromFunction(final IASTFunctionDefinition function, final IIndex index) {
// Return value to be set via visitor.
@@ -368,19 +371,19 @@ public final class CxxAstUtils {
return returnSpecifier[0];
}
- public static boolean isThrowStatement(IASTNode statement) {
- if (!(statement instanceof IASTExpressionStatement))
+ public static boolean isThrowStatement(IASTNode body) {
+ if (!(body instanceof IASTExpressionStatement))
return false;
- IASTExpression expression = ((IASTExpressionStatement) statement).getExpression();
+ IASTExpression expression = ((IASTExpressionStatement) body).getExpression();
if (!(expression instanceof IASTUnaryExpression))
return false;
return ((IASTUnaryExpression) expression).getOperator() == IASTUnaryExpression.op_throw;
}
- public static boolean isExitStatement(IASTNode statement) {
- if (!(statement instanceof IASTExpressionStatement))
+ public static boolean isExitStatement(IASTNode body) {
+ if (!(body instanceof IASTExpressionStatement))
return false;
- IASTExpression expression = ((IASTExpressionStatement) statement).getExpression();
+ IASTExpression expression = ((IASTExpressionStatement) body).getExpression();
if (!(expression instanceof IASTFunctionCallExpression))
return false;
IASTExpression functionNameExpression = ((IASTFunctionCallExpression) expression).getFunctionNameExpression();
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocation.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocation.java
index bb2240c7301..1ef8546ec14 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocation.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocation.java
@@ -1,55 +1,55 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Alena Laskavaia
+ * Copyright (c) 2009, 2010 Alena Laskavaia
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Alena Laskavaia - initial API and implementation
+ * Alena Laskavaia - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.codan.core.model;
import org.eclipse.core.resources.IResource;
/**
- * Interface to describe problem location. Usually contains file and line number,
+ * Interface to describe problem location. Usually contains file and linenumber,
* also supports character positions for sophisticated errors.
- *
+ *
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IProblemLocation {
/**
- *
- * @return the file where the problem occurred
+ *
+ * @return File for the problem - absolute full paths
*/
IResource getFile();
/**
- *
+ *
* @return Primary line for the problem, lines start with 1 for file. If -1
* char position would be used.
*/
int getLineNumber();
/**
- *
+ *
* @return character position where problem starts within file, first char
* is 0, inclusive, tab count as one. If unknown return -1.
*/
int getStartingChar();
/**
- *
+ *
* @return character position where problem ends within file, first char is
* 0, exclusive, tab count as one. If unknown return -1.
*/
int getEndingChar();
/**
- *
- * @return extra data for the problem location, checker specific, can be
+ *
+ * @return extra data for problem location, checker specific, can be
* backtrace for example
*/
Object getData();

Back to the top