Module map files describing excluded headers do affect compilation. Track them in the compiler, serialize them into the PCM file and report them in the scanner.
Depends on D134222.
Paths
| Differential D134224
[clang][modules][deps] Report modulemaps describing excluded headers ClosedPublic Authored by jansvoboda11 on Sep 19 2022, 2:23 PM.
Details Summary Module map files describing excluded headers do affect compilation. Track them in the compiler, serialize them into the PCM file and report them in the scanner. Depends on D134222.
Diff Detail
Event Timelinejansvoboda11 added a child revision: D134248: [clang][modules][deps] Preserve module map load order.Sep 19 2022, 6:09 PM Comment Actions I think this is fine, but I need to think more about the ModuleDepCollector.cpp change.
This revision is now accepted and ready to land.Sep 22 2022, 11:00 AM This revision was landed with ongoing or failed builds.Sep 22 2022, 12:36 PM Closed by commit rGf35230ae0a69: [clang][modules][deps] Report modulemaps describing excluded headers (authored by jansvoboda11). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions This change has broken x86-32 builds, at least on Linux. /usr/local/google/home/srj/GitHub/llvm-project/16/llvm/include/llvm/ADT/PointerIntPair.h:136:25: error: static assertion failed: PointerIntPair with integer size too large for pointer 136 | static_assert(IntBits <= PtrTraits::NumLowBitsAvailable, | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/google/home/srj/GitHub/llvm-project/16/llvm/include/llvm/ADT/PointerIntPair.h:136:25: note: the comparison reduces to ‘(3 <= 2)’ /usr/local/google/home/srj/GitHub/llvm-project/16/llvm/include/llvm/ADT/PointerIntPair.h:151:42: warning: left shift count >= width of type [-Wshift-count-overflow] 151 | ShiftedIntMask = (uintptr_t)(IntMask << IntShift) | ~~~~~~~~~^~~~~~~~~~~~ /usr/local/google/home/srj/GitHub/llvm-project/16/llvm/include/llvm/ADT/PointerIntPair.h:151:42: error: right operand of shift expression ‘(7 << 4294967295)’ is greater than or equal to the precision 32 of the left operand [-fpermissive] /usr/local/google/home/srj/GitHub/llvm-project/16/llvm/include/llvm/ADT/PointerIntPair.h:138:8: error: enumerator value for ‘ShiftedIntMask’ is not an integer constant 138 | enum MaskAndShiftConstants : uintptr_t { Please fix or revert immediately.
Revision Contents
Diff 462267 clang/include/clang/Lex/HeaderSearch.h
clang/include/clang/Lex/ModuleMap.h
clang/lib/Lex/HeaderSearch.cpp
clang/lib/Lex/ModuleMap.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
clang/test/ClangScanDeps/modules-excluded-header.m
|
Cast to void no longer needed.