================ @@ -207,6 +208,31 @@ After if AggressiveDependentMemberLookup is `true`: } }; +.. option:: CheckAnonFieldInParent + + When set to `true`, fields in anonymous records (i.e. anonymous + unions and structs) will be treated as names in the enclosing scope + rather than public members of the anonymous record for the purpose + of name checking. + +For example: + +.. code-block:: c++ + + class Foo { + private: + union { + int iv_; + float fv_; + }; + }; + +If CheckAnonFieldInParent is `false`, you may get warnings that ``iv_`` and +``fv_`` are not coherent to public member names, because ``iv_`` and ``fv_`` +are public members of the anonymous union. When CheckAnonFieldInParent is ---------------- PiotrZSL wrote:
:option:`CheckAnonFieldInParent` https://github.com/llvm/llvm-project/pull/75701 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits