[all-commits] [llvm/llvm-project] 49aca0: [NFC] Remove peekNextToken(int).

r4nt via All-commits all-commits at lists.llvm.org
Sat Nov 26 10:23:58 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 49aca00d63e14df8bc68fc4329e6cbc9c9805eb8
      https://github.com/llvm/llvm-project/commit/49aca00d63e14df8bc68fc4329e6cbc9c9805eb8
  Author: Manuel Klimek <klimek at google.com>
  Date:   2022-11-26 (Sat, 26 Nov 2022)

  Changed paths:
    M clang/lib/Format/UnwrappedLineParser.cpp

  Log Message:
  -----------
  [NFC] Remove peekNextToken(int).

Arbitrary lookahead restricts the implementation of our TokenSource,
specifically getting in the way of changes to handle macros better.

Instead, use getNextToken to parse lookahead linearly, and
getPosition/setPosition to unwind our lookahead.




More information about the All-commits mailing list