This revision was automatically updated to reflect the committed changes. Closed by commit rC333746: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file (authored by erichkeane, committed by ).
Changed prior to commit: https://reviews.llvm.org/D46667?vs=147538&id=149441#toc Repository: rC Clang https://reviews.llvm.org/D46667 Files: include/clang/AST/DeclOpenMP.h lib/AST/DeclOpenMP.cpp Index: lib/AST/DeclOpenMP.cpp =================================================================== --- lib/AST/DeclOpenMP.cpp +++ lib/AST/DeclOpenMP.cpp @@ -92,13 +92,14 @@ 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 { Index: include/clang/AST/DeclOpenMP.h =================================================================== --- include/clang/AST/DeclOpenMP.h +++ include/clang/AST/DeclOpenMP.h @@ -189,8 +189,9 @@ 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(); }
Index: lib/AST/DeclOpenMP.cpp =================================================================== --- lib/AST/DeclOpenMP.cpp +++ lib/AST/DeclOpenMP.cpp @@ -92,13 +92,14 @@ 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 { Index: include/clang/AST/DeclOpenMP.h =================================================================== --- include/clang/AST/DeclOpenMP.h +++ include/clang/AST/DeclOpenMP.h @@ -189,8 +189,9 @@ 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(); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits