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

llvm-svn: 103963
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 753e90e..16cd309 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/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.
 //===----------------------------------------------------------------------===//