aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-04 00:56:37 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-04 00:56:37 +0000
commitca1bdd7c269a2390d43c040a60511edd017ee130 (patch)
tree3310f54698515fedd46cc4c59468b2ea7bcd1759 /lib/Basic/IdentifierTable.cpp
parentd0fe5366d4040545d5f72c547ae54e2c21e4cb68 (diff)
Implement support for parsing dependent template-ids that refer to
overloaded operators, e.g., p->template operator+<T>() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
-rw-r--r--lib/Basic/IdentifierTable.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp
index 16aa0c5484..401e6cba06 100644
--- a/lib/Basic/IdentifierTable.cpp
+++ b/lib/Basic/IdentifierTable.cpp
@@ -381,3 +381,17 @@ SelectorTable::~SelectorTable() {
delete &getSelectorTableImpl(Impl);
}
+const char *clang::getOperatorSpelling(OverloadedOperatorKind Operator) {
+ switch (Operator) {
+ case OO_None:
+ case NUM_OVERLOADED_OPERATORS:
+ return 0;
+
+#define OVERLOADED_OPERATOR(Name,Spelling,Token,Unary,Binary,MemberOnly) \
+ case OO_##Name: return Spelling;
+#include "clang/Basic/OperatorKinds.def"
+ }
+
+ return 0;
+}
+