[cfe-dev] Function Call Rewriting
Chris Lattner
clattner at apple.com
Wed Aug 12 09:19:27 PDT 2009
On Aug 12, 2009, at 6:28 AM, Makslane Araújo Rodrigues wrote:
> Hi again!
>
> I want to catch the err_typecheck_call_too_few_args error (int the
> DiagnosticClient::HandleDiagnostic) and get the function call thats
> causes the error:
>
> void func1(int a) {}
>
> void func2()
> {
> func1(); //error here
> }
>
> I've no idea how to get the information that is the func1 call is
> causing the error.
the easiest way to find it is with grep:
$ cd llvm/tools/clang
$ grep err_typecheck_call_too_few_args lib/*/*
lib/Sema/SemaChecking.cpp: return Diag(TheCall->getLocEnd(),
diag::err_typecheck_call_too_few_args)
lib/Sema/SemaChecking.cpp: return Diag(TheCall->getLocEnd(),
diag::err_typecheck_call_too_few_args)
lib/Sema/SemaChecking.cpp: return Diag(TheCall->getLocEnd(),
diag::err_typecheck_call_too_few_args)
lib/Sema/SemaChecking.cpp: return Diag(TheCall->getLocEnd(),
diag::err_typecheck_call_too_few_args)
lib/Sema/SemaChecking.cpp:
diag::err_typecheck_call_too_few_args)
lib/Sema/SemaChecking.cpp:
diag::err_typecheck_call_too_few_args)
lib/Sema/SemaExpr.cpp: return Diag(RParenLoc,
diag::err_typecheck_call_too_few_args)
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090812/03611138/attachment.html>
More information about the cfe-dev
mailing list