aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/NestedNameSpecifier.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/NestedNameSpecifier.h')
-rw-r--r--include/clang/AST/NestedNameSpecifier.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/clang/AST/NestedNameSpecifier.h b/include/clang/AST/NestedNameSpecifier.h
index bda2d31fd5..228edc301d 100644
--- a/include/clang/AST/NestedNameSpecifier.h
+++ b/include/clang/AST/NestedNameSpecifier.h
@@ -339,14 +339,18 @@ class NestedNameSpecifierLocBuilder {
unsigned BufferCapacity;
public:
- NestedNameSpecifierLocBuilder();
+ NestedNameSpecifierLocBuilder()
+ : Representation(0), Buffer(0), BufferSize(0), BufferCapacity(0) { }
NestedNameSpecifierLocBuilder(const NestedNameSpecifierLocBuilder &Other);
NestedNameSpecifierLocBuilder &
operator=(const NestedNameSpecifierLocBuilder &Other);
- ~NestedNameSpecifierLocBuilder();
+ ~NestedNameSpecifierLocBuilder() {
+ if (BufferCapacity)
+ free(Buffer);
+ }
/// \brief Retrieve the representation of the nested-name-specifier.
NestedNameSpecifier *getRepresentation() const { return Representation; }