Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up


Find what you need - explore our website and developer resources
9 September 2026
When AI-assisted coding moves, refactors, or splits code across methods and files, a normal diff can make it difficult to tell whether anything changed beyond the relocation. Were comments lost? Was a variable renamed correctly? Did the generated code quietly alter behavior?
In this episode of the CLion series, learn how to use Compare to Clipboard to compare any selected block of code with code copied from another location—whether it has moved within a file, been extracted into a class, lives in a different file, or comes from an older Git revision.
This is a practical technique for reviewing agent-generated and refactored C++ code more confidently, especially when a conventional diff cannot align the original and moved code clearly.
00:00 Why large code comparisons are difficult
00:15 Reviewing AI-generated refactoring with diffs
01:16 Introducing Compare to Clipboard
01:45 Example: code moved into a class
02:58 Copy the original code to the clipboard
03:25 Compare selected code to the clipboard
04:14 Browse an older Git revision in CLion
05:06 Compare current code with historical code
05:25 Wrap-up