aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Tooling/Syntax/BuildTree.cpp
diff options
context:
space:
mode:
authorYang Fan <nullptr.cpp@gmail.com>2021-02-18 16:31:40 +0800
committerYang Fan <nullptr.cpp@gmail.com>2021-02-18 17:10:50 +0800
commit64fc9cc723195b3dc10c03e62d088b0ed51973d0 (patch)
treed5e29c6dae2475ffb2e2445deb08cb7196adb7ba /clang/lib/Tooling/Syntax/BuildTree.cpp
parent12875ed97607648b92595b7bf9a8ede550b25342 (diff)
downloadllvm-64fc9cc723195b3dc10c03e62d088b0ed51973d0.zip
llvm-64fc9cc723195b3dc10c03e62d088b0ed51973d0.tar.gz
llvm-64fc9cc723195b3dc10c03e62d088b0ed51973d0.tar.bz2
[CSSPGO][llvm-profgen] Fix gcc Wcast-qual warning (NFC)
GCC warning: ``` [3397/3703] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o In file included from /llvm-project/llvm/include/llvm/ADT/STLExtras.h:19, from /llvm-project/llvm/include/llvm/ADT/StringRef.h:12, from /llvm-project/llvm/include/llvm/ADT/Twine.h:13, from /llvm-project/llvm/tools/llvm-profgen/ErrorHandling.h:12, from /llvm-project/llvm/tools/llvm-profgen/llvm-profgen.cpp:13: /llvm-project/llvm/include/llvm/ADT/Optional.h: In instantiation of ‘void llvm::optional_detail::OptionalStorage<T, <anonymous> >::emplace(Args&& ...) [with Args = {const std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::sampleprof::LineLocation>}; T = const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>; bool <anonymous> = false]’: /llvm-project/llvm/include/llvm/ADT/Optional.h:79:7: required from ‘constexpr llvm::optional_detail::OptionalStorage<T, <anonymous> >::OptionalStorage(llvm::optional_detail::OptionalStorage<T, <anonymous> >&&) [with T = const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>; bool <anonymous> = false]’ /llvm-project/llvm/include/llvm/ADT/Optional.h:253:13: required from here /llvm-project/llvm/include/llvm/ADT/Optional.h:113:12: warning: cast from type ‘const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>*’ to type ‘void*’ casts away qualifiers [-Wcast-qual] 113 | ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [3398/3703] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o In file included from /llvm-project/llvm/include/llvm/ADT/STLExtras.h:19, from /llvm-project/llvm/include/llvm/ADT/StringRef.h:12, from /llvm-project/llvm/include/llvm/ADT/Twine.h:13, from /llvm-project/llvm/tools/llvm-profgen/ErrorHandling.h:12, from /llvm-project/llvm/tools/llvm-profgen/PerfReader.h:11, from /llvm-project/llvm/tools/llvm-profgen/PerfReader.cpp:8: /llvm-project/llvm/include/llvm/ADT/Optional.h: In instantiation of ‘void llvm::optional_detail::OptionalStorage<T, <anonymous> >::emplace(Args&& ...) [with Args = {const std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::sampleprof::LineLocation>}; T = const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>; bool <anonymous> = false]’: /llvm-project/llvm/include/llvm/ADT/Optional.h:79:7: required from ‘constexpr llvm::optional_detail::OptionalStorage<T, <anonymous> >::OptionalStorage(llvm::optional_detail::OptionalStorage<T, <anonymous> >&&) [with T = const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>; bool <anonymous> = false]’ /llvm-project/llvm/include/llvm/ADT/Optional.h:253:13: required from here /llvm-project/llvm/include/llvm/ADT/Optional.h:113:12: warning: cast from type ‘const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>*’ to type ‘void*’ casts away qualifiers [-Wcast-qual] 113 | ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [3399/3703] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o In file included from /llvm-project/llvm/include/llvm/ADT/STLExtras.h:19, from /llvm-project/llvm/include/llvm/ADT/ArrayRef.h:15, from /llvm-project/llvm/include/llvm/ADT/DenseMapInfo.h:18, from /llvm-project/llvm/include/llvm/ADT/DenseMap.h:16, from /llvm-project/llvm/include/llvm/ADT/DenseSet.h:16, from /llvm-project/llvm/include/llvm/ProfileData/SampleProf.h:17, from /llvm-project/llvm/tools/llvm-profgen/CallContext.h:12, from /llvm-project/llvm/tools/llvm-profgen/ProfiledBinary.h:12, from /llvm-project/llvm/tools/llvm-profgen/ProfiledBinary.cpp:9: /llvm-project/llvm/include/llvm/ADT/Optional.h: In instantiation of ‘void llvm::optional_detail::OptionalStorage<T, <anonymous> >::emplace(Args&& ...) [with Args = {const std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::sampleprof::LineLocation>}; T = const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>; bool <anonymous> = false]’: /llvm-project/llvm/include/llvm/ADT/Optional.h:79:7: required from ‘constexpr llvm::optional_detail::OptionalStorage<T, <anonymous> >::OptionalStorage(llvm::optional_detail::OptionalStorage<T, <anonymous> >&&) [with T = const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>; bool <anonymous> = false]’ /llvm-project/llvm/include/llvm/ADT/Optional.h:253:13: required from here /llvm-project/llvm/include/llvm/ADT/Optional.h:113:12: warning: cast from type ‘const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>*’ to type ‘void*’ casts away qualifiers [-Wcast-qual] 113 | ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [3404/3703] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o In file included from /llvm-project/llvm/include/llvm/ADT/STLExtras.h:19, from /llvm-project/llvm/include/llvm/ADT/StringRef.h:12, from /llvm-project/llvm/include/llvm/ADT/Twine.h:13, from /llvm-project/llvm/tools/llvm-profgen/ErrorHandling.h:12, from /llvm-project/llvm/tools/llvm-profgen/ProfileGenerator.h:11, from /llvm-project/llvm/tools/llvm-profgen/ProfileGenerator.cpp:9: /llvm-project/llvm/include/llvm/ADT/Optional.h: In instantiation of ‘void llvm::optional_detail::OptionalStorage<T, <anonymous> >::emplace(Args&& ...) [with Args = {const std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::sampleprof::LineLocation>}; T = const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>; bool <anonymous> = false]’: /llvm-project/llvm/include/llvm/ADT/Optional.h:79:7: required from ‘constexpr llvm::optional_detail::OptionalStorage<T, <anonymous> >::OptionalStorage(llvm::optional_detail::OptionalStorage<T, <anonymous> >&&) [with T = const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>; bool <anonymous> = false]’ /llvm-project/llvm/include/llvm/ADT/Optional.h:253:13: required from here /llvm-project/llvm/include/llvm/ADT/Optional.h:113:12: warning: cast from type ‘const std::pair<std::__cxx11::basic_string<char>, llvm::sampleprof::LineLocation>*’ to type ‘void*’ casts away qualifiers [-Wcast-qual] 113 | ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
Diffstat (limited to 'clang/lib/Tooling/Syntax/BuildTree.cpp')
0 files changed, 0 insertions, 0 deletions