hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: change-namespace/ChangeNamespace.cpp:387
+  Token Tok;
+  while (!Lex->LexFromRawLexer(Tok) && Tok.isNot(tok::TokenKind::l_brace)) {
+  }
----------------
ioeric wrote:
> hokein wrote:
> > Maybe we can use `findLocationAfterToken` here? 
> This doesn't seem to work in this case. Note that we are lexing from the 
> beginning of `NsDecl`, which is `namespace` or `inline`, and the next token 
> is not necessarily `{`.
> 
>   /// \brief Checks that the given token is the first token that occurs after 
> the
>   /// given location (this excludes comments and whitespace). Returns the 
> location
>   /// immediately after the specified token. If the token is not found or the
>   /// location is inside a macro, the returned source location will be 
> invalid.
>   SourceLocation Lexer::findLocationAfterToken(...);
> 
I see. Thanks for the clarification.


https://reviews.llvm.org/D25397



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to