[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

Zequan Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 19 11:28:52 PDT 2020


zequanwu updated this revision to Diff 264976.
zequanwu marked 3 inline comments as done.
zequanwu added a comment.

Fix typo.
Diagnose self-init warning if the self-init variable is used as const reference later.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79895/new/

https://reviews.llvm.org/D79895

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79895.264976.patch
Type: text/x-patch
Size: 11795 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200519/bf742356/attachment.bin>


More information about the cfe-commits mailing list