[cfe-commits] r103894 - /cfe/trunk/include/clang/AST/TypeLoc.h
John McCall
rjmccall at apple.com
Sat May 15 19:12:01 PDT 2010
Author: rjmccall
Date: Sat May 15 21:12:01 2010
New Revision: 103894
URL: http://llvm.org/viewvc/llvm-project?rev=103894&view=rev
Log:
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.
Modified:
cfe/trunk/include/clang/AST/TypeLoc.h
Modified: cfe/trunk/include/clang/AST/TypeLoc.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLoc.h?rev=103894&r1=103893&r2=103894&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/TypeLoc.h (original)
+++ cfe/trunk/include/clang/AST/TypeLoc.h Sat May 15 21:12:01 2010
@@ -559,7 +559,7 @@
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 @@
}
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 @@
}
void initializeLocal(SourceLocation Loc) {
+ setHasBaseTypeAsWritten(true);
setLAngleLoc(Loc);
setRAngleLoc(Loc);
for (unsigned i = 0, e = getNumProtocols(); i != e; ++i)
More information about the cfe-commits
mailing list