forked from qt-creator/qt-creator
Clang: Improve interfaces
The interfaces should never used to handle ownership. So it is now using protected destructors. Copy operations are forbidden too. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c35-a-base-class-destructor-should-be-either-public-and-virtual-or-protected-and-nonvirtual Change-Id: Ib0b60a73a7ec130973b5cb0095cc5b2f10fa0758 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -43,6 +43,10 @@ namespace ClangBackEnd {
|
||||
class SymbolsCollectorInterface
|
||||
{
|
||||
public:
|
||||
SymbolsCollectorInterface() = default;
|
||||
SymbolsCollectorInterface(const SymbolsCollectorInterface &) = delete;
|
||||
SymbolsCollectorInterface &operator=(const SymbolsCollectorInterface &) = delete;
|
||||
|
||||
virtual void addFiles(const FilePathIds &filePathIds,
|
||||
const Utils::SmallStringVector &arguments) = 0;
|
||||
|
||||
@@ -58,6 +62,9 @@ public:
|
||||
virtual const UsedMacros &usedMacros() const = 0;
|
||||
virtual const FileStatuses &fileStatuses() const = 0;
|
||||
virtual const SourceDependencies &sourceDependencies() const = 0;
|
||||
|
||||
protected:
|
||||
~SymbolsCollectorInterface() = default;
|
||||
};
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Reference in New Issue
Block a user