This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Remove threading-related code from ClangdUnit.h
ClosedPublic

Authored by ilya-biryukov on Feb 8 2018, 1:57 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ilya-biryukov created this revision.Feb 8 2018, 1:57 AM
ioeric added a comment.Feb 8 2018, 6:43 AM

Nice! The code looks much simpler!

Just some drive-by nits. I don't know the threading work well enough to give useful comments. Will leave the approval to others.

clangd/ClangdUnit.cpp
399 ↗(On Diff #133382)

Do we still need this block?

434 ↗(On Diff #133382)

nit: no braces

clangd/ClangdUnit.h
161 ↗(On Diff #133382)

s/latest/last/?

ilya-biryukov marked 2 inline comments as done.
  • Removed braces
  • s/latest/last/

Thanks for the NITs :-)

clangd/ClangdUnit.cpp
399 ↗(On Diff #133382)

I added it to avoid referencing local variables declared there.

I would move this to be a separate function rather than removing the braces here, but other may have different opinions :-)
WDYT? Does a separate function sound ok?

ioeric added inline comments.Feb 8 2018, 7:01 AM
clangd/ClangdUnit.cpp
399 ↗(On Diff #133382)

I don't think it's necessary though? But up to you :)

This revision is now accepted and ready to land.Feb 8 2018, 5:09 PM
This revision was automatically updated to reflect the committed changes.