[PATCH] D10834: Added functions to retrieve information about variable storage in libclang and its python bindings.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 8 15:50:20 PDT 2015


rsmith added inline comments.

================
Comment at: include/clang-c/Index.h:3815-3823
@@ -3814,2 +3814,11 @@
 
 /**
+ * \brief Returns true if a variable with function scope is a non-static local variable.
+ */
+CINDEX_LINKAGE bool clang_Cursor_hasLocalStorage(CXCursor C);
+
+/*
+ * \brief  Returns true if a variable with function scope is a static local variable.
+ */
+CINDEX_LINKAGE bool clang_Cursor_isStaticLocal(CXCursor C);
+
----------------
It might be better to combine these into a single function (`getLocalVarKind`?) returning an enum { not local, non-static local, static local }.


http://reviews.llvm.org/D10834





More information about the cfe-commits mailing list