<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/73772>73772</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang][AST] AST print not same as source code
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          badguy123
      </td>
    </tr>
</table>

<pre>
    Hi, I am new and learn about AST, when i use printPretty function,sometimes will print error source code.

my project source code is :  
```
int main(int argc, char * argv[]) {
    NSString * appDelegateClassName;
 @autoreleasepool {
        // Setup code that might create autoreleased objects goes here.
        appDelegateClassName = NSStringFromClass([AppDelegate class]);
    }
    return UIApplicationMain(argc, argv, nil, appDelegateClassName);
}
```

my AST print code:
```
bool VisitObjCMethodDecl(ObjCMethodDecl* MD){
    Stmt* ST = MD->getBody();
 ST->printPretty(errs(), nullptr, PrintingPolicy(Ctx.getLangOpts()));
 return true;
}
```
terminal output:
```
{
    NSString *appDelegateClassName(/*implicit*/(NSString *__strong)0);
 @autoreleasepool{
      appDelegateClassName = NSStringFromClass([AppDelegate class]);
    }
    return UIApplicationMain(argc, argv, ((void *)0), appDelegateClassName); 
}
```

Why  `printPretty` output not same as source code? is my missing some code? How can i print same as source code?  LLVM code is so big, i can not use LLDB find why is. thanks.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVcGO4jgQ_RpzKTVKHELgkEMgi2YkmGkJdvY4cpIica9jR3alWf5-5YSm073du3schCC2n8v1Xr2UhXOy1ogpizcszmeip8bYtBBV3V9DHs0KU13TL5LxLXwF0YLGCwhdgUJhNYjC9ATZ8eTXLw1qkNA7hM5KTY8Wia5w7nVJ0mjGt860SLJFBxep1IgCtNZYcKa3JUJpKpyzIGdBNv62V-isecKSphCQDliUAdygy-D2HYY-aiukZnzlH4WtS59f2QgLjGd-4nnky_gaWLIZtwEAf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