diff options
author | Alex Lorenz <arphaman@gmail.com> | 2016-10-24 09:33:32 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2016-10-24 09:33:32 +0000 |
commit | cb642b91363660df0d2ac5d466ffe0a13e10aa66 (patch) | |
tree | 670787b45a4a0cf11d0939bae5e1fdaf2f20dc32 /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | |
parent | 9fe1b80164ff39825d49e2778461dfd0698d9d83 (diff) | |
download | llvm-cb642b91363660df0d2ac5d466ffe0a13e10aa66.zip llvm-cb642b91363660df0d2ac5d466ffe0a13e10aa66.tar.gz llvm-cb642b91363660df0d2ac5d466ffe0a13e10aa66.tar.bz2 |
[Sema][TreeTransform] Re-create DesignatedInitExpr when a field designator
has no field declaration.
This commit fixes an invalid Winitializer-overrides warning that's shown
when analyzing a second (or any after the first) instantiation of a designated
initializer. This invalid warning is fixed by making sure that a
DesignatedInitExpr is rebuilt by the tree transformer when it has a field
designator whose FieldDecl* hasn't been yet initialized. This ensures that a
different DesignatedInitExpr is processed by Sema for every instantiation, and
thus the invalid warning is avoided.
rdar://28768441
Differential Revision: https://reviews.llvm.org/D25777
llvm-svn: 284959
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
0 files changed, 0 insertions, 0 deletions