[LLVMbugs] [Bug 7952] New: dyn_cast<> on multi-level pointers causes errors

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 20 11:21:01 PDT 2010


           Summary: dyn_cast<> on multi-level pointers causes errors
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rideau3 at gmail.com
                CC: llvmbugs at cs.uiuc.edu

The isa<> template will succesfully work on a multi-level pointer, while the
cast<> template will not. This has unfortunate implications for dyn_cast<>,
because it performs an isa<> followed immediately by a cast<>. If a multi-level
pointer is used and the isa<> succeeds, a garbage value is returned.

(A multi-level pointer is something like Base**)

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