<div dir="ltr">Hi All,<div><br></div><div style>I've been digging into a bug that appears when call-style initializers are used for builtin types. For example:</div><div style><br></div><div style>    int g_foo(1);</div>
<div style><br></div><div style>Results in an initializer that is solely an IntegerLiteral - the ParenListExpr that originally surrounded it is lost during Sema::AddInitializerToDecl(). This unfortunately also loses the end location for the final ')' and leads the VarDecl::getSourceRange() returning the location of the IntegerLiteral for the end location.</div>
<div style><br></div><div style>What should be the correct approach here? Surely the ParenListExpr should be preserved in the AST? Or if it really is supposed to be folded away at this stage than how can we retain the end location for the expression?</div>
<div style><br></div><div style>Any thoughts?</div><div style><br></div><div style>- Will.</div><div style><br></div>























</div>