<div dir="ltr">Hi,<div><br></div><div>following code:</div><div><br></div><div><div>int v(8);</div><div>bool b(false);</div><div>double d(0.5);</div><div>Structy s(23);</div><div><br></div><div>int v1, v2(3), v3, v4(4);</div><div>Structy s1, s2(23), s3, s4(3);</div></div><div><br></div><div><div>if(const auto *vardecl = Result.Nodes.getNodeAs<clang::VarDecl>("vardecl"))</div><div>{</div><div>    llvm::outs() << Lexer::getSourceText(CharSourceRange::getTokenRange(vardecl->getSourceRange()), *SM, LO) << "\n";</div><div>}</div></div><div><br></div><div>outputs:</div><div><br></div><div><div>int v(8</div><div>bool b(false</div><div>double d(0.5</div><div>Structy s(23)</div><div><br></div><div>int v1</div><div>int v1, v2(3</div><div>int v1, v2(3), v3</div><div>int v1, v2(3), v3, v4(4</div><div><br></div><div>Structy s1</div><div>Structy s1, s2(23)</div><div>Structy s1, s2(23), s3</div><div>Structy s1, s2(23), s3, s4(3)</div></div><div><br></div><div><br></div><div>As can be seen, the last parenthesis is missing for the arithmetic types. The SourceRange is for any other kind of initialization right, except for this case.</div><div><br></div><div>Regards,</div><div>Firat</div></div>