[clang] fb3a2d4 - [Sema] Silence unused variable warning in Release builds. NFC.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 24 02:03:14 PST 2022
Author: Benjamin Kramer
Date: 2022-02-24T11:00:52+01:00
New Revision: fb3a2d45cd79d3573dafcb7d26df355266b0228c
URL: https://github.com/llvm/llvm-project/commit/fb3a2d45cd79d3573dafcb7d26df355266b0228c
DIFF: https://github.com/llvm/llvm-project/commit/fb3a2d45cd79d3573dafcb7d26df355266b0228c.diff
LOG: [Sema] Silence unused variable warning in Release builds. NFC.
Added:
Modified:
clang/lib/Sema/SemaModule.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp
index 125dbefd9dd07..a797644754b59 100644
--- a/clang/lib/Sema/SemaModule.cpp
+++ b/clang/lib/Sema/SemaModule.cpp
@@ -484,6 +484,7 @@ DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc,
} else if (getLangOpts().isCompilingModule()) {
Module *ThisModule = PP.getHeaderSearchInfo().lookupModule(
getLangOpts().CurrentModule, ExportLoc, false, false);
+ (void)ThisModule;
assert(ThisModule && "was expecting a module if building one");
}
@@ -526,6 +527,7 @@ void Sema::BuildModuleInclude(SourceLocation DirectiveLoc, Module *Mod) {
if (getLangOpts().isCompilingModule()) {
Module *ThisModule = PP.getHeaderSearchInfo().lookupModule(
getLangOpts().CurrentModule, DirectiveLoc, false, false);
+ (void)ThisModule;
assert(ThisModule && "was expecting a module if building one");
}
}
More information about the cfe-commits
mailing list