<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Macro-reexport is shadowing #include of the textual file itself"
   href="https://llvm.org/bugs/show_bug.cgi?id=31235">31235</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Macro-reexport is shadowing #include of the textual file itself
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Modules
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vvasilev@cern.ch
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>It seems that pseudo-code is having some issues:
 #include "empty_module_trigger.h" // triggers creation of a module which
includes stl_textual.h
 #include <stl_textual.h>

 auto use = std::decl_from_textual<>(); // errors out saying we should import
namespace std from a module X, but it should be imported by the textual
include.

Actual invocation:
/Users/vvassilev/workspace/llvm-git/inst/bin/clang++ -g -m64 -std=c++11
-stdlib=libc++ -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char
-fno-common -Iinclude    -fmodules -fcxx-modules -Xclang
-fmodules-local-submodule-visibility
-fmodules-cache-path=/Users/vvassilev/workspace/root_obj/include/pcms/
-fno-autolink -fno-implicit-module-maps
-fmodule-map-file=/Users/vvassilev/workspace/root_obj/include/module.modulemap
-pthread  -I/Users/vvassilev/workspace/root/core/meta/src -MMD -MP -o
core/utils/src/rootclingTCling.o -c
/Users/vvassilev/workspace/root/core/utils/src/rootclingTCling.cxx 
While building module 'ROOT' imported from
/Users/vvassilev/workspace/root/core/utils/src/rootclingTCling.cxx:17:
While building module 'ROOT_Core_Config_C' imported from include/Bytes.h:36:
In file included from <module-includes>:2:
In file included from include/Rtypes.h:30:
include/Rtypeinfo.h:14:1: warning: declaration does not declare anything
[-Wmissing-declarations]
R__DEPRECATED(6, 12, "Rtypeinfo.h is deprecated. Please use #include
<typeinfo>, instead.");
^
include/RConfig.h:509:3: note: expanded from macro 'R__DEPRECATED'
  _R__JOIN3_(_R__DEPRECATED_,MAJOR,MINOR)("will be removed in ROOT v" #MAJOR
"." #MINOR ": " REASON)
  ^
include/RConfig.h:457:30: note: expanded from macro '_R__JOIN3_'
#   define _R__JOIN3_(F,X,Y) _NAME3_(F,X,Y)
                             ^
include/RConfig.h:439:39: note: expanded from macro '_NAME3_'
#   define _NAME3_(name1,name2,name3) name1##name2##name3
                                      ^
<scratch space>:263:1: note: expanded from here
_R__DEPRECATED_612
^
include/RConfig.h:487:37: note: expanded from macro '_R__DEPRECATED_612'
# define _R__DEPRECATED_612(REASON) _R__DEPRECATED_LATER(REASON)
                                    ^
include/RConfig.h:475:41: note: expanded from macro '_R__DEPRECATED_LATER'
#   define _R__DEPRECATED_LATER(REASON) __attribute__((deprecated(REASON)))
                                        ^
While building module 'ROOT' imported from
/Users/vvassilev/workspace/root/core/utils/src/rootclingTCling.cxx:17:
While building module 'ROOT_Core_Config_C' imported from include/Bytes.h:36:
In file included from <module-includes>:14:
In file included from include/TString.h:32:
include/Riosfwd.h:24:1: warning: declaration does not declare anything
[-Wmissing-declarations]
R__DEPRECATED(6, 12, "Riosfwd.h is deprecated. Please use #include <iosfwd>,
instead.");
^
include/RConfig.h:509:3: note: expanded from macro 'R__DEPRECATED'
  _R__JOIN3_(_R__DEPRECATED_,MAJOR,MINOR)("will be removed in ROOT v" #MAJOR
"." #MINOR ": " REASON)
  ^
include/RConfig.h:457:30: note: expanded from macro '_R__JOIN3_'
#   define _R__JOIN3_(F,X,Y) _NAME3_(F,X,Y)
                             ^
include/RConfig.h:439:39: note: expanded from macro '_NAME3_'
#   define _NAME3_(name1,name2,name3) name1##name2##name3
                                      ^
<scratch space>:343:1: note: expanded from here
_R__DEPRECATED_612
^
include/RConfig.h:487:37: note: expanded from macro '_R__DEPRECATED_612'
# define _R__DEPRECATED_612(REASON) _R__DEPRECATED_LATER(REASON)
                                    ^
include/RConfig.h:475:41: note: expanded from macro '_R__DEPRECATED_LATER'
#   define _R__DEPRECATED_LATER(REASON) __attribute__((deprecated(REASON)))
                                        ^
While building module 'ROOT' imported from
/Users/vvassilev/workspace/root/core/utils/src/rootclingTCling.cxx:17:
In file included from <module-includes>:42:
include/TDatime.h:14:2: warning: "I was included!" [-W#warnings]
#warning "I was included!"
 ^
While building module 'ROOT' imported from
/Users/vvassilev/workspace/root/core/utils/src/rootclingTCling.cxx:17:
In file included from <module-includes>:109:
include/config.h:16:2: warning: config.h is deprecated, replace by
RConfigure.h. [-W#warnings]
#warning config.h is deprecated, replace by RConfigure.h.
 ^
While building module 'ROOT' imported from
/Users/vvassilev/workspace/root/core/utils/src/rootclingTCling.cxx:17:
In file included from <module-includes>:1306:
In file included from include/Math/AxisAngle.h:8:
In file included from include/Math/GenVector/AxisAngle.h:20:
include/Math/GenVector/Rotation3D.h:296:7: error: declaration of 'std' must be
imported from module 'ROOT_Core_Config_C' before it is required
      std::copy ( fM, fM+9, begin );
      ^
/Users/vvassilev/workspace/llvm-git/inst/bin/../include/c++/v1/unordered_set:332:1:
note: previous declaration is here
_LIBCPP_BEGIN_NAMESPACE_STD
^
/Users/vvassilev/workspace/llvm-git/inst/bin/../include/c++/v1/__config:395:47:
note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace
_LIBCPP_NAMESPACE {
                                              ^
While building module 'ROOT' imported from
/Users/vvassilev/workspace/root/core/utils/src/rootclingTCling.cxx:17:
In file included from <module-includes>:1575:
include/RooComplex.h:21:2: warning: "RooComplex is deprecated, use std::complex
instead!" [-W#warnings]
#warning "RooComplex is deprecated, use std::complex instead!"
 ^
While building module 'ROOT' imported from
/Users/vvassilev/workspace/root/core/utils/src/rootclingTCling.cxx:17:
In file included from <module-includes>:1904:
In file included from include/Krb5Auth.h:47:
In file included from /usr/include/krb5.h:7:
In file included from /usr/include/krb5/krb5.h:119:
/usr/include/stdlib.h:117:12: error: declaration of '__mb_cur_max' has a
different language linkage
extern int __mb_cur_max;
           ^
/usr/include/stdlib.h:117:12: note: previous declaration is here
extern int __mb_cur_max;
           ^
/Users/vvassilev/workspace/root/core/utils/src/rootclingTCling.cxx:17:10: fatal
error: could not build module 'ROOT'
#include "TClass.h"
 ~~~~~~~~^~~~~~~~~~
5 warnings and 3 errors generated.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>