[llvm-branch-commits] [clang] 52cebc4 - [Concepts] Add FoundDecl to ConceptSpecializationExpr serialization

Saar Raz via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Mar 10 13:14:24 PDT 2020


Author: Saar Raz
Date: 2020-03-10T22:13:31+02:00
New Revision: 52cebc452d1805c274f0ffd56f76e5a7bbb37fdd

URL: https://github.com/llvm/llvm-project/commit/52cebc452d1805c274f0ffd56f76e5a7bbb37fdd
DIFF: https://github.com/llvm/llvm-project/commit/52cebc452d1805c274f0ffd56f76e5a7bbb37fdd.diff

LOG: [Concepts] Add FoundDecl to ConceptSpecializationExpr serialization

FoundDecl was missing from ConceptSpecializationExpr serialization - add it.

(cherry picked from commit f9e63891597630405a4655298f06b193e4ceb384)

Added: 
    

Modified: 
    clang/lib/Serialization/ASTReaderStmt.cpp
    clang/lib/Serialization/ASTWriterStmt.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index 5dd0ef9d43c3..db879f3004f9 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -754,6 +754,7 @@ void ASTStmtReader::VisitConceptSpecializationExpr(
   E->TemplateKWLoc = Record.readSourceLocation();
   E->ConceptName = Record.readDeclarationNameInfo();
   E->NamedConcept = readDeclAs<ConceptDecl>();
+  E->FoundDecl = Record.readDeclAs<NamedDecl>();
   E->ArgsAsWritten = Record.readASTTemplateArgumentListInfo();
   llvm::SmallVector<TemplateArgument, 4> Args;
   for (unsigned I = 0; I < NumTemplateArgs; ++I)

diff  --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index 1b118c257a4c..f81e940a6dbc 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -429,6 +429,7 @@ void ASTStmtWriter::VisitConceptSpecializationExpr(
   Record.AddSourceLocation(E->getTemplateKWLoc());
   Record.AddDeclarationNameInfo(E->getConceptNameInfo());
   Record.AddDeclRef(E->getNamedConcept());
+  Record.AddDeclRef(E->getFoundDecl());
   Record.AddASTTemplateArgumentListInfo(E->getTemplateArgsAsWritten());
   for (const TemplateArgument &Arg : TemplateArgs)
     Record.AddTemplateArgument(Arg);


        


More information about the llvm-branch-commits mailing list