diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-15 08:29:58 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-15 09:51:27 +0100 |
commit | a2cb1d16e71fd2b265c9ad4a497c5b8627ba9145 (patch) | |
tree | ce4a4cb4c9fec9851c6c99bcc39054a77f92a3f6 /compilerplugins/clang | |
parent | cb16c98aeff98dd14929d82130508a1516baf6ae (diff) |
Fix loplugin:singlevalfields handling of DesignatedInitExpr
...as seen when building CompilerTest_compilerplugins_clang against recent LLVM
18 trunk libc++,
> [CPT] compilerplugins/clang/test/singlevalfields.cxx
> DesignatedInitExpr 0x1388bb790 'void' lvalue bitfield
> `-MemberExpr 0x1388bb760 'const __alignment':'const enum std::__format_spec::__alignment' lvalue bitfield ->__alignment_ 0x1401d5868
> `-CXXThisExpr 0x1388bb750 'const __parser<_CharT> *' implicit this
[...]
> error: 'expected-error' diagnostics seen but not expected:
> File /Users/stephan/llvm/inst/bin/../include/c++/v1/__format/parser_std_format_spec.h Line 499: oh dear, what can the matter be? [loplugin:singlevalfields]
[...]
Change-Id: I1cce598780bafc9306c9fbc42a1c98ff1f5450a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162075
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/singlevalfields.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compilerplugins/clang/singlevalfields.cxx b/compilerplugins/clang/singlevalfields.cxx index 1e930878e6ff..4217114d3d89 100644 --- a/compilerplugins/clang/singlevalfields.cxx +++ b/compilerplugins/clang/singlevalfields.cxx @@ -412,6 +412,7 @@ void SingleValFields::walkPotentialAssign( const DeclaratorDecl* fieldOrVarDecl, || isa<UnresolvedMemberExpr>(parent) || isa<MaterializeTemporaryExpr>(parent) //??? || isa<InitListExpr>(parent) + || isa<DesignatedInitExpr>(parent) || isa<CXXUnresolvedConstructExpr>(parent) || isa<LambdaExpr>(parent) || isa<PackExpansionExpr>(parent) |