summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FixItRewriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-31 15:31:50 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-31 15:31:50 +0000
commit3baad0d4f7afc2b8ac6ddfd983fa48b1a0d2f387 (patch)
tree6b423cc55b74358cc2d1fe4efb05947538140850 /clang/lib/Frontend/FixItRewriter.cpp
parent9e2e1c9024d58fdf5ba8bd856a01e08266c52a05 (diff)
downloadbcm5719-llvm-3baad0d4f7afc2b8ac6ddfd983fa48b1a0d2f387.tar.gz
bcm5719-llvm-3baad0d4f7afc2b8ac6ddfd983fa48b1a0d2f387.zip
Rename CodeModificationHint to FixItHint, since we've been using the
term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008
Diffstat (limited to 'clang/lib/Frontend/FixItRewriter.cpp')
-rw-r--r--clang/lib/Frontend/FixItRewriter.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Frontend/FixItRewriter.cpp b/clang/lib/Frontend/FixItRewriter.cpp
index 0b04cf2b44d..20d452e76a6 100644
--- a/clang/lib/Frontend/FixItRewriter.cpp
+++ b/clang/lib/Frontend/FixItRewriter.cpp
@@ -93,7 +93,7 @@ void FixItRewriter::HandleDiagnostic(Diagnostic::Level DiagLevel,
// completely ignore it, even if it's an error: fix-it locations
// are meant to perform specific fix-ups even in the presence of
// other errors.
- if (Info.getNumCodeModificationHints() == 0)
+ if (Info.getNumFixItHints() == 0)
return;
// See if the location of the error is one that matches what the
@@ -122,10 +122,10 @@ void FixItRewriter::HandleDiagnostic(Diagnostic::Level DiagLevel,
// Make sure that we can perform all of the modifications we
// in this diagnostic.
- bool CanRewrite = Info.getNumCodeModificationHints() > 0;
- for (unsigned Idx = 0, Last = Info.getNumCodeModificationHints();
+ bool CanRewrite = Info.getNumFixItHints() > 0;
+ for (unsigned Idx = 0, Last = Info.getNumFixItHints();
Idx < Last; ++Idx) {
- const CodeModificationHint &Hint = Info.getCodeModificationHint(Idx);
+ const FixItHint &Hint = Info.getFixItHint(Idx);
if (Hint.RemoveRange.isValid() &&
Rewrite.getRangeSize(Hint.RemoveRange) == -1) {
CanRewrite = false;
@@ -140,7 +140,7 @@ void FixItRewriter::HandleDiagnostic(Diagnostic::Level DiagLevel,
}
if (!CanRewrite) {
- if (Info.getNumCodeModificationHints() > 0)
+ if (Info.getNumFixItHints() > 0)
Diag(Info.getLocation(), diag::note_fixit_in_macro);
// If this was an error, refuse to perform any rewriting.
@@ -152,9 +152,9 @@ void FixItRewriter::HandleDiagnostic(Diagnostic::Level DiagLevel,
}
bool Failed = false;
- for (unsigned Idx = 0, Last = Info.getNumCodeModificationHints();
+ for (unsigned Idx = 0, Last = Info.getNumFixItHints();
Idx < Last; ++Idx) {
- const CodeModificationHint &Hint = Info.getCodeModificationHint(Idx);
+ const FixItHint &Hint = Info.getFixItHint(Idx);
if (!Hint.RemoveRange.isValid()) {
// We're adding code.
if (Rewrite.InsertTextBefore(Hint.InsertionLoc, Hint.CodeToInsert))
OpenPOWER on IntegriCloud