Skip to content

Commit 8ac8c1f

Browse files
committed
docs: add readme
1 parent e3ac62e commit 8ac8c1f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
snippets_clang
2+
==============
3+
4+
This repo contains several clang-specific code snippets, including using [libclang](libclang), [libclang with python bindings](libclang-py), and [clang libtooling](tooling) out-of-tree (no need to build LLVM/Clang from sources). The LLVM/Clang version tries to catch up with the latest official released version.

libclang-py/cc_dumper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def print_func(cursor: Cursor):
7474

7575

7676
def analyze_tu(fpath: str):
77-
fileKind = get_kind_from_filename(fpath)
78-
if fileKind == FileKind.NN:
77+
file_kind = get_kind_from_filename(fpath)
78+
if file_kind == FileKind.NN:
7979
return
8080
tu = Index.create().parse(fpath)
8181
print(f"=== {fpath} ===")
@@ -91,7 +91,7 @@ def analyze_dir(fpath: str):
9191
elif os.path.isfile(fullpath):
9292
analyze_tu(fullpath)
9393
else:
94-
print(f"{fpath} not a file/dir", file=sys.stderr)
94+
print(f"{fpath} not a C/C++ file or a directory", file=sys.stderr)
9595

9696

9797
if __name__ == "__main__":

0 commit comments

Comments
 (0)