Skip to content

Commit

Permalink
[clang] Sema::ActOnModuleImport - remove superfluous nullptr test
Browse files Browse the repository at this point in the history
Mod has already been dereferenced
  • Loading branch information
RKSimon committed Mar 9, 2022
1 parent dedf006 commit 8d09311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaModule.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 8d09311

Please sign in to comment.