[cfe-commits] r86731 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseObjc.cpp test/SemaObjC/objc-string-constant.m
Chris Lattner
clattner at apple.com
Tue Nov 10 14:22:50 PST 2009
On Nov 10, 2009, at 2:16 PM, Ted Kremenek wrote:
> Author: kremenek
> Date: Tue Nov 10 16:16:29 2009
> New Revision: 86731
>
> URL: http://llvm.org/viewvc/llvm-project?rev=86731&view=rev
> Log:
> Make -Wsemicolon-before-method-body opt-in (and part of -Wextra).
> Addresses <rdar://problem/7381735>.
Please add a fixit hint for this warning that removes the ;
-Chris
>
> Modified:
> cfe/trunk/include/clang/Basic/DiagnosticGroups.td
> cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
> cfe/trunk/lib/Parse/ParseObjc.cpp
> cfe/trunk/test/SemaObjC/objc-string-constant.m
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=86731&r1=86730&r2=86731&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Tue Nov 10
> 16:16:29 2009
> @@ -69,6 +69,7 @@
> def : DiagGroup<"redundant-decls">;
> def ReturnType : DiagGroup<"return-type">;
> def : DiagGroup<"sequence-point">;
> +def SemiBeforeMethodBody : DiagGroup<"semicolon-before-method-body">;
> def : DiagGroup<"shadow">;
> def : DiagGroup<"shorten-64-to-32">;
> def SignCompare : DiagGroup<"sign-compare">;
> @@ -133,8 +134,8 @@
> def Format2 : DiagGroup<"format=2",
> [FormatNonLiteral, FormatSecurity,
> FormatY2K]>;
>
> -
> def Extra : DiagGroup<"extra", [
> + SemiBeforeMethodBody,
> SignCompare,
> UnusedParameter
> ]>;
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=86731&r1=86730&r2=86731&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Tue Nov 10
> 16:16:29 2009
> @@ -201,9 +201,9 @@
> "@end must appear in an @implementation context">;
> def error_property_ivar_decl : Error<
> "property synthesize requires specification of an ivar">;
> -def warn_semicolon_before_method_nody : Warning<
> +def warn_semicolon_before_method_body : Warning<
> "semicolon before method body is ignored">,
> - InGroup<DiagGroup<"semicolon-before-method-body">>;
> + InGroup<DiagGroup<"semicolon-before-method-body">>, DefaultIgnore;
>
> def err_expected_field_designator : Error<
> "expected a field designator, such as '.field = 4'">;
>
> Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=86731&r1=86730&r2=86731&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
> +++ cfe/trunk/lib/Parse/ParseObjc.cpp Tue Nov 10 16:16:29 2009
> @@ -1410,7 +1410,7 @@
> // parse optional ';'
> if (Tok.is(tok::semi)) {
> if (ObjCImpDecl)
> - Diag(Tok, diag::warn_semicolon_before_method_nody);
> + Diag(Tok, diag::warn_semicolon_before_method_body);
> ConsumeToken();
> }
>
>
> Modified: cfe/trunk/test/SemaObjC/objc-string-constant.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/objc-string-constant.m?rev=86731&r1=86730&r2=86731&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/test/SemaObjC/objc-string-constant.m (original)
> +++ cfe/trunk/test/SemaObjC/objc-string-constant.m Tue Nov 10
> 16:16:29 2009
> @@ -1,4 +1,4 @@
> -// RUN: clang-cc %s -verify -fsyntax-only
> +// RUN: clang-cc -Wsemicolon-before-method-body %s -verify -fsyntax-
> only
>
> #define nil 0 /* id of Nil instance */
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list