1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-04-15 19:32:26 -07:00
parent be137ca311
commit 7366607b69
3 changed files with 13 additions and 19 deletions

View file

@ -61,13 +61,10 @@ public class ProblemBindingChecker extends AbstractIndexAstChecker {
return true;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.codan.core.model.AbstractCheckerWithProblemPreferences#initPreferences(org.eclipse.cdt.codan.core.model.IProblemWorkingCopy)
*/
@Override
public void initPreferences(IProblemWorkingCopy problem) {
super.initPreferences(problem);
// these checkers should not run on full or incremental build
// This checker should not run on full or incremental build
getLaunchModePreference(problem).enableInLaunchModes(CheckerLaunchMode.RUN_AS_YOU_TYPE, CheckerLaunchMode.RUN_ON_DEMAND);
}
@ -150,9 +147,8 @@ public class ProblemBindingChecker extends AbstractIndexAstChecker {
handleMemberProblem(name, parentNode, problemBinding, contextFlagsString);
} else if (parentNode instanceof IASTNamedTypeSpecifier) {
reportProblem(ERR_ID_TypeResolutionProblem, name, name.getRawSignature(), contextFlagsString);
}
} else {
// Probably a variable
else {
handleVariableProblem(name, contextFlagsString);
}
}

View file

@ -800,7 +800,8 @@ class ASTMacroExpansionLocation implements IASTMacroExpansionLocation, org.eclip
@Override
public IASTFileLocation asFileLocation() {
return ((LocationCtxContainer) fContext.getParent()).createFileLocation(fContext.fOffsetInParent, fContext.fEndOffsetInParent-fContext.fOffsetInParent);
return ((LocationCtxContainer) fContext.getParent()).createFileLocation(fContext.fOffsetInParent,
fContext.fEndOffsetInParent - fContext.fOffsetInParent);
}
@Override

View file

@ -12,7 +12,6 @@ package org.eclipse.cdt.internal.core.parser.scanner;
import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@ -657,11 +656,10 @@ public class LocationMap implements ILocationResolver {
@Override
public IASTPreprocessorMacroDefinition[] getMacroDefinitions() {
ArrayList<Object> result= new ArrayList<Object>();
for (Iterator<ASTPreprocessorNode> iterator = fDirectives.iterator(); iterator.hasNext();) {
Object directive= iterator.next();
ArrayList<IASTPreprocessorMacroDefinition> result= new ArrayList<IASTPreprocessorMacroDefinition>();
for (ASTPreprocessorNode directive : fDirectives) {
if (directive instanceof IASTPreprocessorMacroDefinition) {
result.add(directive);
result.add((IASTPreprocessorMacroDefinition) directive);
}
}
return result.toArray(new IASTPreprocessorMacroDefinition[result.size()]);
@ -669,11 +667,10 @@ public class LocationMap implements ILocationResolver {
@Override
public IASTPreprocessorIncludeStatement[] getIncludeDirectives() {
ArrayList<Object> result= new ArrayList<Object>();
for (Iterator<ASTPreprocessorNode> iterator = fDirectives.iterator(); iterator.hasNext();) {
Object directive= iterator.next();
ArrayList<IASTPreprocessorIncludeStatement> result= new ArrayList<IASTPreprocessorIncludeStatement>();
for (ASTPreprocessorNode directive : fDirectives) {
if (directive instanceof IASTPreprocessorIncludeStatement) {
result.add(directive);
result.add((IASTPreprocessorIncludeStatement) directive);
}
}
return result.toArray(new IASTPreprocessorIncludeStatement[result.size()]);