[all-commits] [llvm/llvm-project] 9a1ece: [clang] Clear `NeedsCleaning` flag after `ExpandBu...

marius doerner via All-commits all-commits at lists.llvm.org
Tue Apr 15 12:14:18 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9a1ece26126363c64c67d9a6e357076e814acf9e
      https://github.com/llvm/llvm-project/commit/9a1ece26126363c64c67d9a6e357076e814acf9e
  Author: marius doerner <marius.doerner1 at icloud.com>
  Date:   2025-04-15 (Tue, 15 Apr 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Lex/PPMacroExpansion.cpp
    M clang/test/Preprocessor/embed___has_embed.c
    M clang/test/Preprocessor/has_attribute.c
    M clang/test/Preprocessor/has_attribute.cpp
    M clang/test/Preprocessor/has_c_attribute.c
    M clang/test/Preprocessor/has_include.c
    A clang/test/Preprocessor/pr133574.c

  Log Message:
  -----------
  [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (#133574)

After builtin macro expansion in `Preprocessor::ExpandBuiltinMacro` the
result token may have the `Token::NeedsCleaning` flag set which causes
an assertion failure later on when the lexer retrieves the spelling of
the token in `getSpellingSlow`.

This commit adds an `Tok.clearFlag(Token::NeedsCleaning)` call to the
end of `ExpandBuiltinMacro`.

Closes #128384



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