<div dir="ltr">Hello,<div><br></div><div>Consider the following example:</div><div><br></div><div><div>  class Foo {</div><div>    int* create_process(int pid, const char* name);</div><div>  };</div><div><br></div><div>  int *Foo::create_process2(int pid, const char* name) {</div><div>    return 0;</div><div>  }</div></div><div><br></div><div>If I run '-ast-dump' on the example above, clang dumps the AST with the method create_process2 renamed to create_process:</div><div><br></div><div><div>`-CXXMethodDecl 0x7f90ca07ccd0 parent 0x7f90ca07c050 prev 0x7f90ca07c398 <line:5:1, line:7:1> line:5:11 create_process 'int *(int, const char *)'</div><div>  |-ParmVarDecl 0x7f90ca07c480 <col:27, col:31> col:31 pid 'int'</div><div>  |-ParmVarDecl 0x7f90ca07c4f0 <col:36, col:48> col:48 name 'const char *'</div><div>  `-CompoundStmt 0x7f90ca800dc0 <col:54, line:7:1></div><div>    `-ReturnStmt 0x7f90ca800da8 <line:6:3, col:10></div><div>      `-ImplicitCastExpr 0x7f90ca800d90 <col:10> 'int *' <NullToPointer></div><div>        `-IntegerLiteral 0x7f90ca800d70 <col:10> 'int' 0</div></div><div><br></div><div>This happens due to automatic renaming when recovering from this error: "out-of-line definition of 'create_process2' does not match any declaration in 'Foo'; did you mean 'create_process'?". </div><div><br></div><div>I would like clang to parse the example without performing this automatic rename, i.e. create_process2 should keep its original name (or at least it should know that it was renamed to create_process and that the original name was create_process2). Is there a command line option that disables this kind of renaming, or is there any other way to determine that such a rename has occurred?</div><div><br></div><div>Thanks,</div><div>Alex</div><div><div><br></div></div><div><br></div><div><br></div><div><br></div></div>