[all-commits] [llvm/llvm-project] 897b03: [clang][dep-scan] Resolve lexer crash from a permu...

Cyndy Ishida via All-commits all-commits at lists.llvm.org
Fri Jun 6 13:45:37 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 897b0301d2e2ff28d3976fe95b64be5a85815908
      https://github.com/llvm/llvm-project/commit/897b0301d2e2ff28d3976fe95b64be5a85815908
  Author: Cyndy Ishida <cyndy_ishida at apple.com>
  Date:   2025-06-06 (Fri, 06 Jun 2025)

  Changed paths:
    M clang/lib/Lex/DependencyDirectivesScanner.cpp
    M clang/unittests/Lex/DependencyDirectivesScannerTest.cpp

  Log Message:
  -----------
  [clang][dep-scan] Resolve lexer crash from a permutation of invalid tokens (#142452)

Sometimes, when a user writes invalid code, the minimization used for
scanning can create a stream of tokens that is invalid at lex time. This
patch protects against the case where there are valid (non-c++20) import
directives discovered in the middle of an invalid `import` declaration.

Mostly authored by: @akyrtzi 
resolves: rdar://152335844



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list