[gardening] C++ gardening: Terminate namespaces, fix argument names, ...

Changes:
* Terminate all namespaces with the correct closing comment.
* Make sure argument names in comments match the corresponding parameter name.
* Remove redundant get() calls on smart pointers.
* Prefer using "override" or "final" instead of "virtual". Remove "virtual" where appropriate.
This commit is contained in:
practicalswift
2016-12-17 00:32:42 +01:00
parent 2ff90611a8
commit 38be6125e5
165 changed files with 508 additions and 505 deletions

View File

@@ -1538,8 +1538,8 @@ SourceFile::getDiscriminatorForPrivateValue(const ValueDecl *D) const {
// FIXME: And there are more compact ways to encode a 16-byte value.
buffer.reserve(buffer.size() + 2*llvm::array_lengthof(result));
for (uint8_t byte : result) {
buffer.push_back(llvm::hexdigit(byte >> 4, /*lowercase=*/false));
buffer.push_back(llvm::hexdigit(byte & 0xF, /*lowercase=*/false));
buffer.push_back(llvm::hexdigit(byte >> 4, /*LowerCase=*/false));
buffer.push_back(llvm::hexdigit(byte & 0xF, /*LowerCase=*/false));
}
PrivateDiscriminator = getASTContext().getIdentifier(buffer);