This is an archive of the discontinued LLVM Phabricator instance.

Allow comments with '#' in dynamic AST Matchers
ClosedPublic

Authored by steveire on Oct 1 2018, 3:45 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

steveire created this revision.Oct 1 2018, 3:45 PM
aaron.ballman added inline comments.Oct 2 2018, 6:57 AM
unittests/ASTMatchers/Dynamic/ParserTest.cpp
188–190 ↗(On Diff #167846)

Why are empty errors created? I would have expected this to be EXPECT_EQ(0, Sema.Errors.size()).

(If this formulation is desired, it should use a range-based for loop.)

steveire updated this revision to Diff 167987.Oct 2 2018, 11:15 AM

use cxx_range_for

steveire marked an inline comment as done.Oct 2 2018, 11:16 AM
steveire added inline comments.
unittests/ASTMatchers/Dynamic/ParserTest.cpp
188–190 ↗(On Diff #167846)

This is a copy-paste from elsewhere in the file.

My guess is the author intended the test to print any messages that get recorded while running the unit test (They will differ from the empty string).

steveire marked 2 inline comments as done.Oct 2 2018, 11:16 AM
aaron.ballman accepted this revision.Oct 2 2018, 2:35 PM

Aside from some naming and style convention nits, LGTM.

unittests/ASTMatchers/Dynamic/ParserTest.cpp
151 ↗(On Diff #167987)

const auto &E please.

188 ↗(On Diff #167987)

const auto &E please.

This revision is now accepted and ready to land.Oct 2 2018, 2:35 PM
This revision was automatically updated to reflect the committed changes.