[cfe-commits] r101586 - /cfe/trunk/tools/CIndex/CIndexCodeCompletion.cpp
Ted Kremenek
kremenek at apple.com
Fri Apr 16 17:21:42 PDT 2010
Author: kremenek
Date: Fri Apr 16 19:21:42 2010
New Revision: 101586
URL: http://llvm.org/viewvc/llvm-project?rev=101586&view=rev
Log:
Send code completion data in json format.
Modified:
cfe/trunk/tools/CIndex/CIndexCodeCompletion.cpp
Modified: cfe/trunk/tools/CIndex/CIndexCodeCompletion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndexCodeCompletion.cpp?rev=101586&r1=101585&r2=101586&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndexCodeCompletion.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndexCodeCompletion.cpp Fri Apr 16 19:21:42 2010
@@ -440,14 +440,16 @@
}
}
- os << '\'' << (EndTime.getWallTime() - StartTime.getWallTime()) << "' "
- << '\'' << Results->NumResults << "' "
- << '\'' << Results->Diagnostics.size() << "' "
- << '\'' << (lang ? lang : "<unknown>") << "' "
- << '\'' << (usesPCH ? 1 : 0) << "' ";
+ os << "{ ";
+ os << "\"wall\": " << (EndTime.getWallTime() - StartTime.getWallTime());
+ os << ", \"numRes\": " << Results->NumResults;
+ os << ", \"diags\": " << Results->Diagnostics.size();
+ os << ", \"pch\": " << (usesPCH ? "true" : "false");
+ os << ", \"lang\": \"" << (lang ? lang : "<unknown>") << '"';
const char *name = getlogin();
- os << '\'' << (name ? name : "<unknown>") << "' "
- << '\'' << getClangFullVersion() << '\'';
+ os << ", \"user\": \"" << (name ? name : "unknown") << '"';
+ os << ", \"clangVer\": \"" << getClangFullVersion() << '"';
+ os << " }";
llvm::StringRef res = os.str();
if (res.size() > 0) {
More information about the cfe-commits
mailing list