[clang][AST] Encapsulate DeclarationNameLoc, NFCI
authorMikhail Maltsev <mikhail.maltsev@arm.com>
Wed, 27 Jan 2021 11:21:01 +0000 (11:21 +0000)
committerMikhail Maltsev <mikhail.maltsev@arm.com>
Wed, 27 Jan 2021 11:21:01 +0000 (11:21 +0000)
commit30d9ca1bd9de8286539577d0abfc812ad122861c
treef7e0af5375b51b310486017c8cc897bc6b955f75
parent48ecba350ed6477ae194720b263eff194bf0271c
[clang][AST] Encapsulate DeclarationNameLoc, NFCI

This change makes `DeclarationNameLoc` a proper class and refactors its
users to use getter methods instead of accessing the members directly.
The change also makes `DeclarationNameLoc` immutable (i.e., it cannot
be modified once constructed).

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D94596
clang/include/clang/AST/DeclarationName.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/DeclarationName.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaLambda.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/tools/libclang/CIndex.cpp