Displaying 1 result from an estimated 1 matches for "addconst".
Did you mean:
add_const
2016 Sep 21
4
Creating a clang-tidy const position check
...d qualifiers, e.g., X<const T&, Y const*>
const&.
My approach is to first find the right AST matcher expression to flag
style violations, and then use the lexer (getLocStart/End) to correct
them [1]. Does that sound reasonable? There's also
Qualifiers::removeConst and Qualifiers::addConst, but I'm not sure how
it affects the position of const.
I have trouble with finding all const-qualified types. I looked at
misc-misplaced-const for inspiration, which contains this matcher:
valueDecl(hasType(isConstQualified()))
Why doesn't this yield a match? My test code has this f...