[PATCH] D51135: Rename has{MutableFields, VolatileMember} to has{Mutable, Volatile}Subobject. NFC.
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 22 15:45:18 PDT 2018
Quuxplusone created this revision.
Herald added a subscriber: cfe-commits.
Rename `HasMutableFields` to `HasMutableSubobject` for accuracy.
This bitflag is set whenever the record type has a mutable subobject,
regardless of whether that subobject is a direct member, or a member
of some base class, or a member of a member, etc. etc.
It does not need to be a field of the record type itself.
Rename `HasVolatileMember` to `HasVolatileSubobject` for accuracy.
This bitflag is set whenever the record type has a volatile subobject,
regardless of whether that subobject is a direct member, or a member
of some base class, or a member of a member, etc. etc.
It does not need to be a member of the record type itself.
Generally in C++ if we have
struct A { mutable int m; };
struct B { A a; };
we say that `a` is a "member" or "field" of `B`; `m` is a "subobject" of `B`; but `m` is neither a "member" nor a "field" of `B`.
The current naming of these accessors confused me for a little while during the development of a different patch, so I thought I'd submit a diff renaming them after what they actually do, and see if anyone thought it was a good idea. (I don't have commit privs.)
Repository:
rC Clang
https://reviews.llvm.org/D51135
Files:
include/clang/AST/Decl.h
include/clang/AST/DeclBase.h
include/clang/AST/DeclCXX.h
lib/AST/ASTDumper.cpp
lib/AST/ASTImporter.cpp
lib/AST/Decl.cpp
lib/AST/DeclCXX.cpp
lib/AST/ExprConstant.cpp
lib/CodeGen/CGAtomic.cpp
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaOpenMP.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriter.cpp
lib/Serialization/ASTWriterDecl.cpp
lib/StaticAnalyzer/Core/CallEvent.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51135.162076.patch
Type: text/x-patch
Size: 16703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180822/2b622f40/attachment-0001.bin>
More information about the cfe-commits
mailing list