Add debug_helper.hpp

This commit is contained in:
Jonathan Müller 2017-02-21 19:24:16 +01:00
commit 958100d3e3
3 changed files with 37 additions and 1 deletions

View file

@ -0,0 +1,16 @@
// Copyright (C) 2017 Jonathan Müller <jonathanmueller.dev@gmail.com>
// This file is subject to the license terms in the LICENSE file
// found in the top-level directory of this distribution.
#include "debug_helper.hpp"
#include <cstdio>
#include <clang-c/Index.h>
using namespace cppast;
void detail::print_cursor_info(const CXCursor& cur) noexcept
{
std::printf("[debug] cursor '%s' (%s)\n", cxstring(clang_getCursorDisplayName(cur)).c_str(),
cxstring(clang_getCursorKindSpelling(cur.kind)).c_str());
}