Displaying 3 results from an estimated 3 matches for "nodeconstructormap".
2018 Nov 25
6
RFC: Modernizing our use of auto
...`!= nullptr` etc.
I'd also like to update them so that
llvm::Optional<std::pair<std::string, MatcherCtor>>
getNodeConstructorType(ASTNodeKind targetType) {
auto const &ctors = RegistryData->nodeConstructors();
auto it = llvm::find_if(
ctors, [targetType](const NodeConstructorMap::value_type &ctor) {
return ctor.first.isSame(targetType);
});
if (it == ctors.end())
return llvm::None;
return it->second;
}
is acceptable. The `auto it` is already acceptable, but the `auto const&
ctors` depends on an interpretation of the guideline and was...
2018 Dec 04
4
[cfe-dev] RFC: Modernizing our use of auto
...so that
> >
> > llvm::Optional<std::pair<std::string, MatcherCtor>>
> > getNodeConstructorType(ASTNodeKind targetType) {
> > auto const &ctors = RegistryData->nodeConstructors();
> > auto it = llvm::find_if(
> > ctors, [targetType](const NodeConstructorMap::value_type &ctor) {
> > return ctor.first.isSame(targetType);
> > });
> > if (it == ctors.end())
> > return llvm::None;
> > return it->second;
> > }
> >
> > is acceptable. The `auto it` is already acceptable, but the `auto con...
2018 Dec 31
4
RFC: Modernizing our use of auto
On Dec 16, 2018, at 11:44 AM, Stephen Kelly via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> On 25/11/2018 14:43, Stephen Kelly via llvm-dev wrote:
>> However this is a proposal for more modern thinking regarding the permissiveness of auto in LLVM codebases.
>> Currently the rule on the use of auto is here:
>
> Hi,
>
> Thanks for the input on this topic,