[LLVMbugs] [Bug 3748] New: ImplicitValueExpr appears inside MemberExpr.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Mar 7 02:52:53 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=3748

           Summary: ImplicitValueExpr appears inside MemberExpr.
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bolzoni at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu, bagnara at cs.unipr.it


Test case:
code.c --->
struct S2{ void* d; };

unsigned f()
{
   return __builtin_offsetof (struct S2, d);
}
---<

--->
$ clang -ast-dump code.c
(CompoundStmt 0x1fb2100 <code.c:5:1, line:7:1>
  (ReturnStmt 0x1fb3240 <line:6:4, col:42>
    (ImplicitCastExpr 0x1fb3200 <col:11, col:42> 'unsigned int'
      (UnaryOperator 0x1fb31c0 <col:11, col:42> 'unsigned long' prefix
'__builtin_offsetof'
        (MemberExpr 0x1fb3180 <<invalid sloc>, col:42> 'void *' .d 0x1fb2fe0
          (UnaryOperator 0x1fb4310 <<invalid sloc>> 'struct S2' prefix '*'
            (ImplicitValueInitExpr 0x1fb3110 <<invalid sloc>> 'struct S2
*')))))))
typedef struct __va_list_tag __builtin_va_list[1];
Read top-level variable decl: 'S2'

unsigned int f()
---<
The last two lines of the f definition's compound statement should not be
there.


-- 
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