[clang-tidy] make getLangOpts return a const ref
authorAlexander Kornienko <alexfh@google.com>
Tue, 2 Apr 2019 11:31:56 +0000 (11:31 +0000)
committerAlexander Kornienko <alexfh@google.com>
Tue, 2 Apr 2019 11:31:56 +0000 (11:31 +0000)
llvm-svn: 357468

clang-tools-extra/clang-tidy/ClangTidyCheck.h

index bfb57e3..db1b270 100644 (file)
@@ -188,7 +188,7 @@ protected:
   /// \brief Returns the main file name of the current translation unit.
   StringRef getCurrentMainFile() const { return Context->getCurrentFile(); }
   /// \brief Returns the language options from the context.
-  LangOptions getLangOpts() const { return Context->getLangOpts(); }
+  const LangOptions &getLangOpts() const { return Context->getLangOpts(); }
 };
 
 } // namespace tidy