This is an archive of the discontinued LLVM Phabricator instance.

[CodeComplete] Fix crash when completing params function declarations.
ClosedPublic

Authored by sammccall on Oct 10 2018, 3:09 AM.

Details

Summary

In a decl like int AA(BB cc) where BB isn't defined, we end up trying to
parse BB cc as an expression (vexing parse) and end up triggering the
parser's "recovery-in-function" completion with no actual function
scope.

This patch avoids the assumption that such a scope exists in this context.

Diff Detail

Repository
rC Clang

Event Timeline

sammccall created this revision.Oct 10 2018, 3:09 AM
kadircet accepted this revision.Oct 10 2018, 3:48 AM

LGTM, thanks!

This revision is now accepted and ready to land.Oct 10 2018, 3:48 AM
This revision was automatically updated to reflect the committed changes.