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


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.


cfe-commits mailing list

Reply via email to