[libc++] Use [[nodiscard]] for lock_guard, as an extension

Summary:
D64914 added support for applying [[nodiscard]] to constructors. This
commit uses that capability to flag incorrect uses of std::lock_guard
where one forgets to actually create a variable for the lock_guard.

rdar://45790820

Reviewers: mclow.lists, EricWF

Subscribers: christof, jkorous, dexonsmith, libcxx-commits, Quuxplusone, lebedev.ri

Tags: #libc

Differential Revision: https://reviews.llvm.org/D65900

llvm-svn: 368664
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 86dd28a5471480cd7a8cb5ad4801599ac0a0ac20
diff --git a/docs/UsingLibcxx.rst b/docs/UsingLibcxx.rst
index 56c98af..05721bf 100644
--- a/docs/UsingLibcxx.rst
+++ b/docs/UsingLibcxx.rst
@@ -345,3 +345,4 @@
 * ``search``
 * ``unique``
 * ``upper_bound``
+* ``lock_guard``'s constructors