mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
Cosmetics.
This commit is contained in:
parent
a45fabad98
commit
a205557db0
1 changed files with 11 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2012 IBM Corporation and others.
|
* Copyright (c) 2004, 2013 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -72,7 +72,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
|
||||||
|
|
||||||
private static final int FULLY_RESOLVED = 1;
|
private static final int FULLY_RESOLVED = 1;
|
||||||
private static final int RESOLUTION_IN_PROGRESS = 1 << 1;
|
private static final int RESOLUTION_IN_PROGRESS = 1 << 1;
|
||||||
private int bits = 0;
|
private int bits;
|
||||||
|
|
||||||
public CPPFunction(IASTDeclarator declarator) {
|
public CPPFunction(IASTDeclarator declarator) {
|
||||||
if (declarator != null) {
|
if (declarator != null) {
|
||||||
|
@ -99,7 +99,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
|
||||||
} else if (declarations != null) {
|
} else if (declarations != null) {
|
||||||
tu = declarations[0].getTranslationUnit();
|
tu = declarations[0].getTranslationUnit();
|
||||||
} else {
|
} else {
|
||||||
//implicit binding
|
// Implicit binding
|
||||||
IScope scope = getScope();
|
IScope scope = getScope();
|
||||||
IASTNode node = ASTInternal.getPhysicalNodeOfScope(scope);
|
IASTNode node = ASTInternal.getPhysicalNodeOfScope(scope);
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
|
@ -464,22 +464,25 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
|
||||||
do {
|
do {
|
||||||
if (dtor != null) {
|
if (dtor != null) {
|
||||||
IASTNode parent = dtor.getParent();
|
IASTNode parent = dtor.getParent();
|
||||||
while (!(parent instanceof IASTDeclaration))
|
while (!(parent instanceof IASTDeclaration)) {
|
||||||
parent = parent.getParent();
|
parent = parent.getParent();
|
||||||
|
}
|
||||||
|
|
||||||
IASTDeclSpecifier declSpec = null;
|
IASTDeclSpecifier declSpec = null;
|
||||||
if (parent instanceof IASTSimpleDeclaration)
|
if (parent instanceof IASTSimpleDeclaration) {
|
||||||
declSpec = ((IASTSimpleDeclaration)parent).getDeclSpecifier();
|
declSpec = ((IASTSimpleDeclaration)parent).getDeclSpecifier();
|
||||||
else if (parent instanceof IASTFunctionDefinition)
|
} else if (parent instanceof IASTFunctionDefinition) {
|
||||||
declSpec = ((IASTFunctionDefinition)parent).getDeclSpecifier();
|
declSpec = ((IASTFunctionDefinition)parent).getDeclSpecifier();
|
||||||
|
}
|
||||||
|
|
||||||
if (declSpec != null && declSpec.isInline())
|
if (declSpec != null && declSpec.isInline())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (ds != null && ++i < ds.length)
|
if (ds != null && ++i < ds.length) {
|
||||||
dtor = ds[i];
|
dtor = ds[i];
|
||||||
else
|
} else {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
} while (dtor != null);
|
} while (dtor != null);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue