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/Parse/DeclSpec.cpp b/lib/Parse/DeclSpec.cpp
index 4a699e7..11865ab 100644
--- a/lib/Parse/DeclSpec.cpp
+++ b/lib/Parse/DeclSpec.cpp
@@ -481,7 +481,7 @@
   if (TypeSpecComplex != TSC_unspecified) {
     if (TypeSpecType == TST_unspecified) {
       Diag(D, TSCLoc, SrcMgr, diag::ext_plain_complex)
-        << CodeModificationHint::CreateInsertion(
+        << FixItHint::CreateInsertion(
                               PP.getLocForEndOfToken(getTypeSpecComplexLoc()),
                                                  " double");
       TypeSpecType = TST_double;   // _Complex -> _Complex double.
@@ -507,7 +507,7 @@
 
     Diag(D, SCLoc, SrcMgr, diag::err_friend_storage_spec)
       << SpecName
-      << CodeModificationHint::CreateRemoval(SourceRange(SCLoc, SCEndLoc));
+      << FixItHint::CreateRemoval(SourceRange(SCLoc, SCEndLoc));
 
     ClearStorageClassSpecs();
   }
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index cff35b7..e87d052 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -734,7 +734,7 @@
     if (TagName) {
       Diag(Loc, diag::err_use_of_tag_name_without_tag)
         << Tok.getIdentifierInfo() << TagName << getLang().CPlusPlus
-        << CodeModificationHint::CreateInsertion(Tok.getLocation(),TagName);
+        << FixItHint::CreateInsertion(Tok.getLocation(),TagName);
 
       // Parse this as a tag as if the missing tag were present.
       if (TagKind == tok::kw_enum)
@@ -1360,7 +1360,7 @@
         DS.SetRangeEnd(EndProtoLoc);
 
         Diag(Loc, diag::warn_objc_protocol_qualifier_missing_id)
-          << CodeModificationHint::CreateInsertion(Loc, "id")
+          << FixItHint::CreateInsertion(Loc, "id")
           << SourceRange(Loc, EndProtoLoc);
         // Need to support trailing type qualifiers (e.g. "id<p> const").
         // If a type specifier follows, it will be diagnosed elsewhere.
@@ -1756,7 +1756,7 @@
     // Check for extraneous top-level semicolon.
     if (Tok.is(tok::semi)) {
       Diag(Tok, diag::ext_extra_struct_semi)
-        << CodeModificationHint::CreateRemoval(Tok.getLocation());
+        << FixItHint::CreateRemoval(Tok.getLocation());
       ConsumeToken();
       continue;
     }
@@ -1999,7 +1999,7 @@
         !(getLang().C99 || getLang().CPlusPlus0x))
       Diag(CommaLoc, diag::ext_enumerator_list_comma)
         << getLang().CPlusPlus
-        << CodeModificationHint::CreateRemoval(CommaLoc);
+        << FixItHint::CreateRemoval(CommaLoc);
   }
 
   // Eat the }.
@@ -3009,7 +3009,7 @@
           // We have ellipsis without a preceding ',', which is ill-formed
           // in C. Complain and provide the fix.
           Diag(EllipsisLoc, diag::err_missing_comma_before_ellipsis)
-            << CodeModificationHint::CreateInsertion(EllipsisLoc, ", ");
+            << FixItHint::CreateInsertion(EllipsisLoc, ", ");
         }
       }
       
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 3dc6ad9..813c24c 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -837,7 +837,7 @@
         Diag(TemplateId->TemplateNameLoc,
              diag::err_explicit_instantiation_with_definition)
           << SourceRange(TemplateInfo.TemplateLoc)
-          << CodeModificationHint::CreateInsertion(LAngleLoc, "<>");
+          << FixItHint::CreateInsertion(LAngleLoc, "<>");
 
         // Create a fake template parameter list that contains only
         // "template<>", so that we treat this construct as a class
@@ -1079,7 +1079,7 @@
     if (IsVirtual) {
       // Complain about duplicate 'virtual'
       Diag(VirtualLoc, diag::err_dup_virtual)
-        << CodeModificationHint::CreateRemoval(VirtualLoc);
+        << FixItHint::CreateRemoval(VirtualLoc);
     }
 
     IsVirtual = true;
