[PATCH] D61046: Fix compilation warnings when compiling with GCC 7.3
Alexandre Ganea via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 23 17:07:08 PDT 2019
aganea marked 5 inline comments as done.
aganea added inline comments.
================
Comment at: clang/trunk/unittests/AST/ASTImporterTest.cpp:4054
+ }
}
----------------
Fixes
```
[2097/2979] Building CXX object tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/LookupTest.cpp.o
/mnt/f/svn/clang/unittests/Tooling/LookupTest.cpp: In lambda function:
/mnt/f/svn/clang/unittests/Tooling/LookupTest.cpp:220:8: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
if (Type.getDecl()->getQualifiedNameAsString() == "x::y::Old")
^
```
================
Comment at: clang/trunk/unittests/Tooling/LookupTest.cpp:222
EXPECT_EQ("Foo", replaceRecordTypeLoc(Type, "::x::Foo"));
+ }
};
----------------
Fixes
```
[2107/2979] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/ASTImporterTest.cpp.o
/mnt/f/svn/clang/unittests/AST/ASTImporterTest.cpp: In member function ‘void clang::ast_matchers::RedeclChain<TypeParam>::TypedTest_PrototypeShouldBeImportedAsAPrototypeWhenThereIsNoDefinition()’:
/mnt/f/svn/clang/unittests/AST/ASTImporterTest.cpp:4051:8: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
if (auto *ToT = dyn_cast<TemplateDecl>(ToD))
^
```
================
Comment at: lld/trunk/ELF/LinkerScript.cpp:892
+ SHF_EXECINSTR);
if (IsEmpty && isDiscardable(*Sec)) {
----------------
Fixes
```
[2238/2979] Building CXX object tools/lld/ELF/CMakeFiles/lldELF.dir/LinkerScript.cpp.o
/mnt/f/svn/lld/ELF/LinkerScript.cpp: In member function ‘void lld::elf::LinkerScript::adjustSectionsBeforeSorting()’:
/mnt/f/svn/lld/ELF/LinkerScript.cpp:891:35: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
Flags & ((Sec->NonAlloc ? 0 : SHF_ALLOC) | SHF_WRITE | SHF_EXECINSTR);
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
```
================
Comment at: llvm/trunk/unittests/Support/TypeTraitsTest.cpp:95
+
} // namespace triviality
----------------
Fixes a bunch of
```
[2828/2979] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/TypeTraitsTest.cpp.o
/mnt/f/svn/llvm/unittests/Support/TypeTraitsTest.cpp:20:6: warning: ‘void {anonymous}::triviality::TrivialityTester() [with T = {anonymous}::triviality::B&&; bool IsTriviallyCopyConstructible = false; bool IsTriviallyMoveConstructible = true]’ defined but not used [-Wunused-function]
void TrivialityTester() {
^~~~~~~~~~~~~~~~
```
================
Comment at: llvm/trunk/unittests/Transforms/Scalar/CMakeLists.txt:17
+ set_source_files_properties(LoopPassManagerTest.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-function)
+endif()
----------------
Fixes
```
[2894/2979] Building CXX object unittests/Transforms/Scalar/CMakeFiles/ScalarTests.dir/LoopPassManagerTest.cpp.o
In file included from /mnt/f/svn/llvm/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h:43:0,
from /mnt/f/svn/llvm/utils/unittest/googlemock/include/gmock/gmock.h:61,
from /mnt/f/svn/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp:29:
/mnt/f/svn/llvm/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h:896:11: warning: ‘testing::internal::TypedExpectation<F>::~TypedExpectation() noexcept [with F = {anonymous}::MockAnalysisHandleBase<{anonymous}::MockFunctionAnalysisHandle, llvm::Function>::Analysis::Result(llvm::Function&, llvm::AnalysisManager<llvm::Function>&)]’ declared ‘static’ but never defined [-Wunused-function]
virtual ~TypedExpectation() {
^
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61046/new/
https://reviews.llvm.org/D61046
More information about the cfe-commits
mailing list