mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Cosmetics.
This commit is contained in:
parent
be137ca311
commit
7366607b69
3 changed files with 13 additions and 19 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -555,10 +555,10 @@ class ASTFunctionStyleMacroDefinition extends ASTMacroDefinition implements IAST
|
|||
int endIdx= Math.min(fExpansionNumber - defOffset, image.length);
|
||||
char start= '(';
|
||||
for (int i = 0; i < result.length; i++) {
|
||||
while(idx < endIdx && image[idx] != start)
|
||||
while (idx < endIdx && image[idx] != start)
|
||||
idx++;
|
||||
idx++;
|
||||
while(idx < endIdx && Character.isWhitespace(image[idx]))
|
||||
while (idx < endIdx && Character.isWhitespace(image[idx]))
|
||||
idx++;
|
||||
start= ',';
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -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()]);
|
||||
|
|
Loading…
Add table
Reference in a new issue