Extend DeclarationName to support C++ overloaded operators, e.g.,
operator+, directly, using the same mechanism as all other special
names.

Removed the "special" identifiers for the overloaded operators from
the identifier table and IdentifierInfo data structure. IdentifierInfo
is back to representing only real identifiers.

Added a new Action, ActOnOperatorFunctionIdExpr, that builds an
expression from an parsed operator-function-id (e.g., "operator
+"). ActOnIdentifierExpr used to do this job, but
operator-function-ids are no longer represented by IdentifierInfo's.

Extended Declarator to store overloaded operator names. 
Sema::GetNameForDeclarator now knows how to turn the operator
name into a DeclarationName for the overloaded operator. 

Except for (perhaps) consolidating the functionality of
ActOnIdentifier, ActOnOperatorFunctionIdExpr, and
ActOnConversionFunctionExpr into a common routine that builds an
appropriate DeclRefExpr by looking up a DeclarationName, all of the
work on normalizing declaration names should be complete with this
commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59526 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/docs/InternalsManual.html b/docs/InternalsManual.html
index d9c2701..2e44640 100644
--- a/docs/InternalsManual.html
+++ b/docs/InternalsManual.html
@@ -469,7 +469,7 @@
 <p>Given
   a <code>DeclarationName</code> <code>N</code>, <code>N.getNameKind()</code>
   will produce a value that describes what kind of name <code>N</code>
-  stores. There are 7 options (all of the names are inside
+  stores. There are 8 options (all of the names are inside
   the <code>DeclarationName</code> class)</p>
 <dl>
   <dt>Identifier</dt>
@@ -514,11 +514,19 @@
       const *</code>". Use <code>N.getCXXNameType()</code> to retrieve
   the type that this conversion function converts to. This type is
     always a canonical type.</dd>
+
+  <dt>CXXOperatorName</dt>
+  <dd>The name is a C++ overloaded operator name. Overloaded operators
+  are named according to their spelling, e.g.,
+  "<code>operator+</code>" or "<code>operator new
+  []</code>". Use <code>N.getCXXOverloadedOperator()</code> to
+  retrieve the overloaded operator (a value of
+    type <code>OverloadedOperatorKind</code>).</dd>
 </dl>
 
 <p><code>DeclarationName</code>s are cheap to create, copy, and
   compare. They require only a single pointer's worth of storage in
-  the common cases (identifiers, C++ overloaded operator names, zero-
+  the common cases (identifiers, zero-
   and one-argument Objective-C selectors) and use dense, uniqued
   storage for the other kinds of
   names. Two <code>DeclarationName</code>s can be compared for
@@ -532,16 +540,15 @@
 
 <p><code>DeclarationName</code> instances can be created in different
   ways depending on what kind of name the instance will store. Normal
-  identifiers (<code>IdentifierInfo</code> pointers), including
-  overloaded operator names, and Objective-C selectors
+  identifiers (<code>IdentifierInfo</code> pointers) and Objective-C selectors
   (<code>Selector</code>) can be implicitly converted
   to <code>DeclarationName</code>s. Names for C++ constructors,
-  destructors, and conversion functions can be retrieved from
+  destructors, conversion functions, and overloaded operators can be retrieved from
   the <code>DeclarationNameTable</code>, an instance of which is
   available as <code>ASTContext::DeclarationNames</code>. The member
   functions <code>getCXXConstructorName</code>, <code>getCXXDestructorName</code>,
-  and <code>getCXXConversionFunctionName</code>, respectively,
-  return <code>DeclarationName</code> instances for the three kinds of
+  <code>getCXXConversionFunctionName</code>, and <code>getCXXOperatorName</code>, respectively,
+  return <code>DeclarationName</code> instances for the four kinds of
   C++ special function names.</p>
 
 <!-- ======================================================================= -->