I've identified the following test case resources, where duplicate AST nodes occur:
src/test/resources/calls/defaultargs/defaultInDeclaration.cpp
Literal[location=defaultInDeclaration.cpp(5:20-5:21),type=IntegerType[name=int],value=3] -> 2
src/test/resources/templates/classtemplates/pair3-1.cpp
Literal[location=pair3-1.cpp(13:20-13:21),type=IntegerType[name=int],value=2] -> 2
src/test/resources/templates/classtemplates/pair3-2.cpp
Literal[location=pair3-2.cpp(4:50-4:51),type=IntegerType[name=int],value=1] -> 3
src/test/resources/templates/classtemplates/array.cpp
Literal[location=array.cpp(4:28-4:30),type=IntegerType[name=int],value=10] -> 2
src/test/resources/templates/functiontemplates/functionTemplateInvocation8.cpp
Function[name=fixed_division,location=<null>,parameters=[Parameter[name=int0,location=<null>]]] -> 2
src/test/resources/templates/functiontemplates/functionTemplateInvocation3.cpp
Literal[location=functionTemplateInvocation3.cpp(4:30-4:31),type=IntegerType[name=int],value=5] -> 2
src/test/resources/templates/functiontemplates/functionTemplateMethod.cpp
Literal[location=functionTemplateMethod.cpp(6:34-6:35),type=IntegerType[name=int],value=5] -> 2
src/test/resources/templates/functiontemplates/functionTemplateInvocation4.cpp
TypeExpression[name=int,location=<null>,type=IntegerType[name=int]] -> 2
src/test/resources/templates/functiontemplates/functionTemplateInvocation2.cpp
Literal[location=functionTemplateInvocation2.cpp(4:30-4:31),type=IntegerType[name=int],value=5] -> 2
src/test/resources/templates/functiontemplates/functionTemplateInvocation7.cpp
Function[name=f,location=<null>,parameters=[Parameter[name=int0,location=<null>], Parameter[name=char1,location=<null>]]] -> 2
src/test/resources/templates/functiontemplates/functionTemplateInvocation6.cpp
Literal[location=functionTemplateInvocation6.cpp(4:30-4:31),type=IntegerType[name=int],value=5] -> 2
src/test/resources/templates/functiontemplates/functionTemplateInvocation5.cpp
Literal[location=functionTemplateInvocation5.cpp(4:30-4:31),type=IntegerType[name=int],value=5] -> 2
Initial analysis:
In the cases with the Literals it seems that default values for function parameters and template arguments are reused.
I've identified the following test case resources, where duplicate AST nodes occur:
Literal[location=defaultInDeclaration.cpp(5:20-5:21),type=IntegerType[name=int],value=3] -> 2Literal[location=pair3-1.cpp(13:20-13:21),type=IntegerType[name=int],value=2] -> 2Literal[location=pair3-2.cpp(4:50-4:51),type=IntegerType[name=int],value=1] -> 3Literal[location=array.cpp(4:28-4:30),type=IntegerType[name=int],value=10] -> 2Function[name=fixed_division,location=<null>,parameters=[Parameter[name=int0,location=<null>]]] -> 2Literal[location=functionTemplateInvocation3.cpp(4:30-4:31),type=IntegerType[name=int],value=5] -> 2Literal[location=functionTemplateMethod.cpp(6:34-6:35),type=IntegerType[name=int],value=5] -> 2TypeExpression[name=int,location=<null>,type=IntegerType[name=int]] -> 2Literal[location=functionTemplateInvocation2.cpp(4:30-4:31),type=IntegerType[name=int],value=5] -> 2Function[name=f,location=<null>,parameters=[Parameter[name=int0,location=<null>], Parameter[name=char1,location=<null>]]] -> 2Literal[location=functionTemplateInvocation6.cpp(4:30-4:31),type=IntegerType[name=int],value=5] -> 2Literal[location=functionTemplateInvocation5.cpp(4:30-4:31),type=IntegerType[name=int],value=5] -> 2Initial analysis:
Literals it seems that default values for function parameters and template arguments are reused.