summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/bindings/python/clang/cindex.py9
-rw-r--r--clang/bindings/python/tests/cindex/test_cursor.py16
-rw-r--r--clang/include/clang-c/Index.h5
-rw-r--r--clang/test/Index/print-type-declaration.cpp7
-rw-r--r--clang/tools/c-index-test/c-index-test.c2
-rw-r--r--clang/tools/libclang/CIndex.cpp9
-rw-r--r--clang/tools/libclang/libclang.exports1
7 files changed, 0 insertions, 49 deletions
diff --git a/clang/bindings/python/clang/cindex.py b/clang/bindings/python/clang/cindex.py
index 236803a9ab9..1ca58049190 100644
--- a/clang/bindings/python/clang/cindex.py
+++ b/clang/bindings/python/clang/cindex.py
@@ -1478,11 +1478,6 @@ class Cursor(Structure):
"""
return conf.lib.clang_CXXMethod_isVirtual(self)
- def is_scoped_enum(self):
- """Returns True if the cursor refers to a scoped enum declaration.
- """
- return conf.lib.clang_EnumDecl_isScoped(self)
-
def get_definition(self):
"""
If the cursor is a reference to a declaration or a declaration of
@@ -3319,10 +3314,6 @@ functionList = [
[Cursor],
bool),
- ("clang_EnumDecl_isScoped",
- [Cursor],
- bool),
-
("clang_defaultDiagnosticDisplayOptions",
[],
c_uint),
diff --git a/clang/bindings/python/tests/cindex/test_cursor.py b/clang/bindings/python/tests/cindex/test_cursor.py
index 4787ea931e1..8103e96df4f 100644
--- a/clang/bindings/python/tests/cindex/test_cursor.py
+++ b/clang/bindings/python/tests/cindex/test_cursor.py
@@ -255,22 +255,6 @@ def test_is_virtual_method():
assert foo.is_virtual_method()
assert not bar.is_virtual_method()
-def test_is_scoped_enum():
- """Ensure Cursor.is_scoped_enum works."""
- source = 'class X {}; enum RegularEnum {}; enum class ScopedEnum {};'
- tu = get_tu(source, lang='cpp')
-
- cls = get_cursor(tu, 'X')
- regular_enum = get_cursor(tu, 'RegularEnum')
- scoped_enum = get_cursor(tu, 'ScopedEnum')
- assert cls is not None
- assert regular_enum is not None
- assert scoped_enum is not None
-
- assert not cls.is_scoped_enum()
- assert not regular_enum.is_scoped_enum()
- assert scoped_enum.is_scoped_enum()
-
def test_underlying_type():
tu = get_tu('typedef int foo;')
typedef = get_cursor(tu, 'foo')
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index 09f4403556c..f404e6d72ec 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -4417,11 +4417,6 @@ CINDEX_LINKAGE unsigned clang_CXXMethod_isStatic(CXCursor C);
CINDEX_LINKAGE unsigned clang_CXXMethod_isVirtual(CXCursor C);
/**
- * \brief Determine if an enum declaration refers to a scoped enum.
- */
-CINDEX_LINKAGE unsigned clang_EnumDecl_isScoped(CXCursor C);
-
-/**
* \brief Determine if a C++ member function or member function template is
* declared 'const'.
*/
diff --git a/clang/test/Index/print-type-declaration.cpp b/clang/test/Index/print-type-declaration.cpp
index a0953d1e563..31c0a73fcd0 100644
--- a/clang/test/Index/print-type-declaration.cpp
+++ b/clang/test/Index/print-type-declaration.cpp
@@ -7,13 +7,6 @@ int main()
auto b = a;
}
-enum RegularEnum {};
-
-enum class ScopedEnum {};
-
// RUN: c-index-test -test-print-type-declaration -std=c++11 %s | FileCheck %s
// CHECK: VarDecl=a:6:8 (Definition) [typedeclaration=Test] [typekind=Record]
// CHECK: VarDecl=b:7:8 (Definition) [typedeclaration=Test] [typekind=Record]
-// CHECK: EnumDecl=RegularEnum:10:6 (Definition) [typedeclaration=RegularEnum] [typekind=Enum]
-// CHECK: EnumDecl=ScopedEnum:12:12 (Definition) (scoped) [typedeclaration=ScopedEnum] [typekind=Enum]
-
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index cf3581e259f..1e925569dd9 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -804,8 +804,6 @@ static void PrintCursor(CXCursor Cursor, const char *CommentSchemaFile) {
printf(" (const)");
if (clang_CXXMethod_isPureVirtual(Cursor))
printf(" (pure)");
- if (clang_EnumDecl_isScoped(Cursor))
- printf(" (scoped)");
if (clang_Cursor_isVariadic(Cursor))
printf(" (variadic)");
if (clang_Cursor_isObjCOptional(Cursor))
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 236f264c175..2cbca421c78 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -7807,15 +7807,6 @@ unsigned clang_CXXMethod_isVirtual(CXCursor C) {
return (Method && Method->isVirtual()) ? 1 : 0;
}
-unsigned clang_EnumDecl_isScoped(CXCursor C) {
- if (!clang_isDeclaration(C.kind))
- return 0;
-
- const Decl *D = cxcursor::getCursorDecl(C);
- auto *Enum = dyn_cast_or_null<EnumDecl>(D);
- return (Enum && Enum->isScoped()) ? 1 : 0;
-}
-
//===----------------------------------------------------------------------===//
// Attribute introspection.
//===----------------------------------------------------------------------===//
diff --git a/clang/tools/libclang/libclang.exports b/clang/tools/libclang/libclang.exports
index e0d178a5291..e78899e4c75 100644
--- a/clang/tools/libclang/libclang.exports
+++ b/clang/tools/libclang/libclang.exports
@@ -12,7 +12,6 @@ clang_CXXMethod_isConst
clang_CXXMethod_isPureVirtual
clang_CXXMethod_isStatic
clang_CXXMethod_isVirtual
-clang_EnumDecl_isScoped
clang_Cursor_getArgument
clang_Cursor_getNumTemplateArguments
clang_Cursor_getTemplateArgumentKind
OpenPOWER on IntegriCloud