@@ -1554,7 +1554,7 @@
     // Check for extraneous top-level semicolon.
     if (Tok.is(tok::semi)) {
       Diag(Tok, diag::ext_extra_struct_semi)
-        << CodeModificationHint::CreateRemoval(Tok.getLocation());
+        << FixItHint::CreateRemoval(Tok.getLocation());
       ConsumeToken();
       continue;
     }
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp
index f1e989f..8528f8f 100644
--- a/lib/Parse/ParseExprCXX.cpp
+++ b/lib/Parse/ParseExprCXX.cpp
@@ -246,7 +246,7 @@
           // recover like this.
           PP.LookAhead(1).is(tok::identifier)) {
         Diag(Next, diag::err_unexected_colon_in_nested_name_spec)
-          << CodeModificationHint::CreateReplacement(Next.getLocation(), "::");
+          << FixItHint::CreateReplacement(Next.getLocation(), "::");
         
         // Recover as if the user wrote '::'.
         Next.setKind(tok::coloncolon);
@@ -1313,7 +1313,7 @@
         Diag(TemplateId->TemplateNameLoc, 
              diag::err_out_of_line_constructor_template_id)
           << TemplateId->Name
-          << CodeModificationHint::CreateRemoval(
+          << FixItHint::CreateRemoval(
                     SourceRange(TemplateId->LAngleLoc, TemplateId->RAngleLoc));
         Result.setConstructorName(Actions.getTypeName(*TemplateId->Name,
                                                   TemplateId->TemplateNameLoc, 
diff --git a/lib/Parse/ParseInit.cpp b/lib/Parse/ParseInit.cpp
index c4e79ca..9154d8d 100644
--- a/lib/Parse/ParseInit.cpp
+++ b/lib/Parse/ParseInit.cpp
@@ -76,9 +76,8 @@
     SourceLocation ColonLoc = ConsumeToken();
 
     Diag(Tok, diag::ext_gnu_old_style_field_designator)
-      << CodeModificationHint::CreateReplacement(SourceRange(NameLoc,
-                                                             ColonLoc),
-                                                 NewSyntax.str());
+      << FixItHint::CreateReplacement(SourceRange(NameLoc, ColonLoc),
+                                      NewSyntax.str());
 
     Designation D;
     D.AddDesignator(Designator::getField(FieldName, SourceLocation(), NameLoc));
@@ -218,7 +217,7 @@
       (Desig.getDesignator(0).isArrayDesignator() ||
        Desig.getDesignator(0).isArrayRangeDesignator())) {
     Diag(Tok, diag::ext_gnu_missing_equal_designator)
-      << CodeModificationHint::CreateInsertion(Tok.getLocation(), "= ");
+      << FixItHint::CreateInsertion(Tok.getLocation(), "= ");
     return Actions.ActOnDesignatedInitializer(Desig, Tok.getLocation(),
                                               true, ParseInitializer());
   }
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 7a8aed7..2d43f15 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -988,7 +988,7 @@
     // Check for extraneous top-level semicolon.
     if (Tok.is(tok::semi)) {
       Diag(Tok, diag::ext_extra_struct_semi)
-        << CodeModificationHint::CreateRemoval(Tok.getLocation());
+        << FixItHint::CreateRemoval(Tok.getLocation());
       ConsumeToken();
       continue;
     }
@@ -1571,7 +1571,7 @@
   if (Tok.is(tok::semi)) {
     if (ObjCImpDecl) {
       Diag(Tok, diag::warn_semicolon_before_method_body)
-        << CodeModificationHint::CreateRemoval(Tok.getLocation());
+        << FixItHint::CreateRemoval(Tok.getLocation());
     }
     ConsumeToken();
   }
diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp
index 12f26bf..ff69953 100644
--- a/lib/Parse/ParseTemplate.cpp
+++ b/lib/Parse/ParseTemplate.cpp
@@ -660,7 +660,7 @@
         ReplaceStr = "> > ";
 
       Diag(Tok.getLocation(), diag::err_two_right_angle_brackets_need_space)
-        << CodeModificationHint::CreateReplacement(
+        << FixItHint::CreateReplacement(
                                  SourceRange(Tok.getLocation()), ReplaceStr);
     }
 
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index d45aaed..489586c 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -95,8 +95,8 @@
   }
 
   Diag(Loc, DK)
-    << CodeModificationHint::CreateInsertion(ParenRange.getBegin(), "(")
-    << CodeModificationHint::CreateInsertion(EndLoc, ")");
+    << FixItHint::CreateInsertion(ParenRange.getBegin(), "(")
+    << FixItHint::CreateInsertion(EndLoc, ")");
 }
 
 /// MatchRHSPunctuation - For punctuation with a LHS and RHS (e.g. '['/']'),
@@ -146,7 +146,7 @@
     // Show what code to insert to fix this problem.
     Diag(EndLoc, DiagID)
       << Msg
-      << CodeModificationHint::CreateInsertion(EndLoc, Spelling);
+      << FixItHint::CreateInsertion(EndLoc, Spelling);
   } else
     Diag(Tok, DiagID) << Msg;
 
@@ -395,7 +395,7 @@
   case tok::semi:
     if (!getLang().CPlusPlus0x)
       Diag(Tok, diag::ext_top_level_semi)
-        << CodeModificationHint::CreateRemoval(Tok.getLocation());
+        << FixItHint::CreateRemoval(Tok.getLocation());
 
     ConsumeToken();
     // TODO: Invoke action for top-level semicolon.
@@ -829,7 +829,7 @@
                              PP.getLocForEndOfToken(Tok.getLocation()));
 
     Diag(Tok, diag::warn_file_asm_volatile)
-      << CodeModificationHint::CreateRemoval(RemovalRange);
+      << FixItHint::CreateRemoval(RemovalRange);
     ConsumeToken();
   }