[AST] Fix a crash on invalid.
Problem was that we were appending to the source location info buffer in the
copy assignment operator (instead of overwriting).
rdar://42746401
llvm-svn: 341869
diff --git a/clang/lib/AST/NestedNameSpecifier.cpp b/clang/lib/AST/NestedNameSpecifier.cpp
index a514d57..df23972 100644
--- a/clang/lib/AST/NestedNameSpecifier.cpp
+++ b/clang/lib/AST/NestedNameSpecifier.cpp
@@ -547,6 +547,7 @@
}
// Deep copy.
+ BufferSize = 0;
Append(Other.Buffer, Other.Buffer + Other.BufferSize, Buffer, BufferSize,
BufferCapacity);
return *this;