diff options
author | Emanuel Graf | 2011-01-04 14:50:52 +0000 |
---|---|---|
committer | Emanuel Graf | 2011-01-04 14:50:52 +0000 |
commit | 41bb986be0a50e56682a60137d50743df9e07270 (patch) | |
tree | 8841cb7e95bdc758bdefc52efeee264e4e6ff7c5 /core/org.eclipse.cdt.core | |
parent | 6361cd423147f917dfa76d95dddcbbfd203fdca5 (diff) | |
download | org.eclipse.cdt-41bb986be0a50e56682a60137d50743df9e07270.tar.gz org.eclipse.cdt-41bb986be0a50e56682a60137d50743df9e07270.tar.xz org.eclipse.cdt-41bb986be0a50e56682a60137d50743df9e07270.zip |
Bug 296192: Extract method removes essential macros and breaks formatting
https://bugs.eclipse.org/bugs/show_bug.cgi?id=296192
Bugfix patch that fixes a case where comments at the end of a block are lost for C code (Comment #2)
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenterVisitor.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenterVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenterVisitor.java index c2c62008128..503dc28ebdf 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenterVisitor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/ASTCommenterVisitor.java @@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.core.dom.rewrite.commenthandler; import org.eclipse.cdt.core.dom.ast.IASTComment; +import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement; import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier; import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTDeclarator; @@ -29,7 +30,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter; import org.eclipse.cdt.internal.core.dom.parser.ASTNode; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompositeTypeSpecifier; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompoundStatement; /** * A visitor for the comments. Calls the NodeCommenter to assign the comments. @@ -175,7 +175,7 @@ public class ASTCommenterVisitor extends CPPASTVisitor { } @Override public int leave(IASTStatement statement) { - if(statement instanceof CPPASTCompoundStatement) { + if(statement instanceof IASTCompoundStatement) { return nodeCommenter.appendFreestandingComments((ASTNode)statement); } nodeCommenter.appendComments((ASTNode)statement); |