[cfe-dev] AST bug parsing tags.cpp file?

Billy Araujo via cfe-dev cfe-dev at lists.llvm.org
Wed Jul 29 07:40:29 PDT 2020


Hi,

On project opentoonz there is a file called:
opentoonz/toonz/sources/image/pli/tags.cp

If I run clang-check, the AST it builds seems wrong.

clang-check -ast-dump /home/opentoonz/toonz/sources/image/pli/tags.cpp |
grep -B 1 -A 1 "~ColorTag"

    |-CXXMemberCallExpr 0x22893e8 <line:253:1, col:21> 'void'
    | `-MemberExpr 0x22893a0 <col:1, col:12> '<bound member function type>'
->~ColorTag 0x2274c00
    |   `-CXXThisExpr 0x2289390 <col:11> 'ColorTag *' implicit this

Line 253 appears as a CXXMemberCallExpr instead of a CXXDestructorDecl.

So the AST thinks it is calling an explicit destructor method call although
it is a destructor implementation.

clang-check --version
LLVM (http://llvm.org/):
  LLVM version 10.0.0

  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: nehalem

Is this a bug or am I missing something?

Regards,

Billy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200729/859e9a13/attachment.html>


More information about the cfe-dev mailing list