diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-18 14:24:02 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-18 14:24:02 +0000 |
commit | 783c56f47745f719590b17afd7ed937bf2407b53 (patch) | |
tree | 143425eeda3a41f746d55761be44faaa98f0e97e /lib/Rewrite/FixItRewriter.cpp | |
parent | 6aa03e6dc72623f04af415527bf580ec189ab7f6 (diff) |
Simplify FixItHint by eliminated the unnecessary InsertionLoc
location. Patch by Eelis van der Weegen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111362 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/FixItRewriter.cpp')
-rw-r--r-- | lib/Rewrite/FixItRewriter.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/Rewrite/FixItRewriter.cpp b/lib/Rewrite/FixItRewriter.cpp index df7b60547a..3fdec07459 100644 --- a/lib/Rewrite/FixItRewriter.cpp +++ b/lib/Rewrite/FixItRewriter.cpp @@ -96,12 +96,6 @@ void FixItRewriter::HandleDiagnostic(Diagnostic::Level DiagLevel, CanRewrite = false; break; } - - if (Hint.InsertionLoc.isValid() && - !Rewrite.isRewritable(Hint.InsertionLoc)) { - CanRewrite = false; - break; - } } if (!CanRewrite) { @@ -120,12 +114,6 @@ void FixItRewriter::HandleDiagnostic(Diagnostic::Level DiagLevel, for (unsigned Idx = 0, Last = Info.getNumFixItHints(); Idx < Last; ++Idx) { const FixItHint &Hint = Info.getFixItHint(Idx); - if (!Hint.RemoveRange.isValid()) { - // We're adding code. - if (Rewrite.InsertTextBefore(Hint.InsertionLoc, Hint.CodeToInsert)) - Failed = true; - continue; - } if (Hint.CodeToInsert.empty()) { // We're removing code. |