summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2016-02-09 18:52:09 +0000
committerDavid Blaikie <dblaikie@gmail.com>2016-02-09 18:52:09 +0000
commit2eabcc988f636cd98e9bb2c5c5e3ad5913e7267c (patch)
tree5155a49f343e8e5b3726ffadc53f2165d4acf64c /clang/lib/Rewrite
parentcb1175c7db87175ce4231555ad9eb75b762bb0d1 (diff)
downloadbcm5719-llvm-2eabcc988f636cd98e9bb2c5c5e3ad5913e7267c.tar.gz
bcm5719-llvm-2eabcc988f636cd98e9bb2c5c5e3ad5913e7267c.zip
Simplify EnterTokenStream API to make it more robust for memory management
While this won't help fix things like the bug that r260219 addressed, it seems like good tidy up to have anyway. (it might be nice if "makeArrayRef" always produced a MutableArrayRef & let it decay to an ArrayRef when needed - then I'd use that for the MutableArrayRefs in this patch) If we had std::dynarray I'd use that instead of unique_ptr+size_t, ideally (but then it'd have to be threaded down through the Preprocessor all the way - no idea how painful that would be) llvm-svn: 260246
Diffstat (limited to 'clang/lib/Rewrite')
-rw-r--r--clang/lib/Rewrite/HTMLRewrite.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Rewrite/HTMLRewrite.cpp b/clang/lib/Rewrite/HTMLRewrite.cpp
index 275fbd0ebca..2d82d8fd4bd 100644
--- a/clang/lib/Rewrite/HTMLRewrite.cpp
+++ b/clang/lib/Rewrite/HTMLRewrite.cpp
@@ -502,7 +502,7 @@ void html::HighlightMacros(Rewriter &R, FileID FID, const Preprocessor& PP) {
// Enter the tokens we just lexed. This will cause them to be macro expanded
// but won't enter sub-files (because we removed #'s).
- TmpPP.EnterTokenStream(&TokenStream[0], TokenStream.size(), false, false);
+ TmpPP.EnterTokenStream(TokenStream, false);
TokenConcatenation ConcatInfo(TmpPP);
OpenPOWER on IntegriCloud