{"id":9775,"date":"2018-11-08T22:15:45","date_gmt":"2018-11-08T14:15:45","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vsnews\/?p=9775"},"modified":"2019-02-18T12:33:14","modified_gmt":"2019-02-18T20:33:14","slug":"aa349wu","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/vsnews\/akams-aa349wu\/","title":{"rendered":"Exploring Clang Tooling Part 3: Rewriting Code with clang-tidy (C++)"},"content":{"rendered":"<p>In the <a href=\"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2018\/10\/23\/exploring-clang-tooling-part-2-examining-the-clang-ast-with-clang-query\">previous post<\/a> in this series, we used <tt>clang-query<\/tt> to examine the Abstract Syntax Tree of a simple source code file. Using <tt>clang-query<\/tt>, we can prototype an AST Matcher which we can use in a <tt>clang-tidy<\/tt> check to refactor code in bulk.<\/p>\n<p>This time, we will complete the rewriting of the source code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous post in this series, we used clang-query to examine the Abstract Syntax Tree of a simple source code file. Using clang-query, we can prototype an AST Matcher which we can use in a clang-tidy check to refactor code in bulk. This time, we will complete the rewriting of the source code.<\/p>\n","protected":false},"author":836,"featured_media":8227,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-9775","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allskus"],"acf":[],"blog_post_summary":"<p>In the previous post in this series, we used clang-query to examine the Abstract Syntax Tree of a simple source code file. Using clang-query, we can prototype an AST Matcher which we can use in a clang-tidy check to refactor code in bulk. This time, we will complete the rewriting of the source code.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/posts\/9775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/users\/836"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/comments?post=9775"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/posts\/9775\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/media\/8227"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/media?parent=9775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/categories?post=9775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/tags?post=9775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}