[llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

Michael Kuperstein via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 23 16:09:21 PST 2017


Thanks Marshall,

Regarding the first group - these are all LLVM IR-level optimizer tests, so
they don't actually care about what a particular version of C++ does or
does not contain.

Thanks,
  Michael

On Mon, Jan 23, 2017 at 1:32 PM, Marshall Clow via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> The upcoming C++1z (probably C++17) standard will not contain several
> things - most notably auto_ptr.
>
> Soon, libc++ will not be providing auto_ptr by default when building in
> C++1z mode.
> You'll be able to get it back with a
> "-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" on your command line, or
> "#define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" before including any
> libc++ header files.
>
> Grepping through the LLVM code base, I found several references to
> auto_ptr that should be investigated.  Most, if not all of them are in test
> cases.
>
> # Tests that reference auto_ptr
> llvm/test/CodeGen/X86/negate-add-zero.ll
> llvm/test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll
> llvm/test/Transforms/MemCpyOpt/loadstore-sret.ll
>
> # Things that define their own auto_ptr
> llvm/tools/clang/test/Analysis/diagnostics/Inputs/
> include/report-issues-within-main-file.h
> llvm/tools/clang/test/Analysis/diagnostics/report-
> issues-within-main-file.cpp
> llvm/tools/clang/test/CodeGenCXX/2010-07-23-DeclLoc.cpp
>
> # clang-tidy bits that reference auto_ptr
> llvm/tools/clang/tools/extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
> llvm/tools/clang/tools/extra/clang-tidy/modernize/ReplaceAutoPtrCheck.h
> llvm/tools/clang/tools/extra/docs/clang-tidy/checks/
> modernize-use-emplace.rst
> llvm/tools/clang/tools/extra/include-fixer/find-all-
> symbols/STLPostfixHeaderMap.cpp
> llvm/tools/clang/tools/extra/test/clang-tidy/Inputs/
> modernize-replace-auto-ptr/memory.h
> llvm/tools/clang/tools/extra/test/clang-tidy/modernize-
> replace-auto-ptr.cpp
> llvm/tools/clang/www/analyzer/potential_checkers.html
>
>
> The first three files should be investigated.
> I believe that the second group should not be affected by this change.
> The third group (the clang-tidy changes) probably will not be affected.
>
> -- Marshall
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170123/20640c2d/attachment-0001.html>


More information about the llvm-dev mailing list