[all-commits] [llvm/llvm-project] 8839e2: [Modules] Improve error message when cannot find p...

Volodymyr Sapsai via All-commits all-commits at lists.llvm.org
Tue Aug 25 16:31:55 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8839e278ffcadc62b333423de07756488cae980f
      https://github.com/llvm/llvm-project/commit/8839e278ffcadc62b333423de07756488cae980f
  Author: Volodymyr Sapsai <vsapsai at apple.com>
  Date:   2020-08-25 (Tue, 25 Aug 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticLexKinds.td
    M clang/lib/Lex/ModuleMap.cpp
    M clang/test/Modules/diagnostics.modulemap

  Log Message:
  -----------
  [Modules] Improve error message when cannot find parent module for submodule definition.

Before the change the diagnostic for

    module unknown.submodule {}

was "error: expected module name" which is incorrect and misleading
because both "unknown" and "submodule" are valid module names.

We already have a better error message when a parent module is a
submodule itself and is missing. Make the error for a missing top-level
module more like the one for a submodule.

rdar://problem/64424407

Reviewed By: bruno

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




More information about the All-commits mailing list