[all-commits] [llvm/llvm-project] 20a3fb: [Clang] Fix how ReadMacroParameterList handles com...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Thu Mar 30 13:38:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 20a3fb9740ddadc61fbc8bc76836935d1a408d83
      https://github.com/llvm/llvm-project/commit/20a3fb9740ddadc61fbc8bc76836935d1a408d83
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Lex/PPDirectives.cpp
    M clang/test/Preprocessor/comment_save_macro.c

  Log Message:
  -----------
  [Clang] Fix how ReadMacroParameterList handles comments in macro parameter-list when in -CC mode

Currently when in -CC mode when processing a function like macro
ReadMacroParameterList(...) does not handle the case where there is a comment
embedded in the parameter-list.

Instead of using LexUnexpandedToken(...) I switched to using
LexUnexpandedNonComment(...) which eats comments while lexing.

Fixes: https://github.com/llvm/llvm-project/issues/60887

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




More information about the All-commits mailing list