[all-commits] [llvm/llvm-project] 72c29f: [C++20] [Modules] [Driver] Emit unused argument wa...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Wed Apr 3 01:30:36 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 72c29fa9e226a928b3d3a01d74f6b44a0b31b7d4
      https://github.com/llvm/llvm-project/commit/72c29fa9e226a928b3d3a01d74f6b44a0b31b7d4
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/module-output.cppm

  Log Message:
  -----------
  [C++20] [Modules] [Driver] Emit unused argument warning if we use '-fmodule-output' with non-module input

We required the file name of an 'importable module unit' should end
with .cppm (or .ccm, .cxxm, .c++m).

But the driver can accept '-fmodule-output' for files with normal
suffixes (e.g., .cpp). This is somewhat inconsistency.

In this patch, we only claim the option `-fmodule-output` is used if
the type of the input file is modules related. Then now the compiler
will emit 'unused argument' warnings if the input file is not modules
related.



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