From 81332632b1f6def9eeb2ed707d37f4b963ffc38a Mon Sep 17 00:00:00 2001 From: Guillaume Papin Date: Thu, 29 Aug 2013 13:42:13 +0000 Subject: cpp11-migrate: Add Pass-By-Value Transform Currently only constructor parameters stored in class-local storage are modified to make use of the pass-by-value idiom but this is a base that can be be further improved to handle more situations. This commit is the same as r189363 with additionnal fixes for the build issues. llvm-svn: 189584 --- clang-tools-extra/cpp11-migrate/Core/Transform.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang-tools-extra/cpp11-migrate/Core/Transform.h') diff --git a/clang-tools-extra/cpp11-migrate/Core/Transform.h b/clang-tools-extra/cpp11-migrate/Core/Transform.h index bb8c116726d..43082111d54 100644 --- a/clang-tools-extra/cpp11-migrate/Core/Transform.h +++ b/clang-tools-extra/cpp11-migrate/Core/Transform.h @@ -139,6 +139,12 @@ public: bool isFileModifiable(const clang::SourceManager &SM, const clang::SourceLocation &Loc) const; + /// \brief Whether a transformation with a risk level of \p RiskLevel is + /// acceptable or not. + bool isAcceptableRiskLevel(RiskLevel RiskLevel) const { + return RiskLevel <= GlobalOptions.MaxRiskLevel; + } + /// \brief Called before parsing a translation unit for a FrontendAction. /// /// Transform uses this function to apply file overrides and start -- cgit v1.2.3