Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Manuel Klimek
On Mon, May 19, 2014 at 7:04 PM, Manuel Klimek wrote: > Oh, I thought NextToken is the comment token... Now I'm thoroughly > confused. > Perhaps: // We only add a newline if the next token is not a comment token and it's on the same line as the closing rbrace. But then perhaps we can write the

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Manuel Klimek
Oh, I thought NextToken is the comment token... Now I'm thoroughly confused. On Mon, May 19, 2014 at 6:59 PM, Alexander Kornienko wrote: > On Mon, May 19, 2014 at 6:57 PM, Manuel Klimek wrote: > >> On Mon, May 19, 2014 at 6:55 PM, Alexander Kornienko >> wrote: >> >>> On Mon, May 19, 2014 at 6:

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Alexander Kornienko
On Mon, May 19, 2014 at 6:57 PM, Manuel Klimek wrote: > On Mon, May 19, 2014 at 6:55 PM, Alexander Kornienko wrote: > >> On Mon, May 19, 2014 at 6:54 PM, Alexander Kornienko >> wrote: >> >>> On Mon, May 19, 2014 at 6:53 PM, Manuel Klimek wrote: >>> On Mon, May 19, 2014 at 6:29 PM, Manuel Kl

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Manuel Klimek
On Mon, May 19, 2014 at 6:55 PM, Alexander Kornienko wrote: > > > > On Mon, May 19, 2014 at 6:54 PM, Alexander Kornienko wrote: > >> >> >> >> On Mon, May 19, 2014 at 6:53 PM, Manuel Klimek wrote: >> >>> On Mon, May 19, 2014 at 6:29 PM, Manuel Klimek wrote: >>> lg >

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Alexander Kornienko
On Mon, May 19, 2014 at 6:54 PM, Alexander Kornienko wrote: > > > > On Mon, May 19, 2014 at 6:53 PM, Manuel Klimek wrote: > >> On Mon, May 19, 2014 at 6:29 PM, Manuel Klimek wrote: >> >>> lg >>> >>> >>> Comment at: clang-tidy/llvm/NamespaceCommentCheck.cpp:66 >>> @@ +65,3 @@ >>>

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Alexander Kornienko
On Mon, May 19, 2014 at 6:53 PM, Manuel Klimek wrote: > On Mon, May 19, 2014 at 6:29 PM, Manuel Klimek wrote: > >> lg >> >> >> Comment at: clang-tidy/llvm/NamespaceCommentCheck.cpp:66 >> @@ +65,3 @@ >> + Token Tok; >> + while (Lexer::getRawToken(Loc, Tok, Sources, >> Result.Co

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Manuel Klimek
On Mon, May 19, 2014 at 6:29 PM, Manuel Klimek wrote: > lg > > > Comment at: clang-tidy/llvm/NamespaceCommentCheck.cpp:66 > @@ +65,3 @@ > + Token Tok; > + while (Lexer::getRawToken(Loc, Tok, Sources, > Result.Context->getLangOpts())) { > +Loc = Loc.getLocWithOffset(1); > --

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Alexander Kornienko
Comment at: clang-tidy/llvm/NamespaceCommentCheck.cpp:66 @@ +65,3 @@ + Token Tok; + while (Lexer::getRawToken(Loc, Tok, Sources, Result.Context->getLangOpts())) { +Loc = Loc.getLocWithOffset(1); Manuel Klimek wrote: > Can you add a comment explaining why it'

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Alexander Kornienko
Added a comment. http://reviews.llvm.org/D3825 Files: clang-tidy/llvm/CMakeLists.txt clang-tidy/llvm/IncludeOrderCheck.cpp clang-tidy/llvm/IncludeOrderCheck.h clang-tidy/llvm/LLVMTidyModule.cpp clang-tidy/llvm/LLVMTidyModule.h clang-tidy/llvm/NamespaceCommentCheck.cpp clang-tidy/llv

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Manuel Klimek
lg Comment at: clang-tidy/llvm/NamespaceCommentCheck.cpp:66 @@ +65,3 @@ + Token Tok; + while (Lexer::getRawToken(Loc, Tok, Sources, Result.Context->getLangOpts())) { +Loc = Loc.getLocWithOffset(1); Can you add a comment explaining why it's ok to retry on fa

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Alexander Kornienko
Added comments and pulled out a couple of functions. PTAL. http://reviews.llvm.org/D3825 Files: clang-tidy/llvm/CMakeLists.txt clang-tidy/llvm/IncludeOrderCheck.cpp clang-tidy/llvm/IncludeOrderCheck.h clang-tidy/llvm/LLVMTidyModule.cpp clang-tidy/llvm/LLVMTidyModule.h clang-tidy/llvm/

Re: [PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Manuel Klimek
Comment at: clang-tidy/llvm/NamespaceCommentCheck.cpp:42 @@ +41,3 @@ +return; + SourceLocation Loc = AfterRBrace; + Token Tok; This overall needs a lot more comments to be understandable... perhaps also try to pull out a few functions? http://reviews.llvm.o

[PATCH] Improved llvm-namespace-comment check.

2014-05-19 Thread Alexander Kornienko
Hi klimek, Handle various forms of existing namespace closing comments, fix existing comments with wrong namespace name, ignore short namespaces. The state of this check now seems to be enough to enable it by default to gather user feedback ;) http://reviews.llvm.org/D3825 Files: clang-tidy/l