]> granicus.if.org Git - clang/commit
[analyzer] pr37209: Fix casts of glvalues to references.
authorArtem Dergachev <artem.dergachev@gmail.com>
Fri, 4 May 2018 21:39:25 +0000 (21:39 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Fri, 4 May 2018 21:39:25 +0000 (21:39 +0000)
commit58c2ed20a28daf32644ce69bdfc1d181978a47aa
tree9b4f8f414dfa9f3ff8aebddb3058d69ad0c83ac0
parent8ae2126a3f455c3726c6ba93838d50f285fd1eba
[analyzer] pr37209: Fix casts of glvalues to references.

Many glvalue expressions aren't of their respective reference type -
they are simply glvalues of their value type.

This was causing problems when we were trying to obtain type of the original
expression while evaluating certain glvalue bit-casts.

Fixed by artificially forging a reference type to provide to the casting
procedure.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331558 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngineC.cpp
test/Analysis/casts.cpp