[PATCH] D23397: [clang-rename] cleanup `auto` usages
Kirill Bobyrev via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 11 03:09:35 PDT 2016
omtcyfz created this revision.
omtcyfz added reviewers: alexfh, klimek.
omtcyfz added a subscriber: cfe-commits.
As Alexander pointed out, LLVM Coding Standards are more conservative about using `auto`, i.e. it should be used in the following situations:
* When the type is //obvious//, i.e. explicitly mentioned in the same expression. For example `if (const clang::FieldDecl *FieldDecl = Initializer->getMember())`
* When the type is totally non-obvious and one iterates over something. For example `for (const auto &CurrDecl : Context.getTranslationUnitDecl()->decls())`.
Otherwise the type should be explicitly stated.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8370 bytes
Desc: not available
More information about the cfe-commits