diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2010-12-13 07:40:47 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2010-12-13 07:40:47 +0000 |
commit | e7f85047d0dd5ebb03d851fab0afa9db07ec2925 (patch) | |
tree | 4f504ec2f5c7d16a342152531b37ba6981642675 /lib/AST/TypeLoc.cpp | |
parent | 6a57746ea8e94aaf3fbcc961dc95756f5f3dda52 (diff) |
Fix PR8774 by restricting when hasInit returns true. Previously, it
would return true if the initializer pointer union had *any* non-null
pointer in it, even if the pointer wasn't one that would actually be
returned via getInit(). This makes it more accurately model the logic of
'getInit() != NULL'.
This still isn't completely satisfying. From a principled stance,
I suspect we should make hasInit() and getInit() *always* return false
and NULL (resp.) for ParmVarDecl. We shouldn't at the API level treat
initializers and default arguments as the same thing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121692 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/TypeLoc.cpp')
0 files changed, 0 insertions, 0 deletions