mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
238852: suppress @param for f(void) parameter
This commit is contained in:
parent
c1f5fbcb8f
commit
3b92e498e8
2 changed files with 17 additions and 0 deletions
|
@ -434,6 +434,17 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit
|
|||
assertAutoEditBehaviour();
|
||||
}
|
||||
|
||||
// /**X
|
||||
// void foo(void) {}
|
||||
|
||||
// /**
|
||||
// * X
|
||||
// */
|
||||
// void foo(void) {}
|
||||
public void testAutoDocCommentContent21_238852() throws CoreException {
|
||||
assertAutoEditBehaviour();
|
||||
}
|
||||
|
||||
/** Declarations **/
|
||||
|
||||
// /**X
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration;
|
||||
import org.eclipse.cdt.ui.text.doctools.DefaultMultilineCommentAutoEditStrategy;
|
||||
|
||||
|
@ -87,6 +88,11 @@ public class DoxygenMultilineAutoEditStrategy extends DefaultMultilineCommentAut
|
|||
StringBuilder result= new StringBuilder();
|
||||
for(int i=0; i<decls.length; i++) {
|
||||
IASTDeclarator dtor= decls[i].getDeclarator();
|
||||
if(decls[i].getDeclSpecifier() instanceof IASTSimpleDeclSpecifier) {
|
||||
if(((IASTSimpleDeclSpecifier)decls[i].getDeclSpecifier()).getType() == IASTSimpleDeclSpecifier.t_void) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
result.append(PARAM+dtor.getName()+"\n"); //$NON-NLS-1$
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Add table
Reference in a new issue