mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +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;
|
||||
IField[] fields;
|
||||
if (type instanceof ICPPClassType) {
|
||||
CPPSemantics.pushLookupPoint(ast);
|
||||
if (ast != null) {
|
||||
CPPSemantics.pushLookupPoint(ast);
|
||||
}
|
||||
try {
|
||||
ICPPClassType classType = (ICPPClassType) type;
|
||||
for (ICPPBase base : classType.getBases()) {
|
||||
|
@ -315,7 +317,9 @@ public class SizeofCalculator {
|
|||
}
|
||||
fields = classType.getDeclaredFields();
|
||||
} finally {
|
||||
CPPSemantics.popLookupPoint();
|
||||
if (ast != null) {
|
||||
CPPSemantics.popLookupPoint();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fields = type.getFields();
|
||||
|
|
Loading…
Add table
Reference in a new issue