[all-commits] [llvm/llvm-project] 45c160: [C++20] [Modules] [Serialization] Check input file...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Wed Sep 13 20:31:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 45c160510f6c2e7c64dbbbc29ff579b2caaff2db
      https://github.com/llvm/llvm-project/commit/45c160510f6c2e7c64dbbbc29ff579b2caaff2db
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2023-09-14 (Thu, 14 Sep 2023)

  Changed paths:
    M clang/lib/Serialization/ASTReader.cpp
    M clang/unittests/Serialization/CMakeLists.txt
    A clang/unittests/Serialization/ForceCheckFileInputTest.cpp

  Log Message:
  -----------
  [C++20] [Modules] [Serialization] Check input file contents with option ForceCheckCXX20ModulesInputFiles enabled

With overriden input files, e,g,. the compiler get the file from an
in-memroy buffer, the compiler can't get correct modified time information
to indicate whehter the input files are changed or not. Then, the
semantics of ForceCheckCXX20ModulesInputFiles are broken.

In this patch, if both ForceCheckCXX20ModulesInputFiles and
ValidateASTInputFilesContent and enabled, the compiler will still check the
hash value of the contents even if their modification time is the same.




More information about the All-commits mailing list