<div dir="ltr">Hello.<div><br></div><div>I'm working on adding code complete via Clang to text editor to make it IDE.</div><div><br></div><div>The source code:</div><div><br></div><div><font face="courier new, monospace">"struct s {</font></div>
<div><font face="courier new, monospace">  int a;</font></div><div><font face="courier new, monospace">  float b;</font></div><div><font face="courier new, monospace">};</font></div><div><font face="courier new, monospace"><br>
</font></div><div><font face="courier new, monospace">void main() {</font></div><div><font face="courier new, monospace"> s var;</font></div><div><font face="courier new, monospace"> var.</font>"</div><div><br></div>
<div>the problem is that code complete for the position after dot returns nothing and if i add "<font face="courier new, monospace">}</font>" at the end and retry code complete for the position after dot it shows the correct list.</div>
<div><br></div><div>I understand that the main function definition should be closed, but users frequently type chars one-by-one and don't want to close function first and then return back to variable and then get code complete. How can that be walked-around to avoid go back/return?</div>
<div><br></div><div>My idea was to get diagnostics and add "}" if i get according diagnostics, but it's unwished walk-around. Can Clang be smart enough to make it itself?</div><div><br></div><div>Thanks and regards,</div>
<div>Anton.</div><div><br></div></div>