simon_tatham added a comment.

I don't think so, I'm afraid. If you look at the definition of 
`MacroInfo::tokens_begin()` in `clang/include/clang/Lex/MacroInfo.h`, you see 
that it doesn't return a raw `Token *`: it returns a C++ iterator object.

  using tokens_iterator = SmallVectorImpl<Token>::const_iterator;
  
  tokens_iterator tokens_begin() const { return ReplacementTokens.begin(); }

So you do have to dereference the iterator to get a `Token &`, and then 
address-take that to turn it into a `Token *`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115014

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

Reply via email to