[all-commits] [llvm/llvm-project] ad1626: [Clang] Do not check for underscores in isAllowedI...

cor3ntin via All-commits all-commits at lists.llvm.org
Fri Jul 29 08:46:51 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad16268f135001bd21a805ae8acf8d8243793984
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2022-07-29 (Fri, 29 Jul 2022)

  Changed paths:
    M clang/lib/Lex/Lexer.cpp

  Log Message:
  [Clang] Do not check for underscores in isAllowedInitiallyIDChar

isAllowedInitiallyIDChar is only used with non-ASCII codepoints,
which are handled by isAsciiIdentifierStart.
To make that clearer, remove the check for _ from
isAllowedInitiallyIDChar, and assert on ASCII - to ensure neither
_ or $ are passed to this function.

Reviewed By: tahonermann, aaron.ballman

Differential Revision: https://reviews.llvm.org/D130750

More information about the All-commits mailing list