// FIXME: This method has some common logic with clang::format::getStyle().
// Consider pulling out common bits to a findParentFileWithName function or
// similar.
-const ClangTidyOptions &FileOptionsProvider::getOptions(StringRef FileName) {
+ClangTidyOptions FileOptionsProvider::getOptions(StringRef FileName) {
DEBUG(llvm::dbgs() << "Getting options for file " << FileName << "...\n");
SmallString<256> FilePath(FileName);
/// \brief Returns options applying to a specific translation unit with the
/// specified \p FileName.
- virtual const ClangTidyOptions &getOptions(llvm::StringRef FileName) = 0;
+ virtual ClangTidyOptions getOptions(llvm::StringRef FileName) = 0;
};
/// \brief Implementation of the \c ClangTidyOptionsProvider interface, which
const ClangTidyGlobalOptions &getGlobalOptions() override {
return GlobalOptions;
}
- const ClangTidyOptions &getOptions(llvm::StringRef /*FileName*/) override {
+ ClangTidyOptions getOptions(llvm::StringRef /*FileName*/) override {
return DefaultOptions;
}
const ClangTidyOptions &OverrideOptions,
const ConfigFileHandlers &ConfigHandlers);
- const ClangTidyOptions &getOptions(llvm::StringRef FileName) override;
+ ClangTidyOptions getOptions(llvm::StringRef FileName) override;
private:
/// \brief Try to read configuration files from \p Directory using registered