https://bugs.llvm.org/show_bug.cgi?id=48132
Bug ID: 48132
Summary: clang-cl: <built-in> reported as included file for
preprocessed source
Product: clang
Version: 11.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
With clang-cl, when the compilation is split into separate preprocessing and
compilation steps, "<built-in>" is reported as included file when using
/showIncludes.
Let x.cpp be an empty file. Then,
clang-cl /c /showIncludes x.cpp
succeeds with no output, as expected. However, running
clang-cl /E x.cpp > pre.cpp
clang-cl /c /showIncludes pre.cpp
outputs
Note: including file: <built-in>
The contents of pre.cpp are
# 1 "x.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 366 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "x.cpp" 2
This is the relevant code:
https://github.com/llvm/llvm-project/blob/a7a447be0fa934505f0c423fb97b91a68c1cc715/clang/lib/Frontend/HeaderIncludeGen.cpp#L178-L179.
Observe that it skips "<command line>", but not "<built-in>".
Note: MSVC reports no includes at all when /showIncludes is used on a
preprocessed source.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs