Skip to content

[clang][driver][MSVC] clang-cl's handling of /external:W0 is different from that of MSVC #155297

@uditagarwal97

Description

@uditagarwal97

Description

/external:W0 is used to disable warnings from external/system headers in MSVC (https://learn.microsoft.com/en-us/cpp/build/reference/external-external-headers-diagnostics?view=msvc-170). It does not have any effect on #pragma messages(). However, unlike MSVC, clang-cl disables pragma messages upon receiving /external:W0.

Example
Here's a working example: https://godbolt.org/z/Mb4c5zfax

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-cl`clang-cl` driver. Don't use for other compiler partsdiverges-from:msvcDoes the clang frontend diverge from msvc on this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions