compilerplugins/clang/singlevalfields.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0792b859147d752bf298eb146ec3b2638cff8bf0
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Mar 28 08:28:51 2022 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Mon Mar 28 10:23:20 2022 +0200

    Adapt loplugin:singlevalfields to AtomicExpr
    
    > AtomicExpr 0xcb01120 'std::__detail::__platform_wait_t':'int'
    > |-ImplicitCastExpr 0xcb01108 'std::__detail::__platform_wait_t *' 
<LValueToRValue>
    > | `-MemberExpr 0xcb01048 'std::__detail::__platform_wait_t *' lvalue 
->_M_addr 0xcafd9c8
    > |   `-CXXThisExpr 0xcb01038 '__waiter_base<_Tp> *' implicit this
    > |-IntegerLiteral 0xcb01098 'int' 5
    > `-IntegerLiteral 0xcb01078 'int' 1
    > AtomicExpr 0xd1e2d08 'std::__detail::__platform_wait_t':'int'
    > |-ImplicitCastExpr 0xd1e2cf0 'std::__detail::__platform_wait_t *' 
<LValueToRValue>
    > | `-MemberExpr 0xd1e2cc0 'std::__detail::__platform_wait_t *' lvalue 
->_M_addr 0xcb02bf8
    > |   `-CXXThisExpr 0xd1e2cb0 'struct std::__detail::__waiter_base<struct 
std::__detail::__waiter_pool> *' implicit this
    > |-IntegerLiteral 0xcb01098 'int' 5
    > `-IntegerLiteral 0xcb01078 'int' 1
    > error: 'error' diagnostics seen but not expected:
    >   File 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/atomic_wait.h
 Line 312: oh dear, what can the matter be? [loplugin:singlevalfields]
    >   File 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/atomic_wait.h
 Line 312: oh dear, what can the matter be? [loplugin:singlevalfields]
    
    Change-Id: I71c43b482aaa0992b7ce131d27e262b8e3b4087f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132160
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/compilerplugins/clang/singlevalfields.cxx 
b/compilerplugins/clang/singlevalfields.cxx
index 3d966c9e9be3..df5abcc007b6 100644
--- a/compilerplugins/clang/singlevalfields.cxx
+++ b/compilerplugins/clang/singlevalfields.cxx
@@ -418,7 +418,7 @@ void SingleValFields::walkPotentialAssign( const 
DeclaratorDecl* fieldOrVarDecl,
         {
             break;
         }
-        else if ( isa<ArrayInitLoopExpr>(parent) || isa<GCCAsmStmt>(parent) || 
isa<VAArgExpr>(parent))
+        else if ( isa<ArrayInitLoopExpr>(parent) || isa<AtomicExpr>(parent) || 
isa<GCCAsmStmt>(parent) || isa<VAArgExpr>(parent))
         {
             bPotentiallyAssignedTo = true;
             break;

Reply via email to