Advertisement
Guest User

New -Wnonnull warnings when building with gcc-11

a guest
Sep 1st, 2021
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.74 KB | None | 0 0
  1. [431/5123] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MachineModuleInfo.cpp.o
  2. In constructor ‘llvm::MachineModuleInfo::MachineModuleInfo(const llvm::LLVMTargetMachine*)’,
  3. inlined from ‘llvm::MachineModuleInfoWrapperPass::MachineModuleInfoWrapperPass(const llvm::LLVMTargetMachine*)’ at /llvm/lib/CodeGen/MachineModuleInfo.cpp:357:26,
  4. inlined from ‘llvm::Pass* llvm::callDefaultCtor() [with PassName = llvm::MachineModuleInfoWrapperPass]’ at /llvm/include/llvm/PassSupport.h:80:76:
  5. /llvm/lib/CodeGen/MachineModuleInfo.cpp:240:51: warning: ‘this’ pointer is null [-Wnonnull]
  6. 240 | Context.setObjectFileInfo(TM->getObjFileLowering());
  7. |
  8.  
  9. [4602/5123] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/RangeAdapterTest.cpp.o
  10. /llvm/unittests/ADT/RangeAdapterTest.cpp: In instantiation of ‘void {anonymous}::RangeAdapterRValueTest_RangeType_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = {anonymous}::BidirectionalVectorConsts]’:
  11. /llvm/unittests/ADT/RangeAdapterTest.cpp:158:1: required from here
  12. /llvm/unittests/ADT/RangeAdapterTest.cpp:162:61: warning: ‘this’ pointer is null [-Wnonnull]
  13. 162 | decltype(static_cast<TypeParam *>(nullptr)->rbegin())>::value,
  14. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  15. /llvm/unittests/ADT/RangeAdapterTest.cpp:71:20: note: in a call to non-static member function ‘{anonymous}::BidirectionalVectorConsts::reverse_iterator {anonymous}::BidirectionalVectorConsts::rbegin()’
  16. 71 | reverse_iterator rbegin() { return Vec.rbegin(); }
  17. | ^~~~~~
  18. /llvm/unittests/ADT/RangeAdapterTest.cpp:167:67: warning: ‘this’ pointer is null [-Wnonnull]
  19. 167 | decltype(static_cast<const TypeParam *>(nullptr)->rbegin())>::value,
  20. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  21. /llvm/unittests/ADT/RangeAdapterTest.cpp:73:26: note: in a call to non-static member function ‘{anonymous}::BidirectionalVectorConsts::const_reverse_iterator {anonymous}::BidirectionalVectorConsts::rbegin() const’
  22. 73 | const_reverse_iterator rbegin() const { return Vec.rbegin(); }
  23. | ^~~~~~
  24. /llvm/unittests/ADT/RangeAdapterTest.cpp: In instantiation of ‘void {anonymous}::RangeAdapterRValueTest_RangeType_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = std::vector<int>]’:
  25. /llvm/unittests/ADT/RangeAdapterTest.cpp:158:1: required from here
  26. /llvm/unittests/ADT/RangeAdapterTest.cpp:162:61: warning: ‘this’ pointer is null [-Wnonnull]
  27. 162 | decltype(static_cast<TypeParam *>(nullptr)->rbegin())>::value,
  28. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  29. In file included from /usr/include/c++/11/vector:67,
  30. from /llvm/utils/unittest/googletest/include/gtest/gtest.h:60,
  31. from /llvm/unittests/ADT/RangeAdapterTest.cpp:11:
  32. /usr/include/c++/11/bits/stl_vector.h:847:7: note: in a call to non-static member function ‘std::vector<_Tp, _Alloc>::reverse_iterator std::vector<_Tp, _Alloc>::rbegin() [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reverse_iterator = std::reverse_iterator<__gnu_cxx::__normal_iterator<int*, std::vector<int> > >]’
  33. 847 | rbegin() _GLIBCXX_NOEXCEPT
  34. | ^~~~~~
  35. /llvm/unittests/ADT/RangeAdapterTest.cpp:167:67: warning: ‘this’ pointer is null [-Wnonnull]
  36. 167 | decltype(static_cast<const TypeParam *>(nullptr)->rbegin())>::value,
  37. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  38. In file included from /usr/include/c++/11/vector:67,
  39. from /llvm/utils/unittest/googletest/include/gtest/gtest.h:60,
  40. from /llvm/unittests/ADT/RangeAdapterTest.cpp:11:
  41. /usr/include/c++/11/bits/stl_vector.h:856:7: note: in a call to non-static member function ‘std::vector<_Tp, _Alloc>::const_reverse_iterator std::vector<_Tp, _Alloc>::rbegin() const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reverse_iterator = std::reverse_iterator<__gnu_cxx::__normal_iterator<const int*, std::vector<int> > >]’
  42. 856 | rbegin() const _GLIBCXX_NOEXCEPT
  43. | ^~~~~~
  44. /llvm/unittests/ADT/RangeAdapterTest.cpp: In instantiation of ‘void {anonymous}::RangeAdapterRValueTest_RangeType_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = {anonymous}::ReverseOnlyVector]’:
  45. /llvm/unittests/ADT/RangeAdapterTest.cpp:158:1: required from here
  46. /llvm/unittests/ADT/RangeAdapterTest.cpp:162:61: warning: ‘this’ pointer is null [-Wnonnull]
  47. 162 | decltype(static_cast<TypeParam *>(nullptr)->rbegin())>::value,
  48. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  49. /llvm/unittests/ADT/RangeAdapterTest.cpp:30:20: note: in a call to non-static member function ‘{anonymous}::ReverseOnlyVector::reverse_iterator {anonymous}::ReverseOnlyVector::rbegin()’
  50. 30 | reverse_iterator rbegin() { return Vec.rbegin(); }
  51. | ^~~~~~
  52. /llvm/unittests/ADT/RangeAdapterTest.cpp:167:67: warning: ‘this’ pointer is null [-Wnonnull]
  53. 167 | decltype(static_cast<const TypeParam *>(nullptr)->rbegin())>::value,
  54. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  55. /llvm/unittests/ADT/RangeAdapterTest.cpp:32:26: note: in a call to non-static member function ‘{anonymous}::ReverseOnlyVector::const_reverse_iterator {anonymous}::ReverseOnlyVector::rbegin() const’
  56. 32 | const_reverse_iterator rbegin() const { return Vec.rbegin(); }
  57. | ^~~~~~
  58. /llvm/unittests/ADT/RangeAdapterTest.cpp: In instantiation of ‘void {anonymous}::RangeAdapterRValueTest_RangeType_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = {anonymous}::BidirectionalVector]’:
  59. /llvm/unittests/ADT/RangeAdapterTest.cpp:158:1: required from here
  60. /llvm/unittests/ADT/RangeAdapterTest.cpp:162:61: warning: ‘this’ pointer is null [-Wnonnull]
  61. 162 | decltype(static_cast<TypeParam *>(nullptr)->rbegin())>::value,
  62. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  63. /llvm/unittests/ADT/RangeAdapterTest.cpp:50:20: note: in a call to non-static member function ‘{anonymous}::BidirectionalVector::reverse_iterator {anonymous}::BidirectionalVector::rbegin() const’
  64. 50 | reverse_iterator rbegin() const { return Vec.rbegin(); }
  65. | ^~~~~~
  66. /llvm/unittests/ADT/RangeAdapterTest.cpp:167:67: warning: ‘this’ pointer is null [-Wnonnull]
  67. 167 | decltype(static_cast<const TypeParam *>(nullptr)->rbegin())>::value,
  68. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  69. /llvm/unittests/ADT/RangeAdapterTest.cpp:50:20: note: in a call to non-static member function ‘{anonymous}::BidirectionalVector::reverse_iterator {anonymous}::BidirectionalVector::rbegin() const’
  70. 50 | reverse_iterator rbegin() const { return Vec.rbegin(); }
  71. | ^~~~~~
  72. /llvm/unittests/ADT/RangeAdapterTest.cpp: In instantiation of ‘void {anonymous}::RangeAdapterRValueTest_RangeType_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = {anonymous}::CustomIteratorVector]’:
  73. /llvm/unittests/ADT/RangeAdapterTest.cpp:158:1: required from here
  74. /llvm/unittests/ADT/RangeAdapterTest.cpp:162:61: warning: ‘this’ pointer is null [-Wnonnull]
  75. 162 | decltype(static_cast<TypeParam *>(nullptr)->rbegin())>::value,
  76. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  77. /llvm/unittests/ADT/RangeAdapterTest.cpp:117:20: note: in a call to non-static member function ‘{anonymous}::CustomIteratorVector::reverse_iterator {anonymous}::CustomIteratorVector::rbegin() const’
  78. 117 | reverse_iterator rbegin() const { return reverse_iterator(V.end()); }
  79. | ^~~~~~
  80. /llvm/unittests/ADT/RangeAdapterTest.cpp:167:67: warning: ‘this’ pointer is null [-Wnonnull]
  81. 167 | decltype(static_cast<const TypeParam *>(nullptr)->rbegin())>::value,
  82. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  83. /llvm/unittests/ADT/RangeAdapterTest.cpp:117:20: note: in a call to non-static member function ‘{anonymous}::CustomIteratorVector::reverse_iterator {anonymous}::CustomIteratorVector::rbegin() const’
  84. 117 | reverse_iterator rbegin() const { return reverse_iterator(V.end()); }
  85. | ^~~~~~
  86. /llvm/unittests/ADT/RangeAdapterTest.cpp: In instantiation of ‘void {anonymous}::RangeAdapterRValueTest_RangeType_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = std::__cxx11::list<int>]’:
  87. /llvm/unittests/ADT/RangeAdapterTest.cpp:158:1: required from here
  88. /llvm/unittests/ADT/RangeAdapterTest.cpp:162:61: warning: ‘this’ pointer is null [-Wnonnull]
  89. 162 | decltype(static_cast<TypeParam *>(nullptr)->rbegin())>::value,
  90. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  91. In file included from /usr/include/c++/11/list:63,
  92. from /llvm/unittests/ADT/RangeAdapterTest.cpp:14:
  93. /usr/include/c++/11/bits/stl_list.h:981:7: note: in a call to non-static member function ‘std::__cxx11::list<_Tp, _Alloc>::reverse_iterator std::__cxx11::list<_Tp, _Alloc>::rbegin() [with _Tp = int; _Alloc = std::allocator<int>; std::__cxx11::list<_Tp, _Alloc>::reverse_iterator = std::reverse_iterator<std::_List_iterator<int> >]’
  94. 981 | rbegin() _GLIBCXX_NOEXCEPT
  95. | ^~~~~~
  96. /llvm/unittests/ADT/RangeAdapterTest.cpp:167:67: warning: ‘this’ pointer is null [-Wnonnull]
  97. 167 | decltype(static_cast<const TypeParam *>(nullptr)->rbegin())>::value,
  98. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  99. In file included from /usr/include/c++/11/list:63,
  100. from /llvm/unittests/ADT/RangeAdapterTest.cpp:14:
  101.  
  102.  
  103.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement