summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/NestedNameSpecifier.cpp
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2018-09-10 21:54:04 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2018-09-10 21:54:04 +0000
commitc587164422194d55acf772f4920bcdeefe310743 (patch)
treea05a92a574ed43aef1d6629ee00097a29f1ca017 /clang/lib/AST/NestedNameSpecifier.cpp
parent07889079faac12fe69109911e08097df91bd55d6 (diff)
downloadbcm5719-llvm-c587164422194d55acf772f4920bcdeefe310743.tar.gz
bcm5719-llvm-c587164422194d55acf772f4920bcdeefe310743.zip
[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
Diffstat (limited to 'clang/lib/AST/NestedNameSpecifier.cpp')
-rw-r--r--clang/lib/AST/NestedNameSpecifier.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/AST/NestedNameSpecifier.cpp b/clang/lib/AST/NestedNameSpecifier.cpp
index a514d57b6b6..df23972af2d 100644
--- a/clang/lib/AST/NestedNameSpecifier.cpp
+++ b/clang/lib/AST/NestedNameSpecifier.cpp
@@ -547,6 +547,7 @@ operator=(const NestedNameSpecifierLocBuilder &Other) {
}
// Deep copy.
+ BufferSize = 0;
Append(Other.Buffer, Other.Buffer + Other.BufferSize, Buffer, BufferSize,
BufferCapacity);
return *this;
OpenPOWER on IntegriCloud