r208345 - Remove -Wnon-modular-include
Ben Langmuir
blangmuir at apple.com
Thu May 8 15:03:40 PDT 2014
On May 8, 2014, at 1:20 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> On Thu, May 8, 2014 at 11:09 AM, Ben Langmuir <blangmuir at apple.com> wrote:
> Author: benlangmuir
> Date: Thu May 8 13:09:29 2014
> New Revision: 208345
>
> URL: http://llvm.org/viewvc/llvm-project?rev=208345&view=rev
> Log:
> Remove -Wnon-modular-include
>
> But keep -Wnon-modular-include-in-[framework-]module
>
> This warning is too noisy and doesn't really indicate a problem for most
> people. Even though it would only really affect people using
> -Weverything, that seems bad so remove it.
>
> Wait a second, we were planning on using this to replace -fmodules-strict-decluse. People using -Weverything need to use -Wno-foo for the warnings they don't want; that's the cost of using that option.
I thought decluse only applied inside a module, so it would be -Wnon-modular-include-in-module? If I’ve misunderstood something then I’m happy to revert this :-)
Ben
>
> Modified:
> cfe/trunk/include/clang/Basic/DiagnosticGroups.td
> cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
> cfe/trunk/lib/Lex/ModuleMap.cpp
> cfe/trunk/test/Modules/require-modular-includes.m
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=208345&r1=208344&r2=208345&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Thu May 8 13:09:29 2014
> @@ -190,8 +190,6 @@ def NonModularIncludeInFrameworkModule
> : DiagGroup<"non-modular-include-in-framework-module">;
> def NonModularIncludeInModule : DiagGroup<"non-modular-include-in-module",
> [NonModularIncludeInFrameworkModule]>;
> -def NonModularInclude : DiagGroup<"non-modular-include",
> - [NonModularIncludeInModule]>;
> def InvalidNoreturn : DiagGroup<"invalid-noreturn">;
> def InvalidSourceEncoding : DiagGroup<"invalid-source-encoding">;
> def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">;
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td?rev=208345&r1=208344&r2=208345&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td Thu May 8 13:09:29 2014
> @@ -626,8 +626,7 @@ def warn_non_modular_include_in_framewor
> def warn_non_modular_include_in_module : Warning<
> "include of non-modular header inside module '%0'">,
> InGroup<NonModularIncludeInModule>, DefaultIgnore;
> -def warn_non_modular_include : Warning<
> - "include of non-modular header">, InGroup<NonModularInclude>, DefaultIgnore;
> +
>
> def warn_header_guard : Warning<
> "%0 is used as a header guard here, followed by #define of a different macro">,
>
> Modified: cfe/trunk/lib/Lex/ModuleMap.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/ModuleMap.cpp?rev=208345&r1=208344&r2=208345&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Lex/ModuleMap.cpp (original)
> +++ cfe/trunk/lib/Lex/ModuleMap.cpp Thu May 8 13:09:29 2014
> @@ -310,8 +310,6 @@ void ModuleMap::diagnoseHeaderInclusion(
> diag::warn_non_modular_include_in_framework_module :
> diag::warn_non_modular_include_in_module;
> Diags.Report(FilenameLoc, DiagID) << RequestingModule->getFullModuleName();
> - } else {
> - Diags.Report(FilenameLoc, diag::warn_non_modular_include);
> }
> }
>
>
> Modified: cfe/trunk/test/Modules/require-modular-includes.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/require-modular-includes.m?rev=208345&r1=208344&r2=208345&view=diff
> ==============================================================================
> --- cfe/trunk/test/Modules/require-modular-includes.m (original)
> +++ cfe/trunk/test/Modules/require-modular-includes.m Thu May 8 13:09:29 2014
> @@ -40,12 +40,6 @@
> // RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \
> // RUN: -Werror -fmodule-name=A -fsyntax-only -x objective-c -
>
> -// Including a non-modular header (directly) with -Wnon-modular-include
> -// RUN: echo '#include "NotInModule.h"' | \
> -// RUN: %clang_cc1 -Wnon-modular-include -fmodules \
> -// RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \
> -// RUN: -fmodule-name=A -fsyntax-only -x objective-c - 2>&1 | FileCheck %s
> -
> // Including an excluded header
> // RUN: echo '@import IncludeExcluded;' | \
> // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
> @@ -86,10 +80,4 @@
> // RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \
> // RUN: -Werror -fsyntax-only -x objective-c -
>
> -// Non-framework module (fail)
> -// RUN: echo '@import NotFramework;' | \
> -// RUN: not %clang_cc1 -Werror=non-modular-include -fmodules \
> -// RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \
> -// RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s
> -
> // CHECK: include of non-modular header
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140508/8a6fd98e/attachment.html>
More information about the cfe-commits
mailing list