Skip to content

upstream: report clang PCH bug (touched header breaks #pragma once with -fpch-validate-input-files-content) #4849

Closed

Description

@zackees

With -fpch-validate-input-files-content, clang 21.1.x accepts a PCH whose input header is byte-identical but has a newer mtime. It then fails to match the header to the copy inside the PCH, so #pragma once doesn't stop it being included again, which gives 'redefinition of' and 'redefines default argument' errors. Minimal repro: build a PCH from a #pragma once header, touch the header, compile a TU that includes it with -include-pch. FastLED works around it (#4839 mtime rule, #4843 e2e test and fail-safe; see the 'Precompiled Header Invariant' section in agents/docs/testing-commands.md). Task: file it on llvm/llvm-project with the repro and link it here. Parent: #4844.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions