[cfe-commits] [PATCH] Structured comment parsing, retaining comments in AST
Dmitri Gribenko
gribozavr at gmail.com
Tue Jun 12 18:34:51 PDT 2012
On Mon, Jun 11, 2012 at 8:39 AM, Douglas Gregor <dgregor at apple.com> wrote:
> Please use FileCheck rather than grep.
Done.
> Might SmallString<256> be a better choice here than std::string, since many comments are likely to be short?
Does not apply to latest version of the patch where a single
SourceRange is tracked for a merged comment in order to be able
associate source locations with tokens inside comments.
> Should we insert an empty string into DeclComments early on, before we do the work of performing lower_bound, so that repeated queries for the comment string of a declaration that does *not* have a comment don't keep performing lower_bound calls? In other words, should we cache the negative case as well as the positive case?
Implemented caching negative results, but in a different way.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list