From 772e266fbff40a566c9ef2d805c057c4692ac028 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 4 Oct 2019 01:25:59 +0000 Subject: Properly handle instantiation-dependent array bounds. We previously failed to treat an array with an instantiation-dependent but not value-dependent bound as being an instantiation-dependent type. We now track the array bound expression as part of a constant array type if it's an instantiation-dependent expression. llvm-svn: 373685 --- clang/lib/Frontend/Rewrite/RewriteObjC.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Frontend/Rewrite/RewriteObjC.cpp') diff --git a/clang/lib/Frontend/Rewrite/RewriteObjC.cpp b/clang/lib/Frontend/Rewrite/RewriteObjC.cpp index 0fd0c7f5036..dd57976df7a 100644 --- a/clang/lib/Frontend/Rewrite/RewriteObjC.cpp +++ b/clang/lib/Frontend/Rewrite/RewriteObjC.cpp @@ -497,8 +497,8 @@ namespace { StringLiteral *getStringLiteral(StringRef Str) { QualType StrType = Context->getConstantArrayType( - Context->CharTy, llvm::APInt(32, Str.size() + 1), ArrayType::Normal, - 0); + Context->CharTy, llvm::APInt(32, Str.size() + 1), nullptr, + ArrayType::Normal, 0); return StringLiteral::Create(*Context, Str, StringLiteral::Ascii, /*Pascal=*/false, StrType, SourceLocation()); } -- cgit v1.2.3