The first issue was found by @ldionne, upon further investigation there
were more duplicates. This removes the duplicates and updates the
clang-tidy test to detect duplicates.
Details
- Reviewers
ldionne - Group Reviewers
Restricted Project - Commits
- rGc62e88eeef2d: [libc++][modules] Avoids duplicated exports.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM but I'd like to understand how the test will fail.
libcxx/modules/std/cmath.cppm | ||
---|---|---|
142–143 | Is this comment in the right place now? | |
libcxx/modules/std/filesystem.cppm | ||
38–39 | Same. | |
libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp | ||
236 | This might be dumb, but I don't understand how the test will fail. Can you explain a bit more? |
libcxx/modules/std/cmath.cppm | ||
---|---|---|
142–143 | I tend to keep the empty sections in other modules too, | |
libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp | ||
236 | Assume foo.h void foo(char); void foo(int); This will only list one named declaration since duplicates are removed. using ::foo; foo.ccpm export { using ::foo; using ::foo; } This will list two named declarations since duplicates are *not* removed. using ::foo; using ::foo; Now the header and the module generate different output and are not considered "the same". This fails. This is the same failure when a public named declaration is added to a header and not to the module. |
Is this comment in the right place now?