<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62505>62505</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Clang compilation failure from 578a4716f549: "unknown type name 'FILE'"
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Caslyn
      </td>
    </tr>
</table>

<pre>
    We are seeing build failures on Fuchsia build bots after 578a4716f549 landed:

Link to Build failure: https://luci-milo.appspot.com/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.x64-host_test_only-mac/b8782262413740663777/overview

A minimal reproducer is attached: 
[clang-crashreports.zip](https://github.com/llvm/llvm-project/files/11378601/clang-crashreports.zip)

Error Message:
```
FAILED: host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.io.cpp.o 
../../../recipe_cleanup/clang2z5wqv3h/bin/clang++ -MD -MF host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.io.cpp.o.d -DFUCHSIA_API_LEVEL=12 -D_LIBCPP_DISABLE_AVAILABILITY -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES -DNDEBUG=1 -DRAPIDJSON_HAS_STDSTRING -DRAPIDJSON_HAS_CXX11_RANGE_FOR -DRAPIDJSON_HAS_CXX11_RVALUE_REFS -DRAPIDJSON_HAS_CXX11_TYPETRAITS -DRAPIDJSON_HAS_CXX11_NOEXCEPT -I../.. -Ihost_x64/gen -I../../third_party/github.com/google/cppdap/include -I../../third_party/rapidjson/include -DCPPDAP_JSON_RAPID -fcolor-diagnostics -fcrash-diagnostics-dir=clang-crashreports -fcrash-diagnostics=all -gen-reproducer=error -ffp-contract=off -mmacosx-version-min=10.13 --sysroot=/opt/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk --target=x86_64-apple-darwin -ffile-compilation-dir=. -no-canonical-prefixes -fomit-frame-pointer -fdata-sections -ffunction-sections -Os -gdwarf-4 -Xclang -debug-info-kind=constructor -g3 -Wall -Wextra -Wconversion -Wextra-semi -Wimplicit-fallthrough -Wnewline-eof -Wstrict-prototypes -Wwrite-strings -Wno-sign-conversion -Wno-unused-parameter -Wnonportable-system-include-path -Wno-type-limits -fvisibility=hidden -Werror -Wno-error=deprecated-declarations -Wa,--fatal-warnings -mmacosx-version-min=10.13 --sysroot=/opt/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk --target=x86_64-apple-darwin -Wno-extra-semi -Wno-ambiguous-reversed-operator -fvisibility-inlines-hidden -faligned-allocation -stdlib=libc++ -std=c++17 -faligned-allocation -fno-exceptions -fno-rtti -faligned-allocation -stdlib=libc++ -c ../../third_party/github.com/google/cppdap/src/io.cpp -o host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.io.cpp.o
In file included from ../../third_party/github.com/google/cppdap/src/io.cpp:15:
../../third_party/github.com/google/cppdap/include/dap/io.h:74:36: error: unknown type name 'FILE'
std::shared_ptr<ReaderWriter> file(FILE* file, bool closable = true);
                                   ^
1 error generated.
clang++: error: failing because '-gen-reproducer' is used
Fuchsia clang version 17.0.0 (https://llvm.googlesource.com/llvm-project d366da97bd24ddfb91c9f260fa0aaf105d947652)
Target: x86_64-apple-darwin
Thread model: posix
InstalledDir: ../../../recipe_cleanup/clang2z5wqv3h/bin
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: clang-crashreports/io-255897.cpp
clang++: note: diagnostic msg: clang-crashreports/io-255897.sh
clang++: note: diagnostic msg: Crash backtrace is located in
clang++: note: diagnostic msg: /opt/s/w/ir/x/w/recipe_cleanup/Library/Logs/DiagnosticReports/clang++_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang++: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang++: note: diagnostic msg: 

********************
[7517/55236](11) CXX host_x64/obj/third_party/flatbuffers/src/src/compiler_files.idl_gen_swift.cpp.o
[7518/55236](11) CXX host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.null_json_serializer.cpp.o
[7519/55236](11) CXX host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.content_stream.cpp.o
[7520/55236](11) CXX host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.network.cpp.o
FAILED: host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.network.cpp.o 
../../../recipe_cleanup/clang2z5wqv3h/bin/clang++ -MD -MF host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.network.cpp.o.d -DFUCHSIA_API_LEVEL=12 -D_LIBCPP_DISABLE_AVAILABILITY -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES -DNDEBUG=1 -DRAPIDJSON_HAS_STDSTRING -DRAPIDJSON_HAS_CXX11_RANGE_FOR -DRAPIDJSON_HAS_CXX11_RVALUE_REFS -DRAPIDJSON_HAS_CXX11_TYPETRAITS -DRAPIDJSON_HAS_CXX11_NOEXCEPT -I../.. -Ihost_x64/gen -I../../third_party/github.com/google/cppdap/include -I../../third_party/rapidjson/include -DCPPDAP_JSON_RAPID -fcolor-diagnostics -fcrash-diagnostics-dir=clang-crashreports -fcrash-diagnostics=all -gen-reproducer=error -ffp-contract=off -mmacosx-version-min=10.13 --sysroot=/opt/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk --target=x86_64-apple-darwin -ffile-compilation-dir=. -no-canonical-prefixes -fomit-frame-pointer -fdata-sections -ffunction-sections -Os -gdwarf-4 -Xclang -debug-info-kind=constructor -g3 -Wall -Wextra -Wconversion -Wextra-semi -Wimplicit-fallthrough -Wnewline-eof -Wstrict-prototypes -Wwrite-strings -Wno-sign-conversion -Wno-unused-parameter -Wnonportable-system-include-path -Wno-type-limits -fvisibility=hidden -Werror -Wno-error=deprecated-declarations -Wa,--fatal-warnings -mmacosx-version-min=10.13 --sysroot=/opt/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk --target=x86_64-apple-darwin -Wno-extra-semi -Wno-ambiguous-reversed-operator -fvisibility-inlines-hidden -faligned-allocation -stdlib=libc++ -std=c++17 -faligned-allocation -fno-exceptions -fno-rtti -faligned-allocation -stdlib=libc++ -c ../../third_party/github.com/google/cppdap/src/network.cpp -o host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.network.cpp.o
In file included from ../../third_party/github.com/google/cppdap/src/network.cpp:17:
In file included from ../../third_party/github.com/google/cppdap/src/socket.h:18:
../../third_party/github.com/google/cppdap/include/dap/io.h:74:36: error: unknown type name 'FILE'
std::shared_ptr<ReaderWriter> file(FILE* file, bool closable = true);
                                   ^
1 error generated.
clang++: error: failing because '-gen-reproducer' is used
Fuchsia clang version 17.0.0 (https://llvm.googlesource.com/llvm-project d366da97bd24ddfb91c9f260fa0aaf105d947652)
Target: x86_64-apple-darwin
Thread model: posix
InstalledDir: ../../../recipe_cleanup/clang2z5wqv3h/bin
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: clang-crashreports/network-07ecbd.cpp
clang++: note: diagnostic msg: clang-crashreports/network-07ecbd.sh
clang++: note: diagnostic msg: Crash backtrace is located in
clang++: note: diagnostic msg: /opt/s/w/ir/x/w/recipe_cleanup/Library/Logs/DiagnosticReports/clang++_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang++: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang++: note: diagnostic msg: 

********************
[7521/55236](11) CC host_x64/obj/third_party/freetype2/src/psaux/libfreetype2_for_rust_host.psaux.c.o
[7522/55236](11) CXX host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.socket.cpp.o
FAILED: host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.socket.cpp.o 
../../../recipe_cleanup/clang2z5wqv3h/bin/clang++ -MD -MF host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.socket.cpp.o.d -DFUCHSIA_API_LEVEL=12 -D_LIBCPP_DISABLE_AVAILABILITY -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES -DNDEBUG=1 -DRAPIDJSON_HAS_STDSTRING -DRAPIDJSON_HAS_CXX11_RANGE_FOR -DRAPIDJSON_HAS_CXX11_RVALUE_REFS -DRAPIDJSON_HAS_CXX11_TYPETRAITS -DRAPIDJSON_HAS_CXX11_NOEXCEPT -I../.. -Ihost_x64/gen -I../../third_party/github.com/google/cppdap/include -I../../third_party/rapidjson/include -DCPPDAP_JSON_RAPID -fcolor-diagnostics -fcrash-diagnostics-dir=clang-crashreports -fcrash-diagnostics=all -gen-reproducer=error -ffp-contract=off -mmacosx-version-min=10.13 --sysroot=/opt/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk --target=x86_64-apple-darwin -ffile-compilation-dir=. -no-canonical-prefixes -fomit-frame-pointer -fdata-sections -ffunction-sections -Os -gdwarf-4 -Xclang -debug-info-kind=constructor -g3 -Wall -Wextra -Wconversion -Wextra-semi -Wimplicit-fallthrough -Wnewline-eof -Wstrict-prototypes -Wwrite-strings -Wno-sign-conversion -Wno-unused-parameter -Wnonportable-system-include-path -Wno-type-limits -fvisibility=hidden -Werror -Wno-error=deprecated-declarations -Wa,--fatal-warnings -mmacosx-version-min=10.13 --sysroot=/opt/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk --target=x86_64-apple-darwin -Wno-extra-semi -Wno-ambiguous-reversed-operator -fvisibility-inlines-hidden -faligned-allocation -stdlib=libc++ -std=c++17 -faligned-allocation -fno-exceptions -fno-rtti -faligned-allocation -stdlib=libc++ -c ../../third_party/github.com/google/cppdap/src/socket.cpp -o host_x64/obj/third_party/github.com/google/cppdap/src/libcppdap.socket.cpp.o
In file included from ../../third_party/github.com/google/cppdap/src/socket.cpp:15:
In file included from ../../third_party/github.com/google/cppdap/src/socket.h:18:
../../third_party/github.com/google/cppdap/include/dap/io.h:74:36: error: unknown type name 'FILE'
std::shared_ptr<ReaderWriter> file(FILE* file, bool closable = true);
                                   ^
1 error generated.
clang++: error: failing because '-gen-reproducer' is used
Fuchsia clang version 17.0.0 (https://llvm.googlesource.com/llvm-project d366da97bd24ddfb91c9f260fa0aaf105d947652)
Target: x86_64-apple-darwin
Thread model: posix
InstalledDir: ../../../recipe_cleanup/clang2z5wqv3h/bin
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: clang-crashreports/socket-b04796.cpp
clang++: note: diagnostic msg: clang-crashreports/socket-b04796.sh
clang++: note: diagnostic msg: Crash backtrace is located in
clang++: note: diagnostic msg: /opt/s/w/ir/x/w/recipe_cleanup/Library/Logs/DiagnosticReports/clang++_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang++: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang++: note: diagnostic msg: 

********************
```


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsW1tz4rgS_jXKi0ouIwOGhzw4GGY4h1wqMJPMk0tIbdBGSD6SnMv--lOyISGTzM5mdzK1NUuKcrDUbvVN3a2vMHNOrjTAMeqdoF5-xGq_NvZ4xJx60EdLIx6OrwAzC9gBSL3Cy1oqgUsmVW3BYaPxpOZrJ9l2Zmm8w6z0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