This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by Eugene.Zelenko on Dec 8 2015, 5:54 PM.

Details

Summary

Autos are also used for pointer variables assigned via casts or memory allocation. 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/ASTImporter.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.
aaron.ballman added inline comments.Dec 10 2015, 10:59 AM
lib/AST/ASTImporter.cpp
1676

I don't think it is an improvement when the deduced type is written on the subsequent line (here and elsewhere). I wonder if that's something we can teach clang-format. e.g.,

const auto *ToDecl = dyn_cast_or_null<TypedefNameDecl>(
  Importer.Import(T->getDecl()));

would be an improvement, but only in the case where the declaration type needs to be deduced.

5855

Can you fix the formatting here while you're at it? (Same below.)

lib/AST/ASTImporter.cpp
5855

Sorry, I do see problem. Could you please elaborate more?

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