diff --git a/joern-cli/frontends/c2cpg/src/main/scala/io/joern/c2cpg/astcreation/AstCreatorHelper.scala b/joern-cli/frontends/c2cpg/src/main/scala/io/joern/c2cpg/astcreation/AstCreatorHelper.scala index 3e3210f24d37..475e94389b87 100644 --- a/joern-cli/frontends/c2cpg/src/main/scala/io/joern/c2cpg/astcreation/AstCreatorHelper.scala +++ b/joern-cli/frontends/c2cpg/src/main/scala/io/joern/c2cpg/astcreation/AstCreatorHelper.scala @@ -42,7 +42,7 @@ object AstCreatorHelper { trait AstCreatorHelper(implicit withSchemaValidation: ValidationMode) { this: AstCreator => - import io.joern.c2cpg.astcreation.AstCreatorHelper._ + import io.joern.c2cpg.astcreation.AstCreatorHelper.* private var usedVariablePostfix: Int = 0 @@ -340,12 +340,12 @@ trait AstCreatorHelper(implicit withSchemaValidation: ValidationMode) { this: As s"${fullName(f.getParent)}.${shortName(f)}" case e: IASTElaboratedTypeSpecifier => s"${fullName(e.getParent)}.${ASTStringUtil.getSimpleName(e.getName)}" - case d: IASTIdExpression => ASTStringUtil.getSimpleName(d.getName) - case _: IASTTranslationUnit => "" - case u: IASTUnaryExpression => code(u.getOperand) - case other if other.getParent != null => fullName(other.getParent) - case other if other != null => notHandledYet(other); "" - case null => "" + case d: IASTIdExpression => ASTStringUtil.getSimpleName(d.getName) + case _: IASTTranslationUnit => "" + case u: IASTUnaryExpression => code(u.getOperand) + case other if other != null && other.getParent != null => fullName(other.getParent) + case other if other != null => notHandledYet(other); "" + case null => "" } fixQualifiedName(qualifiedName).stripPrefix(".") }