diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -4937,6 +4937,13 @@ SLit->outputString(OS); return cxstring::createDup(OS.str()); } + if (C.kind == CXCursor_IntegerLiteral) { + SmallString<64> Buf; + if (const IntegerLiteral *ILit = dyn_cast(E)) { + ILit->getValue().toString(Buf, 10, true); + return cxstring::createDup(Buf); + } + } const Decl *D = getDeclFromExpr(getCursorExpr(C)); if (D)