[LLVMbugs] [Bug 16392] New: Wrong location for Objective-C message call argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 20 13:05:34 PDT 2013


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

            Bug ID: 16392
           Summary: Wrong location for Objective-C message call argument
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: martins.mozeiko at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Following code sample has wrong argument location in AST.

struct RR
{
    int i;
};
typedef struct RR RR;

@interface KK
{
}

- (void) init: (RR)arg;

@end

void foo()
{
    RR z;

    KK* k;
    [k init:z];
}

When dumping AST using commandline "clang -cc1 -x objective-c++ -ast-dump
test.mm" you get following tree (I'm showing only part of it):

    `-ObjCMessageExpr 0x1a1558 <line:20:5, col:14> 'void' selector=init:
      |-ImplicitCastExpr 0x1a1390 <col:6> 'KK *' <LValueToRValue>
      | `-DeclRefExpr 0x1a1360 <col:6> 'KK *' lvalue Var 0x1a1320 'k' 'KK *'
      `-CXXConstructExpr 0x1a1450 <col:8, col:13> 'RR':'struct RR' 'void (const
struct RR &) throw()'
        `-ImplicitCastExpr 0x1a13a0 <col:13> 'const struct RR' lvalue <NoOp>
          `-DeclRefExpr 0x1a1378 <col:13> 'RR':'struct RR' lvalue Var 0x1a10b0
'z' 'RR':'struct RR'

It says that CXXConstructExpr begins at column 8, while it should begin at
column 13.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130620/5697cb95/attachment.html>


More information about the llvm-bugs mailing list