diff options
| author | Guillaume Papin <guillaume.papin@epitech.eu> | 2013-08-29 13:42:13 +0000 |
|---|---|---|
| committer | Guillaume Papin <guillaume.papin@epitech.eu> | 2013-08-29 13:42:13 +0000 |
| commit | 81332632b1f6def9eeb2ed707d37f4b963ffc38a (patch) | |
| tree | 0cbde5a624af3f77bc61aa87455865eb40180a04 /clang-tools-extra/cpp11-migrate/Core/Transform.h | |
| parent | 37d6b1863372065fdb1482d184f980a0296d94bc (diff) | |
| download | bcm5719-llvm-81332632b1f6def9eeb2ed707d37f4b963ffc38a.tar.gz bcm5719-llvm-81332632b1f6def9eeb2ed707d37f4b963ffc38a.zip | |
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
Diffstat (limited to 'clang-tools-extra/cpp11-migrate/Core/Transform.h')
| -rw-r--r-- | clang-tools-extra/cpp11-migrate/Core/Transform.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |

