[all-commits] [llvm/llvm-project] 513b95: Make -frewrite-includes handle -include correctly

Paul T Robinson via All-commits all-commits at lists.llvm.org
Tue Oct 24 09:09:02 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 513b950a79d0e92af1baa969207dd296068a71b9
      https://github.com/llvm/llvm-project/commit/513b950a79d0e92af1baa969207dd296068a71b9
  Author: Paul Robinson <paul.robinson at sony.com>
  Date:   2023-10-24 (Tue, 24 Oct 2023)

  Changed paths:
    M clang/lib/Frontend/Rewrite/InclusionRewriter.cpp
    M clang/test/Frontend/rewrite-includes-cli-include.c

  Log Message:
  -----------
  Make -frewrite-includes handle -include correctly

The `-include "file"` option implicitly adds a leading #include
to the main source; however, there's no explicit #include, which
left -frewrite-includes emitting an unmatched #endif at the end
of the included text.

This corrects a bug in 4a16b51f.




More information about the All-commits mailing list