mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 04:15:35 +02:00
Bug 535557 - Avoid setting a null lookup point in SizeofCalculator.sizeAndAlignment()
Change-Id: I50974c7b74ef511aae96e2ce2a9a3b96ecbdb594
This commit is contained in:
parent
2ca147ebf1
commit
8792d9d5a6
1 changed files with 6 additions and 2 deletions
|
@ -291,7 +291,9 @@ public class SizeofCalculator {
|
||||||
int maxAlignment = 1;
|
int maxAlignment = 1;
|
||||||
IField[] fields;
|
IField[] fields;
|
||||||
if (type instanceof ICPPClassType) {
|
if (type instanceof ICPPClassType) {
|
||||||
CPPSemantics.pushLookupPoint(ast);
|
if (ast != null) {
|
||||||
|
CPPSemantics.pushLookupPoint(ast);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
ICPPClassType classType = (ICPPClassType) type;
|
ICPPClassType classType = (ICPPClassType) type;
|
||||||
for (ICPPBase base : classType.getBases()) {
|
for (ICPPBase base : classType.getBases()) {
|
||||||
|
@ -315,7 +317,9 @@ public class SizeofCalculator {
|
||||||
}
|
}
|
||||||
fields = classType.getDeclaredFields();
|
fields = classType.getDeclaredFields();
|
||||||
} finally {
|
} finally {
|
||||||
CPPSemantics.popLookupPoint();
|
if (ast != null) {
|
||||||
|
CPPSemantics.popLookupPoint();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fields = type.getFields();
|
fields = type.getFields();
|
||||||
|
|
Loading…
Add table
Reference in a new issue