[PATCH] D52791: [Diagnostics] Check for misleading pointer declarations

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 3 22:10:32 PDT 2018


xbolva00 added a comment.

void test(void) {

  int *a;
  int* b;

}

TranslationUnitDecl
`-FunctionDecl <line:4:1, line:7:1> line:4:6 test 'void ()'

  `-CompoundStmt <col:17, line:7:1>
    |-DeclStmt <line:5:5, col:11>
    | `-VarDecl <col:5, col:10> col:10 a 'int *'
    `-DeclStmt <line:6:5, col:11>
      `-VarDecl <col:5, col:10> col:10 b 'int *'

Why not 'int*' in ast dump?


https://reviews.llvm.org/D52791





More information about the cfe-commits mailing list