@Test public void testDoNotStripStruct() throws Exception { final String original = "" + "struct S { int a; };" + "void main() {" + " S myS;" + "}"; final TranslationUnit tu = ParseHelper.parse(original); StripUnusedGlobals.strip(tu); CompareAsts.assertEqualAsts(original, tu); }
public static void strip(TranslationUnit tu) { new StripUnusedGlobals(tu); }
StripUnusedGlobals extends ScopeTrackingVisitor { public static void strip(TranslationUnit tu) { new StripUnusedGlobals(tu); } }
StripUnusedGlobals extends ScopeTrackingVisitor { public static void strip(TranslationUnit tu) { new StripUnusedGlobals(tu); } private  StripUnusedGlobals(TranslationUnit tu); }
StripUnusedGlobals extends ScopeTrackingVisitor { public static void strip(TranslationUnit tu) { new StripUnusedGlobals(tu); } private  StripUnusedGlobals(TranslationUnit tu); static void strip(TranslationUnit tu); @Override void visitVariablesDeclaration(VariablesDeclaration variablesDeclaration); @Override void visitStructNameType(StructNameType structNameType); @Override void visitTypeConstructorExpr(TypeConstructorExpr typeConstructorExpr); @Override void visitVariableDeclInfo(VariableDeclInfo variableDeclInfo); @Override void visitVariableIdentifierExpr(VariableIdentifierExpr variableIdentifierExpr); }
StripUnusedGlobals extends ScopeTrackingVisitor { public static void strip(TranslationUnit tu) { new StripUnusedGlobals(tu); } private  StripUnusedGlobals(TranslationUnit tu); static void strip(TranslationUnit tu); @Override void visitVariablesDeclaration(VariablesDeclaration variablesDeclaration); @Override void visitStructNameType(StructNameType structNameType); @Override void visitTypeConstructorExpr(TypeConstructorExpr typeConstructorExpr); @Override void visitVariableDeclInfo(VariableDeclInfo variableDeclInfo); @Override void visitVariableIdentifierExpr(VariableIdentifierExpr variableIdentifierExpr);  }