diff options
| author | Erich Keane <erich.keane@intel.com> | 2018-06-22 17:34:44 +0000 |
|---|---|---|
| committer | Erich Keane <erich.keane@intel.com> | 2018-06-22 17:34:44 +0000 |
| commit | 87cfcfd00915855a102ac6ec3bcb480b148f9210 (patch) | |
| tree | 2db165778ef30f49d51f3e0b72dba406dab856cb /clang/lib | |
| parent | 059d20360a1f872f15f063f89b784ba8352e4e09 (diff) | |
| download | bcm5719-llvm-87cfcfd00915855a102ac6ec3bcb480b148f9210.tar.gz bcm5719-llvm-87cfcfd00915855a102ac6ec3bcb480b148f9210.zip | |
[NFC] Fix AttributeList allocated_size for ParsedType.
This if/elseif structure seems to be missing this case.
Previously, this would report a size of 1 pointer too small.
This didn't really change anything besides failing to reclaim
a very small amount of memory.
llvm-svn: 335372
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/AttributeList.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/AttributeList.cpp b/clang/lib/Sema/AttributeList.cpp index bdb91c7e39c..4cd32b361da 100644 --- a/clang/lib/Sema/AttributeList.cpp +++ b/clang/lib/Sema/AttributeList.cpp @@ -40,6 +40,8 @@ size_t AttributeList::allocated_size() const { return AttributeFactory::TypeTagForDatatypeAllocSize; else if (IsProperty) return AttributeFactory::PropertyAllocSize; + else if (HasParsedType) + return sizeof(AttributeList) + sizeof(void *); return (sizeof(AttributeList) + NumArgs * sizeof(ArgsUnion)); } |

