[llvm] r360255 - [ADT] SmallVector::set_size - fix Wdocumentation. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 06:47:17 PDT 2019


Author: rksimon
Date: Wed May  8 06:47:17 2019
New Revision: 360255

URL: http://llvm.org/viewvc/llvm-project?rev=360255&view=rev
Log:
[ADT] SmallVector::set_size - fix Wdocumentation. NFCI.

Also fixes a Wshadow warning on MSVC.

Modified:
    llvm/trunk/include/llvm/ADT/SmallVector.h

Modified: llvm/trunk/include/llvm/ADT/SmallVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallVector.h?rev=360255&r1=360254&r2=360255&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallVector.h Wed May  8 06:47:17 2019
@@ -63,9 +63,9 @@ public:
   /// of the buffer when they know that more elements are available, and only
   /// update the size later. This avoids the cost of value initializing elements
   /// which will only be overwritten.
-  void set_size(size_t Size) {
-    assert(Size <= capacity());
-    this->Size = Size;
+  void set_size(size_t N) {
+    assert(N <= capacity());
+    Size = N;
   }
 };
 




More information about the llvm-commits mailing list