This is an archive of the discontinued LLVM Phabricator instance.

Fix LookupTest where it was missing an assertion
AbandonedPublic

Authored by probinson on Feb 4 2022, 2:43 PM.

Details

Summary

The preceding EXPECT_EQ was never executed; modifying the test input
made that happen.

Found by the Rotten Green Tests project.

Diff Detail

Event Timeline

probinson requested review of this revision.Feb 4 2022, 2:43 PM
probinson created this revision.

By "the EXPECT_EQ was never executed" I mean, replacing it with assert(false); does not crash the test. The string "a::b::Foo" was never seen by the Visitor.

Maybe this indicates some much more subtle, deeper problem; I don't know. This change does cause the EXPECT_EQ to be executed, though.

Ping; + @bkramer who reviewed the original patch that added this test.

probinson added a subscriber: hokein.

+ @hokein who has done work in the one place where replaceNestedName is used.

Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2022, 12:56 PM

Thanks for the change, but the test is actually checking for rename in presence of using-decls. I beleive https://reviews.llvm.org/D121103 is the proper fix here.

probinson abandoned this revision.Mar 15 2022, 10:39 AM

Thanks for the change, but the test is actually checking for rename in presence of using-decls. I beleive https://reviews.llvm.org/D121103 is the proper fix here.

Awesome, thanks! Abandoning this one.