[LLVMbugs] [Bug 21216] New: Module silently not created if contains missing file

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 8 14:58:22 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=21216

            Bug ID: 21216
           Summary: Module silently not created if contains missing file
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: steveire at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

No warning is emitted if a module lists a missing file:

$ cat include/foo.map 
module foo {
  requires cplusplus
  header "foo.h"
  header "does_not_exist.h"
}

$ clang++ -E -fmodules -fmodule-map-file=include/foo.map -I include
-Weverything -pedantic test.cpp 
# 1 "test.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 318 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "test.cpp" 2

# 1 "include/foo.h" 1


static inline int foo() { return 1; }
# 3 "test.cpp" 2

int main(int, char **) {

  return 0;
}

$ cat include/foo.map 
module foo {
  requires cplusplus
  header "foo.h"
}

$ clang++ -E -fmodules -fmodule-map-file=include/foo.map -I include
-Weverything -pedantic test.cpp 
# 1 "test.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 318 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "test.cpp" 2
<module-includes>:1:1: warning: header 'include/foo.map' is included in module
'foo' but not listed in module map [-Wincomplete-module]
#include "include/foo.h"
^

@import foo; /* clang -E: implicit import for "include/foo.h" */

int main(int, char **) {

  return 0;
}
1 warning generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141008/5e79a0b1/attachment.html>


More information about the llvm-bugs mailing list