[clang-tools-extra] 76bd444 - Fix tests for clang-query completion

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 23 08:08:24 PST 2020


On Mon, Nov 23, 2020 at 10:34 AM Nico Weber via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
> Thanks for fixing the tests, but didn't the tests point out a true regression in clang-query functionality here?

We removed the IgnoreImplicitCastsAndParentheses traversal mode (it
was poorly supported and obviated by IgnoreUnlessSpelledInSource), so
these test changes look correct to me.

~Aaron

>
> On Mon, Nov 23, 2020 at 10:23 AM Stephen Kelly via cfe-commits <cfe-commits at lists.llvm.org> wrote:
>>
>>
>> Author: Stephen Kelly
>> Date: 2020-11-23T15:23:13Z
>> New Revision: 76bd4444e36197465f1c72f4b6f1d59721012a59
>>
>> URL: https://github.com/llvm/llvm-project/commit/76bd4444e36197465f1c72f4b6f1d59721012a59
>> DIFF: https://github.com/llvm/llvm-project/commit/76bd4444e36197465f1c72f4b6f1d59721012a59.diff
>>
>> LOG: Fix tests for clang-query completion
>>
>> Added:
>>
>>
>> Modified:
>>     clang-tools-extra/unittests/clang-query/QueryParserTest.cpp
>>
>> Removed:
>>
>>
>>
>> ################################################################################
>> diff  --git a/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp b/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp
>> index 4a0a80146af4..78d6f593777d 100644
>> --- a/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp
>> +++ b/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp
>> @@ -232,14 +232,12 @@ TEST_F(QueryParserTest, Complete) {
>>    EXPECT_EQ("dump", Comps[3].DisplayText);
>>
>>    Comps = QueryParser::complete("set traversal ", 14, QS);
>> -  ASSERT_EQ(3u, Comps.size());
>> +  ASSERT_EQ(2u, Comps.size());
>>
>>    EXPECT_EQ("AsIs ", Comps[0].TypedText);
>>    EXPECT_EQ("AsIs", Comps[0].DisplayText);
>> -  EXPECT_EQ("IgnoreImplicitCastsAndParentheses ", Comps[1].TypedText);
>> -  EXPECT_EQ("IgnoreImplicitCastsAndParentheses", Comps[1].DisplayText);
>> -  EXPECT_EQ("IgnoreUnlessSpelledInSource ", Comps[2].TypedText);
>> -  EXPECT_EQ("IgnoreUnlessSpelledInSource", Comps[2].DisplayText);
>> +  EXPECT_EQ("IgnoreUnlessSpelledInSource ", Comps[1].TypedText);
>> +  EXPECT_EQ("IgnoreUnlessSpelledInSource", Comps[1].DisplayText);
>>
>>    Comps = QueryParser::complete("match while", 11, QS);
>>    ASSERT_EQ(1u, Comps.size());
>>
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list