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()); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits