[clang-tools-extra] r330602 - [clangd] Fix Context::derive to actually call the right method.

Benjamin Kramer via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 23 08:27:43 PDT 2018


Author: d0k
Date: Mon Apr 23 08:27:42 2018
New Revision: 330602

URL: http://llvm.org/viewvc/llvm-project?rev=330602&view=rev
Log:
[clangd] Fix Context::derive to actually call the right method.

C++ is weird.

Modified:
    clang-tools-extra/trunk/clangd/Context.h

Modified: clang-tools-extra/trunk/clangd/Context.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Context.h?rev=330602&r1=330601&r2=330602&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Context.h (original)
+++ clang-tools-extra/trunk/clangd/Context.h Mon Apr 23 08:27:42 2018
@@ -146,7 +146,7 @@ public:
 
   template <class Type> Context derive(Type &&Value) && {
     static Key<typename std::decay<Type>::type> Private;
-    return std::move(this)->derive(Private, std::forward<Type>(Value));
+    return std::move(*this).derive(Private, std::forward<Type>(Value));
   }
 
   /// Clone this context object.




More information about the cfe-commits mailing list