ClickHouse/dbms/src/Parsers
Amos Bird ea84430864 Get rid of useless std::move to get NRVO
http://eel.is/c++draft/class.copy.elision#:constructor,copy,elision

Some quote:

> Speaking of RVO, return std::move(w); prohibits it. It means "use move constructor or fail to compile", whereas return w; means "use RVO, and if you can't, use move constructor, and if you can't, use copy constructor, and if you can't, fail to compile."

There is one exception to this rule:
```cpp
Block FilterBlockInputStream::removeFilterIfNeed(Block && block)
{
    if (block && remove_filter)
        block.erase(static_cast<size_t>(filter_column));

    return std::move(block);
}
```

because references are not eligible for NRVO, which is another rule "always move rvalue references and forward universal references" that takes precedence.
2018-08-27 22:15:48 +08:00
..
tests Cmake: mark system includes as SYSTEM (#1449) 2018-06-06 23:21:58 +03:00
ASTAlterQuery.cpp make ASTAlterQuery::Parameters a real AST element ASTAlterCommand [#CLICKHOUSE-3747] 2018-06-13 17:13:28 +03:00
ASTAlterQuery.h Update ASTAlterQuery.h 2018-06-13 23:00:10 +03:00
ASTAsterisk.cpp Get rid of useless std::move to get NRVO 2018-08-27 22:15:48 +08:00
ASTAsterisk.h Added IAST::appendColumnName(WriteBuffer &); reimplemented IAST::getColumnName() using it. 2018-06-28 20:25:09 +03:00
ASTCheckQuery.h Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2] 2018-06-03 23:39:06 +03:00
ASTColumnDeclaration.h Renamed need_parents back to need_parens. [#CLICKHOUSE-3735] 2018-05-18 21:28:11 +03:00
ASTCreateQuery.h Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2] 2018-06-03 23:39:06 +03:00
ASTDropQuery.cpp Fixed error with DROP TEMPORARY queries #2624 2018-07-16 06:34:05 +03:00
ASTDropQuery.h Merging: Fixed most of problems #2260 2018-06-09 19:03:07 +03:00
ASTEnumElement.h Renamed need_parents back to need_parens. [#CLICKHOUSE-3735] 2018-05-18 21:28:11 +03:00
ASTExpressionList.cpp Get rid of useless std::move to get NRVO 2018-08-27 22:15:48 +08:00
ASTExpressionList.h Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ASTFunction.cpp Added IAST::appendColumnName(WriteBuffer &); reimplemented IAST::getColumnName() using it. 2018-06-28 20:25:09 +03:00
ASTFunction.h Added IAST::appendColumnName(WriteBuffer &); reimplemented IAST::getColumnName() using it. 2018-06-28 20:25:09 +03:00
ASTIdentifier.cpp Quote all identifiers when querying external database #2635 2018-07-20 03:04:48 +03:00
ASTIdentifier.h Added IAST::appendColumnName(WriteBuffer &); reimplemented IAST::getColumnName() using it. 2018-06-28 20:25:09 +03:00
ASTInsertQuery.cpp Renamed need_parents back to need_parens. [#CLICKHOUSE-3735] 2018-05-18 21:28:11 +03:00
ASTInsertQuery.h Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2] 2018-06-03 23:39:06 +03:00
ASTKillQueryQuery.cpp ISSUES-2688 support on cluster for kill & optimize query 2018-07-24 22:07:13 +03:00
ASTKillQueryQuery.h Get rid of useless std::move to get NRVO 2018-08-27 22:15:48 +08:00
ASTLiteral.cpp Added IAST::appendColumnName(WriteBuffer &); reimplemented IAST::getColumnName() using it. 2018-06-28 20:25:09 +03:00
ASTLiteral.h Added IAST::appendColumnName(WriteBuffer &); reimplemented IAST::getColumnName() using it. 2018-06-28 20:25:09 +03:00
ASTNameTypePair.h Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ASTOptimizeQuery.cpp Update ASTOptimizeQuery.cpp 2018-07-24 22:07:13 +03:00
ASTOptimizeQuery.h ISSUES-2688 support on cluster for kill & optimize query 2018-07-24 22:07:13 +03:00
ASTOrderByElement.cpp Fixed linking [#CLICKHOUSE-2]. 2017-11-20 08:59:58 +03:00
ASTOrderByElement.h Get rid of useless std::move to get NRVO 2018-08-27 22:15:48 +08:00
ASTPartition.cpp allow arbitrary partition literals in ALTER PARTITION queries [#CLICKHOUSE-3000] 2017-09-26 20:40:02 +03:00
ASTPartition.h Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ASTQualifiedAsterisk.cpp Added IAST::appendColumnName(WriteBuffer &); reimplemented IAST::getColumnName() using it. 2018-06-28 20:25:09 +03:00
ASTQualifiedAsterisk.h Get rid of useless std::move to get NRVO 2018-08-27 22:15:48 +08:00
ASTQueryWithOnCluster.cpp Lib Parsers 2017-11-21 22:35:54 +03:00
ASTQueryWithOnCluster.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ASTQueryWithOutput.cpp Removed superfluous FORMAT statements in .sql files. [#CLICKHOUSE-3] 2018-02-12 23:35:56 +03:00
ASTQueryWithOutput.h Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2] 2018-06-03 23:39:06 +03:00
ASTQueryWithTableAndOutput.h Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2] 2018-06-03 23:39:06 +03:00
ASTRenameQuery.h Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2] 2018-06-03 23:39:06 +03:00
ASTSampleRatio.cpp Moved headers and sources to same place [#CLICKHOUSE-3]. 2017-04-01 12:22:42 +03:00
ASTSampleRatio.h Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ASTSelectQuery.cpp Fixed bad code #2708 2018-07-28 00:33:30 +03:00
ASTSelectQuery.h CLICKHOUSE-3837 fix mistakes 2018-07-25 15:31:47 +03:00
ASTSelectWithUnionQuery.cpp Fixed highlight for UNION ALL [#CLICKHOUSE-3689] 2018-04-05 00:05:11 +03:00
ASTSelectWithUnionQuery.h Better UNION ALL: development #1947 2018-02-26 13:12:26 +03:00
ASTSetQuery.h Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2] 2018-06-03 23:39:06 +03:00
ASTShowProcesslistQuery.h fix typo of struct name 2018-04-20 16:27:48 +03:00
ASTShowTablesQuery.h Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2] 2018-06-03 23:39:06 +03:00
ASTSubquery.cpp Added IAST::appendColumnName(WriteBuffer &); reimplemented IAST::getColumnName() using it. 2018-06-28 20:25:09 +03:00
ASTSubquery.h Added IAST::appendColumnName(WriteBuffer &); reimplemented IAST::getColumnName() using it. 2018-06-28 20:25:09 +03:00
ASTSystemQuery.cpp Add test for profile events logging. [#CLICKHOUSE-2910] 2018-06-14 14:56:12 +03:00
ASTSystemQuery.h Merge remote-tracking branch 'origin/master' into CLICKHOUSE-2910 2018-06-14 16:04:00 +03:00
ASTTablesInSelectQuery.cpp Renamed need_parents back to need_parens. [#CLICKHOUSE-3735] 2018-05-18 21:28:11 +03:00
ASTTablesInSelectQuery.h Whitespaces [#CLICKHOUSE-2]. 2017-06-26 11:33:56 +03:00
ASTUseQuery.h Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2] 2018-06-03 23:39:06 +03:00
ASTWithAlias.cpp Quote all identifiers when querying external database #2635 2018-07-20 03:04:48 +03:00
ASTWithAlias.h Preparation for extra warnings [#CLICKHOUSE-2] 2018-08-10 07:02:56 +03:00
CMakeLists.txt Lib Parsers 2017-11-21 22:35:54 +03:00
CommonParsers.cpp Make separate libs Common/ZooKeeper and Common/ConfigProcessor (#1749) 2018-01-15 22:07:47 +03:00
CommonParsers.h Better [#CLICKHOUSE-2]. 2017-12-01 21:36:55 +03:00
ExpressionElementParsers.cpp Better fix #2660 2018-07-19 23:51:03 +03:00
ExpressionElementParsers.h Fixed code with extremely high level of ugliness [#CLICKHOUSE-3764] 2018-06-07 23:25:38 +03:00
ExpressionListParsers.cpp Fixed code with extremely high level of ugliness [#CLICKHOUSE-3764] 2018-06-07 23:25:38 +03:00
ExpressionListParsers.h Fixed code with extremely high level of ugliness [#CLICKHOUSE-3764] 2018-06-07 23:25:38 +03:00
formatAST.cpp Quote all identifiers when querying external database #2635 2018-07-20 03:04:48 +03:00
formatAST.h Quote all identifiers when querying external database #2635 2018-07-20 03:04:48 +03:00
IAST.cpp Quote all identifiers when querying external database #2635 2018-07-20 03:04:48 +03:00
IAST.h Quote all identifiers when querying external database #2635 2018-07-20 03:04:48 +03:00
IdentifierQuotingStyle.h Added missing file #2635 2018-07-20 03:04:48 +03:00
iostream_debug_helpers.cpp Fixed style a bit [#CLICKHOUSE-2] 2018-05-07 05:01:29 +03:00
iostream_debug_helpers.h Fix build 2018-04-13 23:16:12 +03:00
IParser.h Using lexer: better error messages [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
IParserBase.cpp Fixed error [#CLICKHOUSE-2] 2018-02-26 06:47:32 +03:00
IParserBase.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
Lexer.cpp minor fixes 2018-03-27 22:14:48 +03:00
Lexer.h minor fixes 2018-03-27 22:14:48 +03:00
parseDatabaseAndTableName.cpp Add query ALTER TABLE t1 [REPLACE|ATTACH] PARTITION FROM t2 2018-05-21 16:49:54 +03:00
parseDatabaseAndTableName.h Add query ALTER TABLE t1 [REPLACE|ATTACH] PARTITION FROM t2 2018-05-21 16:49:54 +03:00
parseIdentifierOrStringLiteral.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
parseIdentifierOrStringLiteral.h Update parseIdentifierOrStringLiteral.h 2017-11-21 22:35:54 +03:00
parseQuery.cpp minor fixes 2018-04-16 18:11:13 +03:00
parseQuery.h minor fixes 2018-04-16 18:11:13 +03:00
ParserAlterQuery.cpp make ASTAlterQuery::Parameters a real AST element ASTAlterCommand [#CLICKHOUSE-3747] 2018-06-13 17:13:28 +03:00
ParserAlterQuery.h make ASTAlterQuery::Parameters a real AST element ASTAlterCommand [#CLICKHOUSE-3747] 2018-06-13 17:13:28 +03:00
ParserCase.cpp CLICKHOUSE-3819 add CASE without ELSE 2018-08-22 18:17:40 +03:00
ParserCase.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ParserCheckQuery.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ParserCheckQuery.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ParserCreateQuery.cpp Fixed code with extremely high level of ugliness [#CLICKHOUSE-3764] 2018-06-07 23:25:38 +03:00
ParserCreateQuery.h Fixed code with extremely high level of ugliness [#CLICKHOUSE-3764] 2018-06-07 23:25:38 +03:00
ParserDescribeTableQuery.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ParserDescribeTableQuery.h removed macro DEFINE_AST_QUERY_WITH_TABLE_AND_OUTPUT 2017-11-03 16:24:52 +03:00
ParserDropQuery.cpp ISSUES-2259 fix the test after the merge master 2018-05-21 11:38:46 +08:00
ParserDropQuery.h ISSUES-2259 support truncate syntax 2018-05-21 11:38:46 +08:00
ParserInsertQuery.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ParserInsertQuery.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ParserKillQueryQuery.cpp ISSUES-2688 support on cluster for kill & optimize query 2018-07-24 22:07:13 +03:00
ParserKillQueryQuery.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ParserOptimizeQuery.cpp ISSUES-2688 support on cluster for kill & optimize query 2018-07-24 22:07:13 +03:00
ParserOptimizeQuery.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ParserPartition.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ParserPartition.h allow arbitrary partition literals in ALTER PARTITION queries [#CLICKHOUSE-3000] 2017-09-26 20:40:02 +03:00
ParserQuery.cpp ISSUES-2688 support on cluster for kill & optimize query 2018-07-24 22:07:13 +03:00
ParserQuery.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ParserQueryWithOutput.cpp ISSUES-2688 support on cluster for kill & optimize query 2018-07-24 22:07:13 +03:00
ParserQueryWithOutput.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ParserRenameQuery.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ParserRenameQuery.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ParserSampleRatio.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ParserSampleRatio.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ParserSelectQuery.cpp CLICKHOUSE-3211 add Exception 2018-08-13 13:45:27 +03:00
ParserSelectQuery.h Better UNION ALL: development #1947 2018-02-25 03:50:53 +03:00
ParserSelectWithUnionQuery.cpp Miscellaneous #2134 2018-04-19 06:08:22 +03:00
ParserSelectWithUnionQuery.h Miscellaneous #2134 2018-04-19 06:08:22 +03:00
ParserSetQuery.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ParserSetQuery.h use more typesafe AST objects in ASTCreateQuery [#CLICKHOUSE-3000] 2017-10-20 21:28:41 +03:00
ParserShowProcesslistQuery.h Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ParserShowTablesQuery.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ParserShowTablesQuery.h ISSUES-117 resolve some opinions 2018-02-03 16:00:14 +08:00
ParserSystemQuery.cpp Add query ALTER TABLE t1 [REPLACE|ATTACH] PARTITION FROM t2 2018-05-21 16:49:54 +03:00
ParserSystemQuery.h Use only one cache in DNSCache. Add requested changes. [#CLICKHOUSE-2931] 2017-09-01 20:05:24 +03:00
ParserTablePropertiesQuery.cpp added SHOW CREATE DATABASE query [#CLICKHOUSE-3590] 2018-03-12 18:21:50 +03:00
ParserTablePropertiesQuery.h removed macro DEFINE_AST_QUERY_WITH_TABLE_AND_OUTPUT 2017-11-03 16:24:52 +03:00
ParserTablesInSelectQuery.cpp Removed bad code that may lead to (harmless) race condition [#CLICKHOUSE-2] 2018-02-24 04:31:42 +03:00
ParserTablesInSelectQuery.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
ParserUnionQueryElement.cpp Modified names #2015 2018-08-20 18:49:39 +03:00
ParserUnionQueryElement.h ISSUES-2133 Support union query with subquery 2018-03-29 09:06:17 +08:00
ParserUseQuery.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
ParserUseQuery.h Using lexer (incomplete) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
queryToString.cpp Simplification of AST #1947 2018-02-26 06:40:20 +03:00
queryToString.h Add new virtual columns into system.tables. [#CLICKHOUSE-3554] 2018-02-08 17:15:40 +03:00
StringRange.h Preparation for extra warnings [#CLICKHOUSE-2] 2018-08-10 07:02:56 +03:00
TablePropertiesQueriesASTs.h Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2] 2018-06-03 23:39:06 +03:00
TokenIterator.cpp Using lexer: added missing file [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00
TokenIterator.h minor fixes 2018-03-27 22:14:48 +03:00