1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Follow up for Bug 280909: Fixes a NPE.

This commit is contained in:
Markus Schorn 2010-01-14 13:21:01 +00:00
parent e27412e7dd
commit 88e259d1f8

View file

@ -3252,7 +3252,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
// Handle ambiguity between parameter pack and varargs.
if (pd != null) {
ICPPASTDeclarator dtor = pd.getDeclarator();
if (!(dtor instanceof IASTAmbiguousDeclarator)) {
if (dtor != null && !(dtor instanceof IASTAmbiguousDeclarator)) {
if (dtor.declaresParameterPack() && dtor.getNestedDeclarator() == null
&& dtor.getInitializer() == null && dtor.getName().getSimpleID().length == 0) {
((IASTAmbiguityParent) fc).replace(pd, new CPPASTAmbiguousParameterDeclaration(pd));