tbaeder added a comment.

I'm gonna continue the conversation here if that's ok, the inline comments are 
rather cramped and confusing.

So, I just double-checked this and `Attrs.Range.getBegin()` returns the 
location of the first `[`, which is correct and not a problem. 
`Lexer::getRawToken(Attrs.Range.getBegin(), ...)` then returns the token as 
expected, no problem either.

The test code I'm looking at now is:

  template<typename> struct Template {};
  template struct [[]] Template<char>;

and `Attrs.Range.getBegin()` correctly returns line 2, column 17 and 
`.getEnd()` is line 2 column 20. All correct.

But using `Lexer::findLocationAfterToken()` will return column 19, not 18, so 
the first `]`. However, it seems like directly calling `Lexer::findNextToken()` 
with the location of the first token (without a 
`Lexer::findLocationAfterToken()` in betwee) will return column 19, so the 
second `[`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97362/new/

https://reviews.llvm.org/D97362

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

Reply via email to