[ClavaAst] Fixes bug when returning classes that are identified as Attr
@@ -118,11 +118,22 @@ public class ClassesService {
} catch (ClassNotFoundException e) {
// Before throwing exception, try some cases
- if (clangClassname.endsWith("Attr") && !WARNED_CLASSES.contains(clangClassname)) {
+ // if (clangClassname.endsWith("Attr") && !WARNED_CLASSES.contains(clangClassname)) {
+ // WARNED_CLASSES.add(clangClassname);
+ //
+ // ClavaLog.info("No parser defined for attribute '" + clangClassname
+ // + "', using generic attribute parser with no arguments");
+ //
+ // return Attribute.class;
+ // }
+
+ if (clangClassname.endsWith("Attr")) {
+ if (!WARNED_CLASSES.contains(clangClassname)) {
WARNED_CLASSES.add(clangClassname);
ClavaLog.info("No parser defined for attribute '" + clangClassname
+ "', using generic attribute parser with no arguments");
+ }
return Attribute.class;
}
