diff --git a/libcxx/modules/std/cmath.cppm b/libcxx/modules/std/cmath.cppm --- a/libcxx/modules/std/cmath.cppm +++ b/libcxx/modules/std/cmath.cppm @@ -140,7 +140,6 @@ using std::hypotl; // [c.math.hypot3], three-dimensional hypotenuse - using std::hypot; using std::pow; using std::powf; diff --git a/libcxx/modules/std/filesystem.cppm b/libcxx/modules/std/filesystem.cppm --- a/libcxx/modules/std/filesystem.cppm +++ b/libcxx/modules/std/filesystem.cppm @@ -36,8 +36,6 @@ using std::filesystem::recursive_directory_iterator; // [fs.rec.dir.itr.nonmembers], range access for recursive directory iterators - using std::filesystem::begin; - using std::filesystem::end; // [fs.class.file.status], file status using std::filesystem::file_status; diff --git a/libcxx/modules/std/iterator.cppm b/libcxx/modules/std/iterator.cppm --- a/libcxx/modules/std/iterator.cppm +++ b/libcxx/modules/std/iterator.cppm @@ -101,8 +101,6 @@ // [projected], projected using std::projected; - using std::incrementable_traits; - // [alg.req], common algorithm requirements // [alg.req.ind.move], concept indirectly_movable using std::indirectly_movable; @@ -210,8 +208,6 @@ using std::common_iterator; - using std::incrementable_traits; - // [default.sentinel], default sentinel using std::default_sentinel; using std::default_sentinel_t; diff --git a/libcxx/modules/std/memory.cppm b/libcxx/modules/std/memory.cppm --- a/libcxx/modules/std/memory.cppm +++ b/libcxx/modules/std/memory.cppm @@ -129,8 +129,6 @@ using std::make_unique; using std::make_unique_for_overwrite; - using std::swap; - using std::operator<; using std::operator>; using std::operator<=; diff --git a/libcxx/modules/std/numbers.cppm b/libcxx/modules/std/numbers.cppm --- a/libcxx/modules/std/numbers.cppm +++ b/libcxx/modules/std/numbers.cppm @@ -26,20 +26,6 @@ using std::numbers::sqrt2_v; using std::numbers::sqrt3_v; - using std::numbers::e_v; - using std::numbers::egamma_v; - using std::numbers::inv_pi_v; - using std::numbers::inv_sqrt3_v; - using std::numbers::inv_sqrtpi_v; - using std::numbers::ln10_v; - using std::numbers::ln2_v; - using std::numbers::log10e_v; - using std::numbers::log2e_v; - using std::numbers::phi_v; - using std::numbers::pi_v; - using std::numbers::sqrt2_v; - using std::numbers::sqrt3_v; - using std::numbers::e; using std::numbers::egamma; using std::numbers::inv_pi; diff --git a/libcxx/modules/std/stack.cppm b/libcxx/modules/std/stack.cppm --- a/libcxx/modules/std/stack.cppm +++ b/libcxx/modules/std/stack.cppm @@ -15,7 +15,6 @@ // [stack], class template stack using std::stack; - using std::operator==; using std::operator==; using std::operator!=; using std::operator<; diff --git a/libcxx/modules/std/tuple.cppm b/libcxx/modules/std/tuple.cppm --- a/libcxx/modules/std/tuple.cppm +++ b/libcxx/modules/std/tuple.cppm @@ -38,8 +38,6 @@ using std::tuple_element; using std::tuple_size; - using std::tuple_element_t; - // [tuple.elem], element access using std::get; using std::tuple_element_t; diff --git a/libcxx/modules/std/utility.cppm b/libcxx/modules/std/utility.cppm --- a/libcxx/modules/std/utility.cppm +++ b/libcxx/modules/std/utility.cppm @@ -70,9 +70,6 @@ using std::tuple_element; using std::tuple_size; - using std::tuple_element; - using std::tuple_size; - using std::get; // [pair.piecewise], pair piecewise construction diff --git a/libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp b/libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp --- a/libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp +++ b/libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp @@ -112,7 +112,6 @@ switch (file_type_) { case FileType::Header: - finder->addMatcher( namedDecl( // Looks at the common locations where headers store their data @@ -229,8 +228,16 @@ if (clang::Module* M = decl->getOwningModule(); M && M->Kind != clang::Module::ModulePartitionInterface) return; - if (decls_.contains(name)) - return; + if (decls_.contains(name)) { + // For modules avoid exporting the same named declaration twice. For + // header files this is common and valid. + if (file_type_ == FileType::ModulePartition) + // After the warning the script continues. + // The test will fail since modules have duplicated entries and headers not. + llvm::errs() << "Duplicated export of '" << name << "'.\n"; + else + return; + } std::cout << "using " << std::string{name} << ";\n"; decls_.insert(name);