LLM-Based Repair of C++ Implicit Data Loss Compiler Warnings: An Industrial Case Study
Chansong You, Hyun Deok Choi, Jingun Hong

TL;DR
This paper introduces an automated LLM-based method to fix implicit data loss warnings in large C++ projects, significantly reducing manual effort and maintaining code quality.
Contribution
It presents a novel approach combining LSP, Tree-sitter, and LLMs to automatically generate fixes for compiler warnings in industrial-scale C++ code.
Findings
92.73% acceptance rate of fixes by developers
39.09% reduction in unnecessary warning fixes
13.56% behind human-optimized solutions
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Security and Verification in Computing · Advanced Software Engineering Methodologies
