diff --git a/clang-tools-extra/include-fixer/find-all-symbols/SymbolInfo.cpp b/clang-tools-extra/include-fixer/find-all-symbols/SymbolInfo.cpp index b5a8a73dc9f0..ad0fca5d5548 100644 --- a/clang-tools-extra/include-fixer/find-all-symbols/SymbolInfo.cpp +++ b/clang-tools-extra/include-fixer/find-all-symbols/SymbolInfo.cpp @@ -78,20 +78,6 @@ SymbolInfo::SymbolInfo(llvm::StringRef Name, SymbolKind Type, : Name(Name), Type(Type), FilePath(FilePath), Contexts(Contexts), LineNumber(LineNumber), NumOccurrences(NumOccurrences) {} -llvm::StringRef SymbolInfo::getName() const { return Name; } - -SymbolKind SymbolInfo::getSymbolKind() const { return Type; } - -llvm::StringRef SymbolInfo::getFilePath() const { return FilePath; } - -const std::vector &SymbolInfo::getContexts() const { - return Contexts; -} - -int SymbolInfo::getLineNumber() const { return LineNumber; } - -unsigned SymbolInfo::getNumOccurrences() const { return NumOccurrences; } - bool SymbolInfo::operator==(const SymbolInfo &Symbol) const { return std::tie(Name, Type, FilePath, LineNumber, Contexts) == std::tie(Symbol.Name, Symbol.Type, Symbol.FilePath, Symbol.LineNumber, diff --git a/clang-tools-extra/include-fixer/find-all-symbols/SymbolInfo.h b/clang-tools-extra/include-fixer/find-all-symbols/SymbolInfo.h index c5b6999c7909..9fb96e05f014 100644 --- a/clang-tools-extra/include-fixer/find-all-symbols/SymbolInfo.h +++ b/clang-tools-extra/include-fixer/find-all-symbols/SymbolInfo.h @@ -55,22 +55,24 @@ public: unsigned NumOccurrences = 0); /// \brief Get symbol name. - llvm::StringRef getName() const; + llvm::StringRef getName() const { return Name; } /// \brief Get symbol type. - SymbolKind getSymbolKind() const; + SymbolKind getSymbolKind() const { return Type; } /// \brief Get a relative file path where symbol comes from. - llvm::StringRef getFilePath() const; + llvm::StringRef getFilePath() const { return FilePath; } /// \brief Get symbol contexts. - const std::vector &getContexts() const; + const std::vector &getContexts() const { + return Contexts; + } /// \brief Get a 1-based line number of the symbol's declaration. - int getLineNumber() const; + int getLineNumber() const { return LineNumber; } /// \brief The number of times this symbol was found during an indexing run. - unsigned getNumOccurrences() const; + unsigned getNumOccurrences() const { return NumOccurrences; } bool operator<(const SymbolInfo &Symbol) const;