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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100008 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index b8158bb..6c15efb 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -255,13 +255,13 @@
       if (!SS || !SS->isSet())
         Diag(IILoc, diag::err_unknown_typename_suggest)
           << &II << Lookup.getLookupName()
-          << CodeModificationHint::CreateReplacement(SourceRange(IILoc),
-                                                     Result->getNameAsString());
+          << FixItHint::CreateReplacement(SourceRange(IILoc),
+                                          Result->getNameAsString());
       else if (DeclContext *DC = computeDeclContext(*SS, false))
         Diag(IILoc, diag::err_unknown_nested_typename_suggest) 
           << &II << DC << Lookup.getLookupName() << SS->getRange()
-          << CodeModificationHint::CreateReplacement(SourceRange(IILoc),
-                                                     Result->getNameAsString());
+          << FixItHint::CreateReplacement(SourceRange(IILoc),
+                                          Result->getNameAsString());
       else
         llvm_unreachable("could not have corrected a typo here");
 
@@ -285,8 +285,7 @@
     Diag(SS->getRange().getBegin(), diag::err_typename_missing)
       << (NestedNameSpecifier *)SS->getScopeRep() << II.getName()
       << SourceRange(SS->getRange().getBegin(), IILoc)
-      << CodeModificationHint::CreateInsertion(SS->getRange().getBegin(),
-                                               "typename ");
+      << FixItHint::CreateInsertion(SS->getRange().getBegin(), "typename ");
     SuggestedType = ActOnTypenameType(SourceLocation(), *SS, II, IILoc).get();
   } else {
     assert(SS && SS->isInvalid() && 
@@ -590,8 +589,7 @@
         (IDecl = R.getAsSingle<ObjCInterfaceDecl>())) {
       Diag(RecoverLoc, diag::err_undef_interface_suggest)
         << Id << IDecl->getDeclName() 
-        << CodeModificationHint::CreateReplacement(RecoverLoc, 
-                                                   IDecl->getNameAsString());
+        << FixItHint::CreateReplacement(RecoverLoc, IDecl->getNameAsString());
       Diag(IDecl->getLocation(), diag::note_previous_decl)
         << IDecl->getDeclName();
       
@@ -2345,8 +2343,7 @@
     if (SC == VarDecl::Static) {
       Diag(D.getDeclSpec().getStorageClassSpecLoc(),
            diag::err_static_out_of_line)
-        << CodeModificationHint::CreateRemoval(
-                                      D.getDeclSpec().getStorageClassSpecLoc());
+        << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());
     } else if (SC == VarDecl::None)
       SC = VarDecl::Static;
   }
@@ -2954,8 +2951,8 @@
 
         Diag(D.getIdentifierLoc(), diag::err_template_spec_decl_friend)
           << Name << RemoveRange
-          << CodeModificationHint::CreateRemoval(RemoveRange)
-          << CodeModificationHint::CreateInsertion(InsertLoc, "<>");
+          << FixItHint::CreateRemoval(RemoveRange)
+          << FixItHint::CreateInsertion(InsertLoc, "<>");
       }
     }
 
@@ -2975,8 +2972,7 @@
     } else if (!CurContext->isRecord()) {
       // 'virtual' was specified outside of the class.
       Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_virtual_out_of_class)
-        << CodeModificationHint::CreateRemoval(
-                                           D.getDeclSpec().getVirtualSpecLoc());
+        << FixItHint::CreateRemoval(D.getDeclSpec().getVirtualSpecLoc());
     } else {
       // Okay: Add virtual to the method.
       CXXRecordDecl *CurClass = cast<CXXRecordDecl>(DC);
@@ -2993,16 +2989,14 @@
       // 'explicit' was specified outside of the class.
       Diag(D.getDeclSpec().getExplicitSpecLoc(), 
            diag::err_explicit_out_of_class)
-        << CodeModificationHint::CreateRemoval(
-                                          D.getDeclSpec().getExplicitSpecLoc());
+        << FixItHint::CreateRemoval(D.getDeclSpec().getExplicitSpecLoc());
     } else if (!isa<CXXConstructorDecl>(NewFD) && 
                !isa<CXXConversionDecl>(NewFD)) {
       // 'explicit' was specified on a function that wasn't a constructor
       // or conversion function.
       Diag(D.getDeclSpec().getExplicitSpecLoc(),
            diag::err_explicit_non_ctor_or_conv_function)
-        << CodeModificationHint::CreateRemoval(
-                                          D.getDeclSpec().getExplicitSpecLoc());
+        << FixItHint::CreateRemoval(D.getDeclSpec().getExplicitSpecLoc());
     }      
   }
 
@@ -3037,8 +3031,7 @@
     // member function definition.
     Diag(D.getDeclSpec().getStorageClassSpecLoc(),
          diag::err_static_out_of_line)
-      << CodeModificationHint::CreateRemoval(
-                                      D.getDeclSpec().getStorageClassSpecLoc());
+      << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());
   }
 
   // Handle GNU asm-label extension (encoded as an attribute).
@@ -3136,7 +3129,7 @@
       // too few of them).
       Diag(D.getIdentifierLoc(), diag::err_template_spec_needs_header)
         << SourceRange(TemplateId->LAngleLoc, TemplateId->RAngleLoc)
-        << CodeModificationHint::CreateInsertion(
+        << FixItHint::CreateInsertion(
                                    D.getDeclSpec().getSourceRange().getBegin(),
                                                  "template<> ");
       isFunctionTemplateSpecialization = true;
@@ -4174,7 +4167,7 @@
                                         << ";\n";
         Diag(FTI.ArgInfo[i].IdentLoc, diag::ext_param_not_declared)
           << FTI.ArgInfo[i].Ident
-          << CodeModificationHint::CreateInsertion(LocAfterDecls, Code.str());
+          << FixItHint::CreateInsertion(LocAfterDecls, Code.str());
 
         // Implicitly declare the argument as type 'int' for lack of a better
         // type.
@@ -4684,7 +4677,7 @@
     Diag(NewTagLoc, diag::warn_struct_class_tag_mismatch)
       << (NewTag == TagDecl::TK_class)
       << isTemplate << &Name
-      << CodeModificationHint::CreateReplacement(SourceRange(NewTagLoc),
+      << FixItHint::CreateReplacement(SourceRange(NewTagLoc),
                               OldTag == TagDecl::TK_class? "class" : "struct");
     Diag(Previous->getLocation(), diag::note_previous_use);
     return true;
@@ -4930,8 +4923,8 @@
           if (SafeToContinue)
             Diag(KWLoc, diag::err_use_with_wrong_tag)
               << Name
-              << CodeModificationHint::CreateReplacement(SourceRange(KWLoc),
-                                                  PrevTagDecl->getKindName());
+              << FixItHint::CreateReplacement(SourceRange(KWLoc),
+                                              PrevTagDecl->getKindName());
           else
             Diag(KWLoc, diag::err_use_with_wrong_tag) << Name;
           Diag(PrevTagDecl->getLocation(), diag::note_previous_use);