[Lldb-commits] [PATCH] D54003: Refactor ClangASTContext::AddEnumerationValueToEnumerationType() to remove redundant parameter which can be calculated from other parameter
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 7 16:34:48 PST 2018
shafik added inline comments.
================
Comment at: include/lldb/Symbol/ClangASTContext.h:909
clang::EnumConstantDecl *AddEnumerationValueToEnumerationType(
- lldb::opaque_compiler_type_t type,
- const CompilerType &enumerator_qual_type, const Declaration &decl,
- const char *name, int64_t enum_value, uint32_t enum_value_bit_size);
+ const CompilerType enum_type, const Declaration &decl, const char *name,
+ int64_t enum_value, uint32_t enum_value_bit_size);
----------------
jingham wrote:
> clayborg wrote:
> > teemperor wrote:
> > > Can we pass `enum_type` as const ref?
> > CompilerType instances are two pointers. Pretty cheap to copy.
> We're not entirely consistent, but a quick glance through headers show us almost always choosing to pass "const CompilerType &" over "const CompilerType".
That was a good catch, thank you!
https://reviews.llvm.org/D54003
More information about the lldb-commits
mailing list