Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2009-01-16 09:55:08 -0500
committerMarkus Schorn2009-01-16 09:55:08 -0500
commitc2436fcb020f191a5da45f2e4886b570396c459f (patch)
tree5457746060ba44c7dd6c6ef3d08702c19c2790d1 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter
parent9bc33989660e32ce0444a3685c3519c537e2399e (diff)
downloadorg.eclipse.cdt-c2436fcb020f191a5da45f2e4886b570396c459f.tar.gz
org.eclipse.cdt-c2436fcb020f191a5da45f2e4886b570396c459f.tar.xz
org.eclipse.cdt-c2436fcb020f191a5da45f2e4886b570396c459f.zip
Removes the need to flush the cache of c++-scopes, bug 259373.
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.java11
1 files changed, 4 insertions, 7 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 677c3af516..5bba3c9ac1 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik
+ * Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -37,8 +37,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTExplicitTemplateInstantiation;
import org.eclipse.cdt.core.parser.Keywords;
-import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousDeclaration;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
+import org.eclipse.cdt.internal.core.dom.parser.ASTQueries;
import org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.NodeCommentMap;
@@ -74,9 +73,7 @@ public class DeclarationWriter extends NodeWriter{
protected void writeDeclaration(IASTDeclaration declaration, boolean writeSemicolon) {
boolean addNewLine = true;
printSemicolon = writeSemicolon;
- if (declaration instanceof IASTAmbiguousDeclaration) {
- //Not implemented
- } else if (declaration instanceof IASTASMDeclaration) {
+ if (declaration instanceof IASTASMDeclaration) {
writeASMDeclatation((IASTASMDeclaration) declaration);
} else if (declaration instanceof IASTFunctionDefinition) {
writeFunctionDefinition((IASTFunctionDefinition) declaration);
@@ -282,7 +279,7 @@ public class DeclarationWriter extends NodeWriter{
}else {
scribe.printSpace();
}
- IASTDeclarator declarator = CPPVisitor.findOutermostDeclarator(funcDef.getDeclarator());
+ IASTDeclarator declarator = ASTQueries.findOutermostDeclarator(funcDef.getDeclarator());
declarator.accept(visitor);
if (funcDef instanceof ICPPASTFunctionWithTryBlock) {

Back to the top