diff options
-rw-r--r-- | include/clang/AST/TypeLocBuilder.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/AST/TypeLocBuilder.h b/include/clang/AST/TypeLocBuilder.h index e729488e43..880af267f3 100644 --- a/include/clang/AST/TypeLocBuilder.h +++ b/include/clang/AST/TypeLocBuilder.h @@ -79,7 +79,14 @@ class TypeLocBuilder { 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. |