diff options
| author | Mandeep Singh Grang <mgrang@codeaurora.org> | 2016-11-08 07:50:19 +0000 |
|---|---|---|
| committer | Mandeep Singh Grang <mgrang@codeaurora.org> | 2016-11-08 07:50:19 +0000 |
| commit | 7c7ea7d0ae4041e92a4d510874e78da9f5e3bc1c (patch) | |
| tree | 58745ba1b5123ed61711bbf23879bf5350c74e81 /clang-tools-extra/clang-query/QueryParser.cpp | |
| parent | d700c357d4689abb48121f61690a4080e39c326d (diff) | |
[clang-tools-extra] Format sources with clang-format. NFC.
Summary:
Ran clang-format on all .c/.cpp/.h files in clang-tools-extra.
Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories.
Reviewers: klimek, alexfh
Subscribers: nemanjai
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D26329
llvm-svn: 286221
Diffstat (limited to 'clang-tools-extra/clang-query/QueryParser.cpp')
| -rw-r--r-- | clang-tools-extra/clang-query/QueryParser.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/clang-tools-extra/clang-query/QueryParser.cpp b/clang-tools-extra/clang-query/QueryParser.cpp index e25b69700b05..15d6bbc1e7d7 100644 --- a/clang-tools-extra/clang-query/QueryParser.cpp +++ b/clang-tools-extra/clang-query/QueryParser.cpp @@ -76,9 +76,7 @@ template <typename T> struct QueryParser::LexOrCompleteWord { return *this; } - T Default(const T& Value) const { - return Switch.Default(Value); - } + T Default(const T &Value) const { return Switch.Default(Value); } }; // Lexes a word and stores it in Word. Returns a LexOrCompleteWord<T> object @@ -101,9 +99,9 @@ QueryParser::lexOrCompleteWord(StringRef &Word) { QueryRef QueryParser::parseSetBool(bool QuerySession::*Var) { StringRef ValStr; unsigned Value = lexOrCompleteWord<unsigned>(ValStr) - .Case("false", 0) - .Case("true", 1) - .Default(~0u); + .Case("false", 0) + .Case("true", 1) + .Default(~0u); if (Value == ~0u) { return new InvalidQuery("expected 'true' or 'false', got '" + ValStr + "'"); } @@ -145,11 +143,7 @@ enum ParsedQueryKind { PQK_Quit }; -enum ParsedQueryVariable { - PQV_Invalid, - PQV_Output, - PQV_BindRoot -}; +enum ParsedQueryVariable { PQV_Invalid, PQV_Output, PQV_BindRoot }; QueryRef makeInvalidQueryFromDiagnostics(const Diagnostics &Diag) { std::string ErrStr; @@ -158,7 +152,7 @@ QueryRef makeInvalidQueryFromDiagnostics(const Diagnostics &Diag) { return new InvalidQuery(OS.str()); } -} // namespace +} // namespace QueryRef QueryParser::completeMatcherExpression() { std::vector<MatcherCompletion> Comps = Parser::completeExpression( |
