Index: include/clang-c/Index.h
===================================================================
--- include/clang-c/Index.h	(revision 166259)
+++ include/clang-c/Index.h	(working copy)
@@ -2655,6 +2655,13 @@
 CINDEX_LINKAGE unsigned long long clang_getEnumConstantDeclUnsignedValue(CXCursor C);
 
 /**
+ * \brief Retrieve the bit width of a bit field declaration as an integer.
+ *
+ * If a cursor that is not a bit field declaration is passed in, -1 is returned.
+ */
+CINDEX_LINKAGE int clang_getFieldDeclBitWidth(CXCursor C);
+
+/**
  * \brief Retrieve the number of non-variadic arguments associated with a given
  * cursor.
  *
Index: tools/libclang/CXType.cpp
===================================================================
--- tools/libclang/CXType.cpp	(revision 166259)
+++ tools/libclang/CXType.cpp	(working copy)
@@ -265,6 +265,21 @@
   return ULLONG_MAX;
 }
 
+int clang_getFieldDeclBitWidth(CXCursor C) {
+  using namespace cxcursor;
+
+  if (clang_isDeclaration(C.kind)) {
+    Decl * D = getCursorDecl(C);
+
+    if (FieldDecl *FD = dyn_cast_or_null<FieldDecl>(D)) {
+      if (FD->isBitField())
+        return FD->getBitWidthValue(getCursorContext(C));
+    }
+  }
+
+  return -1;
+}
+
 CXType clang_getCanonicalType(CXType CT) {
   if (CT.kind == CXType_Invalid)
     return CT;
Index: tools/libclang/libclang.exports
===================================================================
--- tools/libclang/libclang.exports	(revision 166259)
+++ tools/libclang/libclang.exports	(working copy)
@@ -159,6 +159,7 @@
 clang_getEnumConstantDeclUnsignedValue
 clang_getEnumConstantDeclValue
 clang_getEnumDeclIntegerType
+clang_getFieldDeclBitWidth
 clang_getExpansionLocation
 clang_getFile
 clang_getFileName
