Skip to content

Diagnostic controls don't seem to work as expected for linked diagnostic groups #86978

@jamieQ

Description

@jamieQ

Description

IIUC the design doc implies that specifying diagnostic flags for a parent group should apply them to children unless the children are explicitly passed with different values. this does not appear to work for the RegionIsolation (parent) and SendingRisksDataRace (child) groups.

Reproduction

// swiftc -language-mode 5 -strict-concurrency=complete -Werror RegionIsolation
class C {}

func send(_: @escaping @Sendable () -> Void) {}

func f(_ c: C) {
    send { _ = c } // ⚠️ still a warning despite upgrading parent diagnostic group to an error
}

Expected behavior

the parent group diagnostic settings should be inherited by child groups

Environment

Swift version 6.3-dev (LLVM 4f7a3dbb7e97ac4, Swift 477d32c)
Target: x86_64-unknown-linux-gnu

// 6.3 dev snapshot

Additional information

godbolt: https://swift.godbolt.org/z/EcxW8fKxe

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage neededThis issue needs more specific labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions