<div dir="ltr">-fno-spell-checking</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 30, 2016 at 10:01 AM, Alex L via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>