aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/OperatorKinds.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-11-06 22:13:31 +0000
committerDouglas Gregor <dgregor@apple.com>2008-11-06 22:13:31 +0000
commit1cd1b1e987f5e2f060d7972b13d83239b36d77d6 (patch)
tree2776b50f5ad1ceafd1aae9a31001b6b1a3f9dd5d /include/clang/Basic/OperatorKinds.h
parent5142af38ed0dd2f592cbfa00fa6e2e14dd6cc516 (diff)
Parsing, ASTs, and semantic analysis for the declaration of overloaded
operators in C++. Overloaded operators can be called directly via their operator-function-ids, e.g., "operator+(foo, bar)", but we don't yet implement the semantics of operator overloading to handle, e.g., "foo + bar". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/OperatorKinds.h')
-rw-r--r--include/clang/Basic/OperatorKinds.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/clang/Basic/OperatorKinds.h b/include/clang/Basic/OperatorKinds.h
new file mode 100644
index 0000000000..3d085dba75
--- /dev/null
+++ b/include/clang/Basic/OperatorKinds.h
@@ -0,0 +1,31 @@
+//===--- OperatorKinds.h - C++ Overloaded Operators -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines C++ overloaded operators.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_OPERATOR_KINDS_H
+#define LLVM_CLANG_BASIC_OPERATOR_KINDS_H
+
+namespace clang {
+
+/// OverloadedOperatorKind - Enumeration specifying the different kinds of
+/// C++ overloaded operators.
+enum OverloadedOperatorKind {
+ OO_None, //< Not an overloaded operator
+#define OVERLOADED_OPERATOR(Name,Spelling,Token) OO_##Name,
+#include "clang/Basic/OperatorKinds.def"
+ NUM_OVERLOADED_OPERATORS
+};
+
+
+} // end namespace clang
+
+#endif