[PATCH] Avoid std::function until PR19030 is fixed
Chandler Carruth
chandlerc at google.com
Mon Mar 3 12:03:56 PST 2014
Just add a bullet to the list of MSVC standard library things that we
should avoid?
On Mon, Mar 3, 2014 at 12:01 PM, Reid Kleckner <rnk at google.com> wrote:
> We'd like to keep the clang-cl self-host working until we implement
> MSVC-compatible RTTI.
>
> http://llvm-reviews.chandlerc.com/D2930
>
> Files:
> docs/CodingStandards.rst
>
> Index: docs/CodingStandards.rst
> ===================================================================
> --- docs/CodingStandards.rst
> +++ docs/CodingStandards.rst
> @@ -753,6 +753,17 @@
> // Remove the reference if you really want a new copy.
> for (auto Val : Container) { Val.change(); saveSomewhere(Val); }
>
> +Do not use std::function
> +^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +Using ``std::function`` breaks self-hosting Clang on Windows with the
> Microsoft
> +Visual C++ STL. MSVC's implementation of ``std::function`` requires
> RTTI, and
> +Clang does not implement `MSVC-compatible RTTI`_ yet. Generally, any
> local use
> +of ``std::function`` can be replaced with ``auto``. For code that truly
> needs
> +an opaque function, use something else for the meantime.
> +
> +.. _MSVC-style RTTI: http://llvm.org/PR18951
> +
> Style Issues
> ============
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140303/eb92917b/attachment.html>
More information about the llvm-commits
mailing list