CLion
 
Get CLion
Join the CLion 2025.1 Early Access Program and try out new features before they are released! Find out more

Inspection: Argument selection defects

Last modified: 26 May 2024

When you call a function with several parameters of the same type, you can accidentally swap them and therefore encounter errors that might be difficult to debug. The Argument Selection Defects inspection helps you reveal and quick-fix such errors without even compiling your code (the original heuristic algorithm can be found in this research paper):

Argument Selection Defects inspections in the editor

This inspection is enabled by default. You can configure its severity and scope, or turn the inspection off in the Inspection settings dialog (choose C/C++, General, Argument selection defects).