Author: rjmccall
Date: Thu Jun 10 19:26:38 2010
New Revision: 105800
URL: http://llvm.org/viewvc/llvm-project?rev=105800&view=rev
Log:
Provide a method to clear the current state of a TypeLocBuilder.
Modified:
cfe/trunk/include/clang/AST/TypeLocBuilder.h
Modified: cfe/trunk/include/clang/AST/TypeLocBuilder.h
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLocBuilder.h?rev=105800&r1=105799&r2=105800&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/TypeLocBuilder.h (original)
+++ cfe/trunk/include/clang/AST/TypeLocBuilder.h Thu Jun 10 19:26:38 2010
@@ -79,7 +79,14 @@
size_t LocalSize = TypeSpecTypeLoc::LocalDataSize;
return cast<TypeSpecTypeLoc>(pushImpl(T, LocalSize));
}
-
+
+ /// Resets this builder to the newly-initialized state.
+ void clear() {
+#ifndef NDEBUG
+ LastTy = QualType();
+#endif
+ Index = Capacity;
+ }
/// Pushes space for a new TypeLoc of the given type. Invalidates
/// any TypeLocs previously retrieved from this builder.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits