On Mar 8, 2013, at 6:23 AM, Dmitri Gribenko <[email protected]> wrote:
> On Fri, Mar 8, 2013 at 4:32 AM, Argyrios Kyrtzidis <[email protected]> wrote: >> +void clang_findIncludesInFile(CXTranslationUnit TU, CXFile file, >> + CXCursorAndRangeVisitor visitor) { >> + LogRef Log = Logger::make(LLVM_FUNCTION_NAME); >> + >> + if (!TU) { >> + if (Log) >> + *Log << "Null CXTranslationUnit"; >> + return; >> + } > > Hi Argyrios, > > The libclang logging infrastructure is essentially used to implement > "libclang debug mode" that we were discussing, right? I could add > logging to functions in CXComment.cpp, where instead of failing we > return a safe-but-nonsense value. What is your opinion on this? I fully endorse more logging, the more the merrier :-) At some point I want to add different "detail level" for each logger, so then we can specify something like LIBCLANG_LOGGING=<detail level> and choose how "noisy" we want the logging. (also it'd be nice having a way to specify the set of functions you only want logging for). > > Dmitri > > -- > main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if > (j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
