[cfe-commits] r145930 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Misc/warning-flags.c test/Sema/builtins.c test/Sema/c89.c test/Sema/implicit-decl.c
hans at chromium.org
Mon Jan 9 01:19:16 PST 2012
On Fri, Jan 6, 2012 at 7:46 PM, Enea Zaffanella <zaffanella at cs.unipr.it> wrote:
> Il 06/12/2011 10:46, Hans Wennborg ha scritto:
>> Author: hans
>> Date: Tue Dec 6 03:46:12 2011
>> New Revision: 145930
>> URL: http://llvm.org/viewvc/llvm-project?rev=145930&view=rev
>> Suggest typo corrections for implicit function declarations.
>> A mistyped function call becomes an inmplicit function declaration in C.
>> Suggest typo correction when one can be found.
>> -def warn_builtin_unknown : Warning<"use of unknown builtin %0">, DefaultError;
>> +def err_builtin_unknown : Error<"use of unknown builtin %0">;
> Was this change (from warning to error) really needed to achieve what is
> specified in the commit message?
> We tried reverting from error to warning (mapped by default to Error,
> see attached patch) and we observed no failure in the clang tests.
> Having this as a warning allows clients to freely remap the diagnostic
> as more appropriate for their application (e.g., ignore it).
> Are there objections to committing this patch?
It was pointed out to me that it was weird to have a warning without a
flag that was DefaultError, and that it should be changed to simply be
an error, so that's what I did.
Since your patch adds a flag to the warning, I think it is fine.
More information about the cfe-commits