3

I use Visual Studio 2019 and clang-tidy. I have a file in my solution with name .clang-tidy and it has rows like

modernize-, -modernize-pass-by-value*

I've used if statements with initializer which has come with C++17 standards but I get a warning:

I'd like to use C++17 standards without getting a warning.

'if' initialization statements are a C++17 extension.

I saw that it is related with flag -Wc++17-extensions but could not manage to solve it.

-extra-arg=-std=c++17 a solution which can be passed as a command line argument while compiling but I don't know where to write it in my case because I am not compiling from command line.

RainMan14
  • 105
  • 1
  • 9

1 Answers1

0

In current version of VS 2019 (16.8.3), you can't pass extra arguments to clang-tidy from the IDE, so you are sucked.

There is already an suggestion to ask MS to implement this feature, just vote it.: developercommunity.visualstudio.com/content/idea/772117/support-extra-args-for-clang-tidy.html

El Mismo Sol
  • 869
  • 1
  • 6
  • 14