[LLVMbugs] [Bug 13618] New: RecursiveASTVisitor: VisitTypeOfExprType doesn't get called

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 16 07:29:48 PDT 2012


             Bug #: 13618
           Summary: RecursiveASTVisitor: VisitTypeOfExprType doesn't get
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sergejs.belajevs at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I wrote this simple recursive AST visitor:

class MyVisitor : public clang::RecursiveASTVisitor<MyVisitor>
    MyVisitor() {}

    bool VisitTypeOfExprType(clang::TypeOfExprType* t)
        printf("Visiting typeof expr type!\n");
        return true;

And ran it on AST of the following code (found in one open-source project):


void foo()
  int status = 0;

  status = ((((__extension__ (((union { __typeof(status) __in; int __i; }) {
.__in = (status) }).__i))) & 0xff00) >> 8);

  status = ({ union { __typeof(status) __in; int __i; } a; a.__in = status;
(a.__i & 0xff00) >> 8; });

I got only one "Visiting typeof expr type!" as a result, for the 2nd anonymous
union. I cannot find a way how to catch __typeof of the first anonymous union
with RAV.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list