aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-query
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2019-12-29 14:48:47 +0000
committerStephen Kelly <steveire@gmail.com>2019-12-29 14:58:56 +0000
commit544f200c785f0314949ba3b8d1c51f65bf8d7761 (patch)
treeaf4c871751d544add5732be8137e8b77b8fe4d4a /clang-tools-extra/clang-query
parentdc93540acbf047cf54052568d2826d1a06df025e (diff)
downloadllvm-544f200c785f0314949ba3b8d1c51f65bf8d7761.zip
llvm-544f200c785f0314949ba3b8d1c51f65bf8d7761.tar.gz
llvm-544f200c785f0314949ba3b8d1c51f65bf8d7761.tar.bz2
Fix newline handling in clang-query parser
Don't prematurely remove characters from the end of the string
Diffstat (limited to 'clang-tools-extra/clang-query')
-rw-r--r--clang-tools-extra/clang-query/QueryParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-query/QueryParser.cpp b/clang-tools-extra/clang-query/QueryParser.cpp
index a980722..896145b 100644
--- a/clang-tools-extra/clang-query/QueryParser.cpp
+++ b/clang-tools-extra/clang-query/QueryParser.cpp
@@ -250,7 +250,7 @@ QueryRef QueryParser::doParse() {
return completeMatcherExpression();
Diagnostics Diag;
- auto MatcherSource = Line.trim();
+ auto MatcherSource = Line.ltrim();
auto OrigMatcherSource = MatcherSource;
Optional<DynTypedMatcher> Matcher = Parser::parseMatcherExpression(
MatcherSource, nullptr, &QS.NamedValues, &Diag);