diff options
author | John McCall <rjmccall@apple.com> | 2010-05-16 02:12:01 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-05-16 02:12:01 +0000 |
commit | ca6773808f8e75ffa86847e9d12885c69e9de53e (patch) | |
tree | 4d089b79fb297b3a7ed8c0c4c76599a7b74f100c | |
parent | 7eb914b1398e636845ce4ae8dd7022f72429d8c9 (diff) |
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
-rw-r--r-- | include/clang/AST/TypeLoc.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/clang/AST/TypeLoc.h b/include/clang/AST/TypeLoc.h index 4896fe948b..ae478c8c8d 100644 --- a/include/clang/AST/TypeLoc.h +++ b/include/clang/AST/TypeLoc.h @@ -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) |