Skip to content

[regression] erroneous "-Werror=nsconsumed-mismatch is currently enabled, but was not in the PCH file" when importing module #35163

@hyp

Description

@hyp
Bugzilla Link 35815
Resolution FIXED
Resolved on Jan 03, 2018 15:53
Version 6.0
OS All
Blocks #35152
CC @hyp
Fixed by commit(s) 321775

Extended Description

The following sample illustrates the problem:

$ cat Inputs/module.map
module mod2 {
header "mod2.h"
}

$ cat Inputs/mod2.h
@​interface X2
@​end

$ cat repr.m
@​interface I

  • (void)override;

@​end

@​implementation I

  • (void)override { }

@​end

@​interface Sub

@​end

@​implementation Sub

  • (void)override { }

@​end

@​import mod2;

$ clang -c -fmodules -I Inputs -fobjc-arc repr.m
repr.m:1:12: warning: class 'I' defined without specifying a base class [-Wobjc-root-class]
@​interface I
^
repr.m:1:13: note: add a super class to fix this problem
@​interface I
^
repr.m:13:12: warning: class 'Sub' defined without specifying a base class [-Wobjc-root-class]
@​interface Sub
^
repr.m:13:15: note: add a super class to fix this problem
@​interface Sub
^
error: -Werror=nsconsumed-mismatch is currently enabled, but was not in the PCH file
2 warnings and 1 error generated.

The error should not be presented. This is a regression after r313717.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclangClang issues not falling into any other category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions