3

I am using Clion and my project is set to C++98, but clang-tidy has suggestions to use nullptr instead of NULL.

Is there a clang-tidy setting somewhere in the IDE or is it something else?

Mode77
  • 991
  • 8
  • 28
  • 5
    You have to disable the `modernize-*` checks. The purpose of all of these is to tell you how to upgrade to C++11 (and newer). – Henri Menke Sep 30 '18 at 00:59

1 Answers1

4

I don't know CLion specifically but that message is related to the modernize-use-nullptr check which is intended for upgrading old code to use C++11 features. (in this case avoiding inadvertently using the NULL macro in assignment to non-pointer variables since it expands to 0)

Disable that check if you want to keep your code in C++98.

pablo285
  • 2,460
  • 4
  • 14
  • 38