mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Run clang-tidy over toolchain code. (#3105)
Amongst other changes, this removes the implicit StringRef cast in formatter code due to google-explicit-constructor. Only one line of code relied on the implicit cast, and style says "Do not define implicit conversions." (https://google.github.io/styleguide/cppguide.html#Implicit_Conversions). --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
fa857e42be
commit
09242eeebd
@@ -640,8 +640,9 @@ auto SemanticsContext::GetUnqualifiedType(SemanticsTypeId type_id)
|
||||
-> SemanticsTypeId {
|
||||
SemanticsNode type_node =
|
||||
semantics_ir_->GetNode(semantics_ir_->GetTypeAllowBuiltinTypes(type_id));
|
||||
if (type_node.kind() == SemanticsNodeKind::ConstType)
|
||||
if (type_node.kind() == SemanticsNodeKind::ConstType) {
|
||||
return type_node.GetAsConstType();
|
||||
}
|
||||
return type_id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user