Correct getExtraLocalDataSize for ObjCTypeParamTypeLoc.
rdar://
24619481
rdar://
25060179
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281404
91177308-0d34-0410-b5e6-
96231b3b80d8
unsigned getExtraLocalDataSize() const {
if (!this->getNumProtocols()) return 0;
- return this->getNumProtocols() * sizeof(SourceLocation) ;
+ // When there are protocol qualifers, we have LAngleLoc and RAngleLoc
+ // as well.
+ return (this->getNumProtocols() + 2) * sizeof(SourceLocation) ;
}
unsigned getExtraLocalDataAlignment() const {
return llvm::alignOf<SourceLocation>();