[cfe-dev] ASTUnitTest.cpp does not compile under C++11
Isaac Hier via cfe-dev
cfe-dev at lists.llvm.org
Wed Jun 6 13:54:25 PDT 2018
You need to use `-std=c++14` or `-std=c++1y` for this to work.
On Wed, Jun 6, 2018 at 6:53 AM Csaba Raduly via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
>
> /usr/bin/g++ -DGTEST_HAS_RTTI=0 -DGTEST_HAS_TR1_TUPLE=0
> -DGTEST_LANG_CXX11=1 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
> -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> -Itools/clang/unittests/Frontend
> -I~/wk/LLVM/llvm/tools/clang/unittests/Frontend
> -I~/wk/LLVM/llvm/tools/clang/include -Itools/clang/include
> -I/usr/include/libxml2 -Iinclude -I~/wk/LLVM/llvm/include
> -I~/wk/LLVM/llvm/utils/unittest/googletest/include
> -I~/wk/LLVM/llvm/utils/unittest/googlemock/include -fPIC
> -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra
> -Wno-unused-parameter -Wwrite-strings -Wcast-qual
> -Wno-missing-field-initializers -pedantic -Wno-long-long
> -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
> -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common
> -Woverloaded-virtual -fno-strict-aliasing -O3 -UNDEBUG
> -Wno-variadic-macros -fno-exceptions -fno-rtti -MD -MT
> tools/clang/unittests/Frontend/CMakeFiles/FrontendTests.dir/ASTUnitTest.cpp.o
> -MF tools/clang/unittests/Frontend/CMakeFiles/FrontendTests.dir/ASTUnitTest.cpp.o.d
> -o tools/clang/unittests/Frontend/CMakeFiles/FrontendTests.dir/ASTUnitTest.cpp.o
> -c ~/wk/LLVM/llvm/tools/clang/unittests/Frontend/ASTUnitTest.cpp
>
> llvm/tools/clang/unittests/Frontend/ASTUnitTest.cpp:38:23: error:
> ‘make_unique’ is not a member of ‘std’
> input_file = std::make_unique<ToolOutputFile>(InputFileName, FD);
> ^~~~~~~~~~~
>
> Csaba
> --
> You can get very substantial performance improvements
> by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
> So if you're looking for a completely portable, 100% standards-conformat way
> to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list