aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2024-03-29 16:20:06 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2024-03-29 16:21:02 +0800
commitabfc5efb55267689f1852fd7ce3e0a38876aa259 (patch)
tree71ba73374e09fe03843418680bf36f37b546d24c /clang/lib/Sema/SemaDecl.cpp
parentaa04f12fa9f086f62f81841f159085723c255245 (diff)
downloadllvm-abfc5efb55267689f1852fd7ce3e0a38876aa259.zip
llvm-abfc5efb55267689f1852fd7ce3e0a38876aa259.tar.gz
llvm-abfc5efb55267689f1852fd7ce3e0a38876aa259.tar.bz2
[NFC] [Decl] Introduce Decl::isFromExplicitGlobalModule
Introduce `Decl::isFromExplicitGlobalModule` to replace the `D->getOwningModule() && D->getOwningModule()->isExplicitGlobalModule()` pattern to save some typings.
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 0bd88ec..503f1f6 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -9915,7 +9915,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
// FIXME: We need a better way to separate C++ standard and clang modules.
bool ImplicitInlineCXX20 = !getLangOpts().CPlusPlusModules ||
!NewFD->getOwningModule() ||
- NewFD->getOwningModule()->isGlobalModule() ||
+ NewFD->isFromExplicitGlobalModule() ||
NewFD->getOwningModule()->isHeaderLikeModule();
bool isInline = D.getDeclSpec().isInlineSpecified();
bool isVirtual = D.getDeclSpec().isVirtualSpecified();