Fixed/added namespace ending comments using clang-tidy. NFC
[oota-llvm.git] / include / llvm / LineEditor / LineEditor.h
index 7ac9b5732354711eb9224d01184a2967963ef9f7..e644b1990f9628395281841c17d1e6e75edd93c3 100644 (file)
 #ifndef LLVM_LINEEDITOR_LINEEDITOR_H
 #define LLVM_LINEEDITOR_LINEEDITOR_H
 
-#include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/Optional.h"
-#include "llvm/ADT/OwningPtr.h"
-#include <stdio.h>
+#include "llvm/ADT/StringRef.h"
+#include <cstdio>
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -111,7 +111,7 @@ public:
 private:
   std::string Prompt;
   std::string HistoryPath;
-  OwningPtr<InternalData> Data;
+  std::unique_ptr<InternalData> Data;
 
   struct CompleterConcept {
     virtual ~CompleterConcept();
@@ -119,8 +119,8 @@ private:
   };
 
   struct ListCompleterConcept : CompleterConcept {
-    ~ListCompleterConcept();
-    CompletionAction complete(StringRef Buffer, size_t Pos) const;
+    ~ListCompleterConcept() override;
+    CompletionAction complete(StringRef Buffer, size_t Pos) const override;
     static std::string getCommonPrefix(const std::vector<Completion> &Comps);
     virtual std::vector<Completion> getCompletions(StringRef Buffer,
                                                    size_t Pos) const = 0;
@@ -129,7 +129,7 @@ private:
   template <typename T>
   struct CompleterModel : CompleterConcept {
     CompleterModel(T Value) : Value(Value) {}
-    CompletionAction complete(StringRef Buffer, size_t Pos) const {
+    CompletionAction complete(StringRef Buffer, size_t Pos) const override {
       return Value(Buffer, Pos);
     }
     T Value;
@@ -138,15 +138,16 @@ private:
   template <typename T>
   struct ListCompleterModel : ListCompleterConcept {
     ListCompleterModel(T Value) : Value(Value) {}
-    std::vector<Completion> getCompletions(StringRef Buffer, size_t Pos) const {
+    std::vector<Completion> getCompletions(StringRef Buffer,
+                                           size_t Pos) const override {
       return Value(Buffer, Pos);
     }
     T Value;
   };
 
-  llvm::OwningPtr<const CompleterConcept> Completer;
+  std::unique_ptr<const CompleterConcept> Completer;
 };
 
-}
+} // namespace llvm
 
 #endif