Index: clang-tools-extra/trunk/clang-doc/Representation.h =================================================================== --- clang-tools-extra/trunk/clang-doc/Representation.h +++ clang-tools-extra/trunk/clang-doc/Representation.h @@ -162,6 +162,8 @@ Info(const Info &Other) = delete; Info(Info &&Other) = default; + virtual ~Info() = default; + SymbolID USR = SymbolID(); // Unique identifier for the decl described by this Info. const InfoType IT = InfoType::IT_default; // InfoType of this particular Info. Index: clang-tools-extra/trunk/clang-doc/Serialize.cpp =================================================================== --- clang-tools-extra/trunk/clang-doc/Serialize.cpp +++ clang-tools-extra/trunk/clang-doc/Serialize.cpp @@ -361,7 +361,7 @@ I->USR = Func.Namespace[0].USR; else I->USR = SymbolID(); - I->ChildFunctions.push_back(std::move(Func)); + I->ChildFunctions.emplace_back(std::move(Func)); return std::unique_ptr{std::move(I)}; } @@ -382,7 +382,7 @@ // Wrap in enclosing scope auto I = llvm::make_unique(); I->USR = ParentUSR; - I->ChildFunctions.push_back(std::move(Func)); + I->ChildFunctions.emplace_back(std::move(Func)); return std::unique_ptr{std::move(I)}; } @@ -402,13 +402,13 @@ case InfoType::IT_namespace: { auto I = llvm::make_unique(); I->USR = Enum.Namespace[0].USR; - I->ChildEnums.push_back(std::move(Enum)); + I->ChildEnums.emplace_back(std::move(Enum)); return std::unique_ptr{std::move(I)}; } case InfoType::IT_record: { auto I = llvm::make_unique(); I->USR = Enum.Namespace[0].USR; - I->ChildEnums.push_back(std::move(Enum)); + I->ChildEnums.emplace_back(std::move(Enum)); return std::unique_ptr{std::move(I)}; } default: @@ -419,7 +419,7 @@ // Put in global namespace auto I = llvm::make_unique(); I->USR = SymbolID(); - I->ChildEnums.push_back(std::move(Enum)); + I->ChildEnums.emplace_back(std::move(Enum)); return std::unique_ptr{std::move(I)}; }