Saved in:
Bibliographic Details
Main Authors: You, Chansong, Choi, Hyun Deok, Hong, Jingun
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2601.14936
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909996852183040
author You, Chansong
Choi, Hyun Deok
Hong, Jingun
author_facet You, Chansong
Choi, Hyun Deok
Hong, Jingun
contents This paper presents a method to automatically fix implicit data loss warnings in large C++ projects using Large Language Models (LLMs). Our approach uses the Language Server Protocol (LSP) to gather context, Tree-sitter to extract relevant code, and LLMs to make decisions and generate fixes. The method evaluates the necessity of range checks concerning performance implications and generates appropriate fixes. We tested this method in a large C++ project, resulting in a 92.73% acceptance rate of the fixes by human developers during the code review. Our LLM-generated fixes reduced the number of warning fix changes that introduced additional instructions due to range checks and exception handling by 39.09% compared to a baseline fix strategy. This result was 13.56% behind the optimal solutions created by human developers. These findings demonstrate that our LLM-based approach can reduce the manual effort to address compiler warnings while maintaining code quality and performance in a real-world scenario. Our automated approach shows promise for integration into existing development workflows, potentially improving code maintenance practices in complex C++ software projects.
format Preprint
id arxiv_https___arxiv_org_abs_2601_14936
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle LLM-Based Repair of C++ Implicit Data Loss Compiler Warnings: An Industrial Case Study
You, Chansong
Choi, Hyun Deok
Hong, Jingun
Software Engineering
This paper presents a method to automatically fix implicit data loss warnings in large C++ projects using Large Language Models (LLMs). Our approach uses the Language Server Protocol (LSP) to gather context, Tree-sitter to extract relevant code, and LLMs to make decisions and generate fixes. The method evaluates the necessity of range checks concerning performance implications and generates appropriate fixes. We tested this method in a large C++ project, resulting in a 92.73% acceptance rate of the fixes by human developers during the code review. Our LLM-generated fixes reduced the number of warning fix changes that introduced additional instructions due to range checks and exception handling by 39.09% compared to a baseline fix strategy. This result was 13.56% behind the optimal solutions created by human developers. These findings demonstrate that our LLM-based approach can reduce the manual effort to address compiler warnings while maintaining code quality and performance in a real-world scenario. Our automated approach shows promise for integration into existing development workflows, potentially improving code maintenance practices in complex C++ software projects.
title LLM-Based Repair of C++ Implicit Data Loss Compiler Warnings: An Industrial Case Study
topic Software Engineering
url https://arxiv.org/abs/2601.14936