]> granicus.if.org Git - clang/commit
-Wuninitialized: Split the classification of DeclRefExprs as initialization or
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 17 Jul 2012 00:06:14 +0000 (00:06 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 17 Jul 2012 00:06:14 +0000 (00:06 +0000)
commit9532e0d89ca2afa556f032aa9377f6ec1d3eaa3e
treee07d0329178ac5601de45085bf65fe3d8534548d
parent89e5aaf57e20b39e35b0d068ebbc09ae736f2e1e
-Wuninitialized: Split the classification of DeclRefExprs as initialization or
use out of TransferFunctions, and compute it in advance rather than on-the-fly.

This allows us to handle compound assignments with DeclRefExprs on the RHS
correctly, and also makes it trivial to treat const& function parameters as not
initializing the argument. The patch also makes both of those changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160330 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/UninitializedValues.cpp
test/Sema/uninit-variables.c
test/SemaCXX/uninit-variables.cpp