<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kons9</author_name>
  <author_url>https://blog.hatena.ne.jp/kons9/</author_url>
  <blog_title>Nature Engineering Blog</blog_title>
  <blog_url>https://engineering.nature.global/</blog_url>
  <categories>
  </categories>
  <description>はじめに こんにちは。ファームウェアエンジニアチーム、インターンの後藤です。 修士論文の発表と提出が無事に終わり、毎日が幸せいっぱいです。 レガシーコードリファクタの一環として、ヨーダ記法を置換しようという話になりました。 今回はlibclangを用いてヨーダ記法を置換するお話です。 はじめに ヨーダ記法とは libclangとは 対象、非対象のヨーダ記法例 置換までの流れ 速習libclang libclangの構造 ASTの探索方法 ノードの判別 ASTとソースコードとの対応 ヨーダ記法の検知 検索条件 JSONフォーマット ソースコード 検知処理(C++) C++ファイル生成スクリプト(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fengineering.nature.global%2Fentry%2Freplace-yoda-condition-by-libclang&quot; title=&quot;ヨーダ記法をlibclang使って置換してみた - Nature Engineering Blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/153216657/165425705348297</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-02-27 15:00:00</published>
  <title>ヨーダ記法をlibclang使って置換してみた</title>
  <type>rich</type>
  <url>https://engineering.nature.global/entry/replace-yoda-condition-by-libclang</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
