[all-commits] [llvm/llvm-project] 170b68: [Clang] Add a new warning to warn when passing uni...

ZequanWu via All-commits all-commits at lists.llvm.org
Tue Jun 2 10:23:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 170b6869b563dd3393d99f3e03d389b9058d5f24
      https://github.com/llvm/llvm-project/commit/170b6869b563dd3393d99f3e03d389b9058d5f24
  Author: Zequan Wu <zequanwu at google.com>
  Date:   2020-06-02 (Tue, 02 Jun 2020)

  Changed paths:
    M clang/include/clang/Analysis/Analyses/UninitializedValues.h
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Analysis/UninitializedValues.cpp
    M clang/lib/Sema/AnalysisBasedWarnings.cpp
    M clang/test/Misc/warning-wall.c
    M clang/test/SemaCXX/uninit-variables.cpp
    M clang/test/SemaCXX/uninitialized.cpp
    A clang/test/SemaCXX/warn-uninitialized-const-reference.cpp

  Log Message:
  -----------
  [Clang] Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

Summary:
Add a new warning -Wuninitialized-const-reference as a subgroup of -Wuninitialized to address a bug filed here: https://bugs.llvm.org/show_bug.cgi?id=45624

This warning is controlled by -Wuninitialized and can be disabled by -Wno-uninitialized-const-reference.
The warning is diagnosed when passing uninitialized variables as const reference parameters to a function.

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




More information about the All-commits mailing list