Add libclang function 'clang_CXXMethod_isStatic' to query of a C++ method
is declared static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103963 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 753e90e..16cd309 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -2752,6 +2752,19 @@
 }
 } // end: extern "C"
 
+
+//===----------------------------------------------------------------------===//
+// C++ AST instrospection.
+//===----------------------------------------------------------------------===//
+
+extern "C" {
+unsigned clang_CXXMethod_isStatic(CXCursor C) {
+  if (!clang_isDeclaration(C.kind))
+    return 0;
+  CXXMethodDecl *D = dyn_cast<CXXMethodDecl>(cxcursor::getCursorDecl(C));
+  return (D && D->isStatic()) ? 1 : 0;
+} // end: extern "C"
+
 //===----------------------------------------------------------------------===//
 // CXString Operations.
 //===----------------------------------------------------------------------===//
diff --git a/tools/libclang/libclang.darwin.exports b/tools/libclang/libclang.darwin.exports
index 2ea3677..4b61bd3 100644
--- a/tools/libclang/libclang.darwin.exports
+++ b/tools/libclang/libclang.darwin.exports
@@ -1,3 +1,4 @@
+_clang_CXXMethod_isStatic
 _clang_annotateTokens
 _clang_codeComplete
 _clang_codeCompleteGetDiagnostic
@@ -23,8 +24,8 @@
 _clang_equalLocations
 _clang_equalTypes
 _clang_formatDiagnostic
-_clang_getCanonicalType
 _clang_getCString
+_clang_getCanonicalType
 _clang_getClangVersion
 _clang_getCompletionChunkCompletionString
 _clang_getCompletionChunkKind
diff --git a/tools/libclang/libclang.exports b/tools/libclang/libclang.exports
index 321a4cc..ad984f0 100644
--- a/tools/libclang/libclang.exports
+++ b/tools/libclang/libclang.exports
@@ -1,3 +1,4 @@
+clang_CXXMethod_isStatic
 clang_annotateTokens
 clang_codeComplete
 clang_codeCompleteGetDiagnostic
@@ -23,8 +24,8 @@
 clang_equalLocations
 clang_equalTypes
 clang_formatDiagnostic
-clang_getCanonicalType
 clang_getCString
+clang_getCanonicalType
 clang_getClangVersion
 clang_getCompletionChunkCompletionString
 clang_getCompletionChunkKind