I installed clang-tidy on Ubuntu using:
sudo apt install clang-tidy
I ran it on a simple C++ 17 file, and got a warning and errors:
/home/erelsgl/Dropbox/ariel/CPLUSPLUS/intro/01-single-file/ptr.cpp:17:3: warning: 'auto' type specifier is a C++11 extension [clang-diagnostic-c++11-extensions]
auto i = make_unique<int>();
^
/home/erelsgl/Dropbox/ariel/CPLUSPLUS/intro/01-single-file/ptr.cpp:17:12: error: use of undeclared identifier 'make_unique' [clang-diagnostic-error]
auto i = make_unique<int>();
How can I tell clang-tidy to check this file according to c++17 standards?
NOTE: To build the program, I run:
clang++-5.0 --std=c++17 ptr.cpp