]> granicus.if.org Git - clang/commit
Simplify EnterTokenStream API to make it more robust for memory management
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 9 Feb 2016 18:52:09 +0000 (18:52 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 9 Feb 2016 18:52:09 +0000 (18:52 +0000)
commita31043191688f3dce6f7f24908cc260965de47d1
treed287fceb321dddd046f6c2e336ed49e04776c7f4
parent703b2cb63cb1de7acb8ece35a0d5733e3411f377
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)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260246 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/clang/Lex/Preprocessor.h
lib/Frontend/PrintPreprocessedOutput.cpp
lib/Lex/PPDirectives.cpp
lib/Lex/PPMacroExpansion.cpp
lib/Lex/Pragma.cpp
lib/Parse/ParseCXXInlineMethods.cpp
lib/Parse/ParseDecl.cpp
lib/Parse/ParseExprCXX.cpp
lib/Parse/ParseObjc.cpp
lib/Parse/ParsePragma.cpp
lib/Parse/ParseStmtAsm.cpp
lib/Parse/ParseTemplate.cpp
lib/Rewrite/HTMLRewrite.cpp