[clang-tools-extra] r357468 - [clang-tidy] make getLangOpts return a const ref
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 2 04:31:56 PDT 2019
Author: alexfh
Date: Tue Apr 2 04:31:56 2019
New Revision: 357468
URL: http://llvm.org/viewvc/llvm-project?rev=357468&view=rev
Log:
[clang-tidy] make getLangOpts return a const ref
Modified:
clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h
Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h?rev=357468&r1=357467&r2=357468&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h Tue Apr 2 04:31:56 2019
@@ -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
More information about the cfe-commits
mailing list