The code example for "RecursiveASTVisitor based ASTFrontendActions"
was using unique_ptr<X>(new X) when creating the AST consumer; change
it to use make_unique instead. The main function of the same example
already used make_unique.
Details
Details
- Reviewers
thakis - Commits
- rG2da4ceec936e: [docs] Use make_unique in FrontendAction example
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
@thakis - just FYI, Phab doesn't send mail to the mailing list when a patch is approved without any text. Please include some text when approving patches to make sure there's a record on the mailing list. (@MaskRay has a browser script or the like to automate this - I forget if it's posted somewhere to link to... maybe in the llvm phab docs)
Comment Actions
Only use in trivial approvals :)
// ==UserScript==
// @name reviews.llvm.org: add comment "LGTM" when accepting
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://reviews.llvm.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const select = document.querySelector('.aphront-form-input > select')
if (select)
select.onchange = function() {
const accept = select.querySelector('option[value=accept]')
if (accept && accept.disabled) {
const comment = document.querySelector('.remarkup-assist-textarea')
if (comment && comment.value.length == 0) {
const words = ['LGTM.', 'Thanks!', 'Looks great!']
comment.value = words[~~(Math.random()*words.length)]+' '
comment.focus()
}
}
}
})();