r176682 - [libclang] Introduce clang_findIncludesInFile, that can be used to retrieve all #import/#include directives in a specific file.
Dmitri Gribenko
gribozavr at gmail.com
Fri Mar 8 06:23:23 PST 2013
On Fri, Mar 8, 2013 at 4:32 AM, Argyrios Kyrtzidis <akyrtzi at gmail.com> 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?
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 <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list