fuzzyc2cpg
fuzzyc2cpg copied to clipboard
Escape characters in function names
Description
The CPG contains function names with escape sequences, eg. CHAT_PROTOCOL(server)->\\n\\t\\t\\tquery_create
. It seems to be a parsing error of:
query = CHAT_PROTOCOL(server)->
query_create(server->tag, nick, TRUE);
See: https://github.com/irssi/irssi/blob/master/src/fe-common/core/fe-queries.c#L53-L54
Reproduction steps
- CPG creation:
$ git clone https://github.com/irssi/irssi
$ ./fuzzyc2cpg.sh irssi/src/ --out irssi.bin.zip
- Load the CPG and search the function
ocular> loadCpg("irssi.bin.zip")
ocular> cpg.method.fullName("CHAT.*query_create.*").fullName.p
res5: List[String] = List("CHAT_PROTOCOL(server)->\\n\\t\\t\\tquery_create")