[cfe-dev] Module resolution during preprocessing

Boris Kolpackov via cfe-dev cfe-dev at lists.llvm.org
Tue Jun 6 23:21:29 PDT 2017


Hi,

I found this surprising behavior of Clang's Modules-TS implementation:

$ clang-5.0 --version
clang version 5.0.0-svn304373-1~exp1 (trunk)

$ cat <<EOF >test.cxx
import foo
EOF

$ clang++-5.0 -std=c++1z -fmodules-ts -E test.cxx
test.cxx:1:8: fatal error: module 'foo' not found

Seeing that modules is a language-level construct, it's not clear why
they must be resolvable during preprocessing. Or am I missing something
subtle here?

Thanks,
Boris



More information about the cfe-dev mailing list