[all-commits] [llvm/llvm-project] 3b1d45: [clang] Correct -frewrite-includes generation of l...

Tom Honermann via All-commits all-commits at lists.llvm.org
Thu Jan 5 10:24:19 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b1d45518910b529104a269d5f6712a720cc3ff7
      https://github.com/llvm/llvm-project/commit/3b1d45518910b529104a269d5f6712a720cc3ff7
  Author: Tom Honermann <tom.honermann at intel.com>
  Date:   2023-01-05 (Thu, 05 Jan 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Frontend/Rewrite/InclusionRewriter.cpp
    A clang/test/Frontend/rewrite-includes-mixed-eol-crlf.c
    A clang/test/Frontend/rewrite-includes-mixed-eol-crlf.h
    A clang/test/Frontend/rewrite-includes-mixed-eol-lf.c
    A clang/test/Frontend/rewrite-includes-mixed-eol-lf.h

  Log Message:
  -----------
  [clang] Correct -frewrite-includes generation of line control directives with mixed EOL forms.

Previously, if a header file and a source file used different end of line
(EOL) forms, preprocessed output generated with the -frewrite-includes option
would, in some cases, generate line control directives with the wrong line
number due to an error in how source file lines were counted.

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

Reviewed By: cor3ntin

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




More information about the All-commits mailing list