diff --git a/clang/lib/AST/APValue.cpp b/clang/lib/AST/APValue.cpp --- a/clang/lib/AST/APValue.cpp +++ b/clang/lib/AST/APValue.cpp @@ -1062,7 +1062,7 @@ } case APValue::Union: - if (const auto *FD = V.getUnionField()) + if (V.getUnionField()) Merge(V.getUnionValue()); break; diff --git a/lld/MachO/SymbolTable.cpp b/lld/MachO/SymbolTable.cpp --- a/lld/MachO/SymbolTable.cpp +++ b/lld/MachO/SymbolTable.cpp @@ -134,7 +134,7 @@ // FIXME: Make every symbol (including absolute symbols) contain a // reference to their originating file, then add that file name to this // error message. - if (auto *defined = dyn_cast(s)) + if (isa(s)) error("found defined symbol with illegal name " + DSOHandle::name); } replaceSymbol(s, header);