vscode-cmantic icon indicating copy to clipboard operation
vscode-cmantic copied to clipboard

Pragma block for selected statements

Open benny-edlund opened this issue 3 years ago • 1 comments

How about the ability to add a suppression pragmas around selected rows?

  1. Select some rows
  2. Hit the suppress shortcut
  3. Tool generates the correct #pragma for compiler leaving the user with the cursor where to write the warning to suppress
  4. User enters the warning

If current row is already in a block a new suppression is added and we go to point 4

benny-edlund avatar Feb 19 '21 23:02 benny-edlund

Thank you for submitting! I'll be honest, I don't have much experience with #pragma directives, so I would have to look into that. From what I do understand they're fairly compiler-specific. In the short-term, I want to steer away from features that are dependent on certain compilers/systems/configurations. I only added the #pragma once header guard option because it's simple and most major compilers support it. In the future, if I decide to do anything that involves reading from compile_commands.json or .vscode/c_cpp_properties.json then I could implement this. I'll leave this open in order to gauge how many people would want this.

BigBahss avatar Feb 20 '21 13:02 BigBahss