aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/MultiplexExternalSemaSource.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2024-04-25 13:53:22 +0800
committerGitHub <noreply@github.com>2024-04-25 13:53:22 +0800
commitc2a98fdeb3aede1a8db492a6ea30f4fa85b60edc (patch)
tree6e0ee26c5d104d9ccae7d76477afce5e19aef98e /clang/lib/Sema/MultiplexExternalSemaSource.cpp
parentfd5f06eb6d8d8b05846c8d7bd2431079ef707b37 (diff)
downloadllvm-c2a98fdeb3aede1a8db492a6ea30f4fa85b60edc.zip
llvm-c2a98fdeb3aede1a8db492a6ea30f4fa85b60edc.tar.gz
llvm-c2a98fdeb3aede1a8db492a6ea30f4fa85b60edc.tar.bz2
[NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (#89873)
Previously, the DeclID is defined in serialization/ASTBitCodes.h under clang::serialization namespace. However, actually the DeclID is not purely used in serialization part. The DeclID is already widely used in AST and all around the clang project via classes like `LazyPtrDecl` or calling `ExternalASTSource::getExernalDecl()`. All such uses are via the raw underlying type of `DeclID` as `uint32_t`. This is not pretty good. This patch moves the DeclID class family to a new header `AST/DeclID.h` so that the whole project can use the wrapped class `DeclID`, `GlobalDeclID` and `LocalDeclID` instead of the raw underlying type. This can improve the readability and the type safety.
Diffstat (limited to 'clang/lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r--clang/lib/Sema/MultiplexExternalSemaSource.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/MultiplexExternalSemaSource.cpp b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
index 6a5f9f6..e48c724 100644
--- a/clang/lib/Sema/MultiplexExternalSemaSource.cpp
+++ b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
@@ -46,7 +46,7 @@ void MultiplexExternalSemaSource::AddSource(ExternalSemaSource *Source) {
// ExternalASTSource.
//===----------------------------------------------------------------------===//
-Decl *MultiplexExternalSemaSource::GetExternalDecl(Decl::DeclID ID) {
+Decl *MultiplexExternalSemaSource::GetExternalDecl(DeclID ID) {
for(size_t i = 0; i < Sources.size(); ++i)
if (Decl *Result = Sources[i]->GetExternalDecl(ID))
return Result;