зеркало из https://github.com/microsoft/clang-1.git
Be sure to initialize the "has base type as written" field of an
ObjCObjectTypeLoc. This should clear up some valgrind errors we've been seeing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103894 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
7eb914b139
Коммит
ca6773808f
|
@ -559,7 +559,7 @@ class SubstTemplateTypeParmTypeLoc :
|
|||
struct ObjCProtocolListLocInfo {
|
||||
SourceLocation LAngleLoc;
|
||||
SourceLocation RAngleLoc;
|
||||
bool HasBaseType;
|
||||
bool HasBaseTypeAsWritten;
|
||||
};
|
||||
|
||||
// A helper class for defining ObjC TypeLocs that can qualified with
|
||||
|
@ -610,11 +610,11 @@ public:
|
|||
}
|
||||
|
||||
bool hasBaseTypeAsWritten() const {
|
||||
return getLocalData()->HasBaseType;
|
||||
return getLocalData()->HasBaseTypeAsWritten;
|
||||
}
|
||||
|
||||
void setHasBaseTypeAsWritten(bool HasBaseType) {
|
||||
getLocalData()->HasBaseType = HasBaseType;
|
||||
getLocalData()->HasBaseTypeAsWritten = HasBaseType;
|
||||
}
|
||||
|
||||
TypeLoc getBaseLoc() const {
|
||||
|
@ -626,6 +626,7 @@ public:
|
|||
}
|
||||
|
||||
void initializeLocal(SourceLocation Loc) {
|
||||
setHasBaseTypeAsWritten(true);
|
||||
setLAngleLoc(Loc);
|
||||
setRAngleLoc(Loc);
|
||||
for (unsigned i = 0, e = getNumProtocols(); i != e; ++i)
|
||||
|
|
Загрузка…
Ссылка в новой задаче