diff options
author | Richard Smith <richard@metafoo.co.uk> | 2021-08-25 11:01:45 -0700 |
---|---|---|
committer | Richard Smith <richard@metafoo.co.uk> | 2021-08-25 11:36:11 -0700 |
commit | ea1c01dde03b45e0b33d3883147d3b4fb489978c (patch) | |
tree | 4e7ce8ed3e2d83a3b08df26e1d35f290cdd786fd /clang/lib/Sema/SemaInit.cpp | |
parent | d5f7f356cea3790df7183bd6e994b1e140163177 (diff) | |
download | llvm-ea1c01dde03b45e0b33d3883147d3b4fb489978c.zip llvm-ea1c01dde03b45e0b33d3883147d3b4fb489978c.tar.gz llvm-ea1c01dde03b45e0b33d3883147d3b4fb489978c.tar.bz2 |
PR51105: look through ConstantExpr when looking for a braced string literal initialization.
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 78574e3..111d93b1 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -2899,7 +2899,7 @@ InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, // We're modifying a string literal init; we have to decompose the string // so we can modify the individual characters. ASTContext &Context = SemaRef.Context; - Expr *SubExpr = StructuredList->getInit(0)->IgnoreParens(); + Expr *SubExpr = StructuredList->getInit(0)->IgnoreParenImpCasts(); // Compute the character type QualType CharTy = AT->getElementType(); |