From 8d0931114f2df30c23b4eb1380185063f4684851 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 9 Mar 2022 10:47:26 +0000 Subject: [clang] Sema::ActOnModuleImport - remove superfluous nullptr test Mod has already been dereferenced --- clang/lib/Sema/SemaModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaModule.cpp') diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp index d12de22..9de95e2 100644 --- a/clang/lib/Sema/SemaModule.cpp +++ b/clang/lib/Sema/SemaModule.cpp @@ -476,7 +476,7 @@ DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc, Context.addModuleInitializer(ModuleScopes.back().Module, Import); // A module (partition) implementation unit shall not be exported. - if (getLangOpts().CPlusPlusModules && Mod && ExportLoc.isValid() && + if (getLangOpts().CPlusPlusModules && ExportLoc.isValid() && Mod->Kind == Module::ModuleKind::ModulePartitionImplementation) { Diag(ExportLoc, diag::err_export_partition_impl) << SourceRange(ExportLoc, Path.back().second); -- cgit v1.1