From 6a047c979f4245644b0c6159eb9b14a896dc13e6 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 11 May 2010 18:17:16 +0000 Subject: It's bad form to create VarDecl's without DeclContexts llvm-svn: 103484 --- clang/lib/CodeGen/CGBlocks.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 8082b33fd66..f157f2f406e 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -813,7 +813,9 @@ CharUnits BlockFunction::getBlockOffset(const BlockDeclRefExpr *BDRE) { llvm::APInt(32, Pad.getQuantity()), ArrayType::Normal, 0); - ValueDecl *PadDecl = VarDecl::Create(getContext(), 0, SourceLocation(), + ValueDecl *PadDecl = VarDecl::Create(getContext(), + getContext().getTranslationUnitDecl(), + SourceLocation(), 0, QualType(PadTy), 0, VarDecl::None, VarDecl::None); Expr *E; -- cgit v1.2.3