Enabling -Wshadow [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-08-26 05:19:18 +03:00
parent 042d84e1e3
commit 167d8ec529
2 changed files with 4 additions and 4 deletions

View File

@ -8,12 +8,12 @@ namespace DB
void ASTIdentifier::formatImplWithoutAlias(const FormatSettings & settings, FormatState &, FormatStateStacked) const
{
auto format_element = [&](const String & name)
auto format_element = [&](const String & elem_name)
{
settings.ostr << (settings.hilite ? hilite_identifier : "");
WriteBufferFromOStream wb(settings.ostr, 32);
settings.writeIdentifier(name, wb);
settings.writeIdentifier(elem_name, wb);
wb.next();
settings.ostr << (settings.hilite ? hilite_none : "");

View File

@ -233,8 +233,8 @@ bool ParserFunction::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
&& contents_begin[8] >= '0' && contents_begin[8] <= '9'
&& contents_begin[9] >= '0' && contents_begin[9] <= '9')
{
std::string contents(contents_begin, contents_end - contents_begin);
throw Exception("Argument of function toDate is unquoted: toDate(" + contents + "), must be: toDate('" + contents + "')"
std::string contents_str(contents_begin, contents_end - contents_begin);
throw Exception("Argument of function toDate is unquoted: toDate(" + contents_str + "), must be: toDate('" + contents_str + "')"
, ErrorCodes::SYNTAX_ERROR);
}