CLion
 
Get CLion
You are viewing the documentation for an earlier version of CLion.

Inspection: Argument selection defects

Last modified: 11 February 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).