Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-03-13 20:37:27 -0400
committerSergey Prigogin2012-03-13 20:55:38 -0400
commit0f4f703be222407956acec285388fd0fd5c369b3 (patch)
tree3ea50e3daea6c7b8d0df18f2e31eeb23515738b5 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter
parent723ed9f9128d127c36e60f1c4e8c7d122494f342 (diff)
downloadorg.eclipse.cdt-0f4f703be222407956acec285388fd0fd5c369b3.tar.gz
org.eclipse.cdt-0f4f703be222407956acec285388fd0fd5c369b3.tar.xz
org.eclipse.cdt-0f4f703be222407956acec285388fd0fd5c369b3.zip
Determination of output parameters for extracting function from
inside conditional statements and loops.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java
index 29e21800a7..2e4f6fcc36 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/DeclarationWriter.java
@@ -259,7 +259,8 @@ public class DeclarationWriter extends NodeWriter {
private void writeFunctionDefinition(IASTFunctionDefinition funcDef) {
IASTDeclSpecifier declSpecifier = funcDef.getDeclSpecifier();
- declSpecifier.accept(visitor);
+ if (declSpecifier != null)
+ declSpecifier.accept(visitor);
if (declSpecifier instanceof IASTSimpleDeclSpecifier) {
IASTSimpleDeclSpecifier simDeclSpec = (IASTSimpleDeclSpecifier) declSpecifier;
if (simDeclSpec.getType() != IASTSimpleDeclSpecifier.t_unspecified) {

Back to the top