joern
joern copied to clipboard
(C/C++) "TYPE_DECL" node has empty label in dot output
This is the code:
struct R
{
int a;
} r;
This is the attribute of "TYPE_DECL" node "R":
"7": {
"inheritsFromTypeFullName": [],
"name": "R",
"astParentFullName": "",
"fullName": "R",
"astParentType": "",
"_label": "TYPE_DECL",
"code": "struct R",
"isExternal": false,
"id": 7,
"order": 1,
"filename": "/root/workspace/slice/testcase1/tmpdir/a.c"
},
This ast dot file of global function is:
digraph "<global>" {
"5" [label = <(METHOD,<global>)<SUB>30</SUB>> ]
"6" [label = <(BLOCK,<empty>,<empty>)> ]
"7" [label = <> ]
"8" [label = <<SUB>32</SUB>> ]
"9" [label = <<SUB>33</SUB>> ]
"10" [label = <> ]
"11" [label = <(LOCAL,struct R s: R)<SUB>35</SUB>> ]
"12" [label = <(METHOD,main)<SUB>37</SUB>> ]
"13" [label = <(BLOCK,<empty>,<empty>)<SUB>38</SUB>> ]
"14" [label = <(RETURN,return 0;,return 0;)<SUB>39</SUB>> ]
"15" [label = <(LITERAL,0,return 0;)<SUB>39</SUB>> ]
"16" [label = <(METHOD_RETURN,int)<SUB>37</SUB>> ]
"18" [label = <(METHOD_RETURN,ANY)> ]
"5" -> "6"
"5" -> "18"
"6" -> "7"
"6" -> "9"
"6" -> "10"
"6" -> "11"
"6" -> "12"
"7" -> "8"
"12" -> "13"
"12" -> "16"
"13" -> "14"
"14" -> "15"
}
The dot "7" has empty labe l (label = <>
), this is an error in syntax?
This dot file couldn't be used to generate graph picture at my computer because of this syntax error.
And there are so many "<", ">", "<SUB>" and "</SUB>", is something wrong with them?
The "<", ">", "<SUB>" and "</SUB>" lines are from #1349 as part of adding line number information to each node to map back to source code
The "<", ">", "<SUB>" and "</SUB>" lines are from #1349 as part of adding line number information to each node to map back to source code
Got it, thanks.
Closing, because the issue seems to be "solved". Please re-open it if this is not the case :)