This is an archive of the discontinued LLVM Phabricator instance.

Introduce Parser::completeExpression.
ClosedPublic

Authored by pcc on Nov 24 2013, 11:53 PM.

Details

Summary

This function returns a list of completions for a given expression and
completion position.

Diff Detail

Event Timeline

sbenza added inline comments.Nov 25 2013, 6:57 AM
lib/ASTMatchers/Dynamic/Parser.cpp
294 ↗(On Diff #5752)

Can you add a scoped object that will pop_back automatically?

388 ↗(On Diff #5752)

Is there a good use case for not aborting the parse if lookupMatcherCtor() returns null?
(instead of pushing it into the stack and then checking if there is a null in the stack)

pcc updated this revision to Unknown Object (????).Jan 23 2014, 6:20 PM
  • Use a scoped object to manage the context stack
lib/ASTMatchers/Dynamic/Parser.cpp
294 ↗(On Diff #5752)

Done.

388 ↗(On Diff #5752)

Not aborting gives us better (i.e. more) diagnostics. If we abort early, no diagnostics appear for anything after the invalid matcher name. (This also causes some unit tests under ParserTest.Errors to fail.)

sbenza accepted this revision.Jan 24 2014, 8:06 AM
pcc closed this revision.Jan 30 2014, 2:45 PM

Closed by commit rL200497 (authored by @pcc).