Skip to content

Instantly share code, notes, and snippets.

View master-q's full-sized avatar
🌴
On vacation

Kiwamu Okabe master-q

🌴
On vacation
View GitHub Profile
@master-q
master-q / clanglib.c
Last active September 7, 2017 10:27 — forked from raphaelmor/clanglib.c
clanglib usage example
// $ clang++-5.0 -I/usr/lib/llvm-5.0/include -lclang clanglib.c
// $ ./a.out foo.c
#include <cstdio>
#include <iostream>
#include <clang-c/Index.h>
#include <clang-c/Platform.h>
void printDiagnostics(CXTranslationUnit translationUnit);
void printTokenInfo(CXTranslationUnit translationUnit,CXToken currentToken);