[SemaCXX] Fix false positive of -Wuninitialized-const-reference in empty function...
authorZequan Wu <zequanwu@google.com>
Wed, 24 Jun 2020 01:05:49 +0000 (18:05 -0700)
committerZequan Wu <zequanwu@google.com>
Mon, 6 Jul 2020 17:52:05 +0000 (10:52 -0700)
commit054704082b461418d3dac3a379792cdaf52d40b3
treed3106a2a2bd4807b4e7a64acf715336f4525166a
parenta39e9cf6bec4e7c8e2e947972421c1d5a6f473d6
[SemaCXX] Fix false positive of -Wuninitialized-const-reference in empty function body.

Summary:
Some libraries use empty function to ignore unused variable warnings, which gets a new warning from `-Wuninitialized-const-reference`, discussed here https://reviews.llvm.org/D79895#2107604.
This patch should fix that.

Reviewers: hans, nick, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: aaron.ballman, riccibruno, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82425
clang/lib/Analysis/UninitializedValues.cpp
clang/test/SemaCXX/warn-uninitialized-const-reference.cpp