aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/JSON.cpp
diff options
context:
space:
mode:
authorGeorgii Rymar <grimar@accesssoftek.com>2020-09-24 13:12:51 +0300
committerGeorgii Rymar <grimar@accesssoftek.com>2020-09-24 13:18:01 +0300
commit5bddaf6dbf77085863346d3171023e30972b7323 (patch)
tree73d9c98ca3a430db213c6ef94979af82e3b550d2 /llvm/lib/Support/JSON.cpp
parentd4ddf63fc40cfbbc348adcc45cdc6f6d78268c5c (diff)
downloadllvm-5bddaf6dbf77085863346d3171023e30972b7323.zip
llvm-5bddaf6dbf77085863346d3171023e30972b7323.tar.gz
llvm-5bddaf6dbf77085863346d3171023e30972b7323.tar.bz2
[llvm-readobj] - Fix a warning.
In a post review comments for D88097 it was mentioned that code triggers bunch of warnings of the form: llvm/tools/llvm-readobj/ELFDumper.cpp:5299:28: warning: loop variable 'Note' is always a copy because the range of type 'iterator_range<llvm::object::ELFFile<llvm::object::ELFType<llvm::support::big, true> >::Elf_Note_Iterator>' (aka 'iterator_range<Elf_Note_Iterator_Impl<ELFType<(llvm::support::endianness)0U, true> > >') does not return a reference [-Wrange-loop-analysis] for (const Elf_Note &Note : this->Obj.notes(P, Err)) It happens because Elf_Note is always copied here: Elf_Note_Impl<ELFT> operator*() const { assert(Nhdr && "dereferenced ELF note end iterator"); return Elf_Note_Impl<ELFT>(*Nhdr); } This patch fixes the issue by removing a reference.
Diffstat (limited to 'llvm/lib/Support/JSON.cpp')
0 files changed, 0 insertions, 0 deletions