[all-commits] [llvm/llvm-project] 8dc7b9: [NFC] Fixes -Wrange-loop-analysis warnings

mordante via All-commits all-commits at lists.llvm.org
Wed Jan 1 11:02:59 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8dc7b982b4556c243e0502e6e230bdd53ddd65ff
      https://github.com/llvm/llvm-project/commit/8dc7b982b4556c243e0502e6e230bdd53ddd65ff
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2020-01-01 (Wed, 01 Jan 2020)

  Changed paths:
    M clang-tools-extra/clang-doc/MDGenerator.cpp
    M clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
    M clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
    M clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp
    M clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
    M clang-tools-extra/clangd/index/MemIndex.cpp
    M clang/lib/CodeGen/CodeGenPGO.cpp
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
    M clang/lib/Tooling/ASTDiff/ASTDiff.cpp
    M clang/tools/clang-refactor/TestSupport.cpp
    M lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
    M lldb/source/Plugins/Platform/Android/AdbClient.cpp
    M lldb/source/Target/StackFrameRecognizer.cpp
    M llvm/include/llvm/Analysis/LoopInfo.h
    M llvm/include/llvm/Analysis/LoopInfoImpl.h
    M llvm/include/llvm/Support/GenericDomTree.h
    M llvm/lib/Analysis/DomTreeUpdater.cpp
    M llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/lib/CodeGen/InlineSpiller.cpp
    M llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
    M llvm/lib/CodeGen/RegAllocFast.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    M llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
    M llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
    M llvm/lib/IR/TypeFinder.cpp
    M llvm/lib/Linker/IRMover.cpp
    M llvm/lib/MC/XCOFFObjectWriter.cpp
    M llvm/lib/MCA/HardwareUnits/ResourceManager.cpp
    M llvm/lib/MCA/Stages/InstructionTables.cpp
    M llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
    M llvm/lib/Support/CommandLine.cpp
    M llvm/lib/Support/TargetParser.cpp

  Log Message:
  -----------
  [NFC] Fixes -Wrange-loop-analysis warnings

This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.

Differential Revision: https://reviews.llvm.org/D71857


  Commit: f022a5a792fd39a4c33f49583d24d96c70177066
      https://github.com/llvm/llvm-project/commit/f022a5a792fd39a4c33f49583d24d96c70177066
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2020-01-01 (Wed, 01 Jan 2020)

  Changed paths:
    M clang/include/clang/AST/Decl.h
    M clang/lib/AST/Decl.cpp
    M clang/lib/Sema/SemaStmt.cpp
    M clang/test/SemaCXX/warn-range-loop-analysis.cpp

  Log Message:
  -----------
  Adds fixit hints to the -Wrange-loop-analysis

Differential Revision: https://reviews.llvm.org/D68913


  Commit: e5ab1e49f958cd8388bab617819ba78167e557d3
      https://github.com/llvm/llvm-project/commit/e5ab1e49f958cd8388bab617819ba78167e557d3
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2020-01-01 (Wed, 01 Jan 2020)

  Changed paths:
    M clang/lib/Sema/SemaStmt.cpp
    M clang/test/SemaCXX/warn-range-loop-analysis.cpp

  Log Message:
  -----------
  Improve Wrange-loop-analyses for rvalue reference

The Wrange-loop-analyses warns if a copy is made. Suppress this warning when
a temporary is bound to a rvalue reference.

While fixing this issue also found a copy-paste error in test6, which is also
fixed.

Differential Revision: https://reviews.llvm.org/D71806


  Commit: d8117542ac57f6051674ca70ea14c0e0d7d9b046
      https://github.com/llvm/llvm-project/commit/d8117542ac57f6051674ca70ea14c0e0d7d9b046
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2020-01-01 (Wed, 01 Jan 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/test/Misc/warning-wall.c
    M clang/test/SemaCXX/warn-range-loop-analysis.cpp

  Log Message:
  -----------
  Adds -Wrange-loop-analysis to -Wall

This makes the range loop warnings part of -Wall.

Fixes PR32823: Warn about accidental coping of data in range based for

Differential Revision: https://reviews.llvm.org/D68912


Compare: https://github.com/llvm/llvm-project/compare/9b24dad6c06b...d8117542ac57


More information about the All-commits mailing list