[PATCH] D26054: Use `getFileLoc()` instead of `getSpellingLoc()` in the ASTImporter

Rafael Stahl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 3 07:40:16 PDT 2018


r.stahl added a comment.

It puts everything at the start of the marco expansion.

  `-FunctionDecl 0x12f5218 prev 0x12f4fa0 <line:12:1, line:16:1> line:12:5 used foo 'int ()'
    `-CompoundStmt 0x12f5600 <line:13:1, line:16:1>
      |-DeclStmt 0x12f5508 <line:14:5, col:29>
      | `-VarDecl 0x12f5470 <col:5, col:19> col:15 used s 'struct S *' cinit
      |   `-ImplicitCastExpr 0x12f54f0 <col:19> 'struct S *' <IntegralToPointer>
      |     `-IntegerLiteral 0x12f54d0 <col:19> 'unsigned int' 2147516416
      `-ParenExpr 0x12f55e0 <line:15:5> 'int'
        `-BinaryOperator 0x12f55b8 <col:5> 'int' '='
          |-MemberExpr 0x12f5560 <col:5> 'int' lvalue ->a 0x12f5378
          | `-ImplicitCastExpr 0x12f5548 <col:5> 'struct S *' <LValueToRValue>
          |   `-DeclRefExpr 0x12f5520 <col:5> 'struct S *' lvalue Var 0x12f5470 's' 'struct S *'
          `-IntegerLiteral 0x12f5598 <col:5> 'int' 0


https://reviews.llvm.org/D26054





More information about the cfe-commits mailing list