[llvm-branch-commits] [clang] 76edf98 - Set decl on DeclRefExpr directly during deserialization rather than
Richard Smith via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Dec 15 12:06:05 PST 2020
Author: Richard Smith
Date: 2020-12-15T12:00:57-08:00
New Revision: 76edf98b27c45f1aa26c1972927ce1638cda50fd
URL: https://github.com/llvm/llvm-project/commit/76edf98b27c45f1aa26c1972927ce1638cda50fd
DIFF: https://github.com/llvm/llvm-project/commit/76edf98b27c45f1aa26c1972927ce1638cda50fd.diff
LOG: Set decl on DeclRefExpr directly during deserialization rather than
relying on a setter that might have additional side-effects. NFC.
Added:
Modified:
clang/lib/Serialization/ASTReaderStmt.cpp
Removed:
################################################################################
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index 8b9d4a127691..0e1af53303b4 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -614,7 +614,7 @@ void ASTStmtReader::VisitDeclRefExpr(DeclRefExpr *E) {
*E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
- E->setDecl(readDeclAs<ValueDecl>());
+ E->D = readDeclAs<ValueDecl>();
E->setLocation(readSourceLocation());
E->DNLoc = Record.readDeclarationNameLoc(E->getDecl()->getDeclName());
}
More information about the llvm-branch-commits
mailing list