diff options
-rw-r--r-- | clang/include/clang/AST/DeclOpenMP.h | 5 | ||||
-rw-r--r-- | clang/lib/AST/DeclOpenMP.cpp | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/clang/include/clang/AST/DeclOpenMP.h b/clang/include/clang/AST/DeclOpenMP.h index ae7d04d3706..bec3acffc43 100644 --- a/clang/include/clang/AST/DeclOpenMP.h +++ b/clang/include/clang/AST/DeclOpenMP.h @@ -189,8 +189,9 @@ class OMPCapturedExprDecl final : public VarDecl { void anchor() override; OMPCapturedExprDecl(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, - QualType Type, SourceLocation StartLoc) - : VarDecl(OMPCapturedExpr, C, DC, StartLoc, StartLoc, Id, Type, nullptr, + QualType Type, TypeSourceInfo *TInfo, + SourceLocation StartLoc) + : VarDecl(OMPCapturedExpr, C, DC, StartLoc, StartLoc, Id, Type, TInfo, SC_None) { setImplicit(); } diff --git a/clang/lib/AST/DeclOpenMP.cpp b/clang/lib/AST/DeclOpenMP.cpp index a86c0ebd48d..f5c3599ef6c 100644 --- a/clang/lib/AST/DeclOpenMP.cpp +++ b/clang/lib/AST/DeclOpenMP.cpp @@ -92,13 +92,14 @@ void OMPCapturedExprDecl::anchor() {} OMPCapturedExprDecl *OMPCapturedExprDecl::Create(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, QualType T, SourceLocation StartLoc) { - return new (C, DC) OMPCapturedExprDecl(C, DC, Id, T, StartLoc); + return new (C, DC) OMPCapturedExprDecl( + C, DC, Id, T, C.getTrivialTypeSourceInfo(T), StartLoc); } OMPCapturedExprDecl *OMPCapturedExprDecl::CreateDeserialized(ASTContext &C, unsigned ID) { - return new (C, ID) - OMPCapturedExprDecl(C, nullptr, nullptr, QualType(), SourceLocation()); + return new (C, ID) OMPCapturedExprDecl(C, nullptr, nullptr, QualType(), + /*TInfo=*/nullptr, SourceLocation()); } SourceRange OMPCapturedExprDecl::getSourceRange() const { |