This is an archive of the discontinued LLVM Phabricator instance.

[Clang] Use autos in lib/AST/ASTContext.cpp
AbandonedPublic

Authored by Eugene.Zelenko on Dec 8 2015, 10:48 AM.

Details

Summary

I fixed Clang-tidy modernize-use-auto warnings. Autos are also used for pointer variables assigned via casts. Patch includes other minor cleanups.

Build and regressions were fine on RHEL 6.

Diff Detail

Event Timeline

Eugene.Zelenko retitled this revision from to [Clang] Use autos in lib/AST/ASTContext.cpp.
Eugene.Zelenko updated this object.
Eugene.Zelenko added reviewers: hans, aaron.ballman.
Eugene.Zelenko set the repository for this revision to rL LLVM.
Eugene.Zelenko added a subscriber: cfe-commits.
jroelofs added inline comments.
lib/AST/ASTContext.cpp
429

return new ...

aaron.ballman added inline comments.Dec 8 2015, 11:04 AM
lib/AST/ASTContext.cpp
299

Can this now fit onto one line? If not, I don't think this is an improvement.

2478

I'm not convinced this one is better than the previous incarnation due to the type being on a separate line.

2772

Same here.

2816

And here as well. (I'll stop commenting on these unless I have something new to add.)

3270

Here as well, but with stronger feelings due to there being no indication of initialization until the next line. This applies elsewhere in this patch as well.

Eugene.Zelenko added inline comments.Dec 8 2015, 11:04 AM
lib/AST/ASTContext.cpp
429

Will fix in commit.

Eugene.Zelenko abandoned this revision.Jan 14 2016, 6:48 PM