Hi,

I just downloaded VS2017 RC on a clean Win10 machine, checked out LLVM &
clang and tried to build clang.

The following code in
\tools\clang\utils\TableGen\ClangDiagnosticsEmitter.cpp failed to compile:

    RecordSet DiagsInPedanticSet;
    RecordSet GroupsInPedanticSet;
    InferPedantic inferPedantic(DGParentMap, Diags, DiagGroups,
DiagsInGroup);
    inferPedantic.compute(&DiagsInPedanticSet, &GroupsInPedanticSet);
    auto &PedDiags = DiagsInGroup["pedantic"];
    // Put the diagnostics into a deterministic order.
    RecordVec DiagsInPedantic(DiagsInPedanticSet.begin(),
                              DiagsInPedanticSet.end());

because the RecordSet iterators created by DiagsInPedanticSet.begin() and
DiagsInPedanticSet.end() are not const iterators and the VS2017 vector code
tries to use (binary) operator* with one of these iterators, and expects  to
get a const ValueT but the compiler can currently only resolve the non-const
operator* on the DenseSet iterator. The patch implements operator* and
operator-> for const ValueT on the iterators in include/llvm/ADT/DenseSet.h.

The attached patch resolves the VS2017 build failure for me - do I need to
run further checks before someone can review/commit it for me?

Note: the fix is in the LLVM repository, not the clang repository.

Thanks, Andrew R

Attachment: llvm-2017-build-fix.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to