I\'ve installed clang 3.7 and I\'m using it with visual studio. When I try to compile:
auto f()
{
return 2;
}
I\'m getting error saying tha
clang-cl doesn't use the same option syntax as traditional clang - it's supposed to mimic Visual Studio's cl command line, not clang's command line.
For instance, from clang-cl's documentation:
CL.EXE COMPATIBILITY OPTIONS:
/? Display available options
/arch: Set architecture for code generation
/C Don't discard comments when preprocessing
/c Compile only
/D Define macro
...
Notice that those options are similar to Microsoft's cl option syntax, not clang's option syntax.
However, they have a little pass-through option to support cases like yours:
OPTIONS:
...
-Xclang Pass to the clang compiler
-mllvm Additional arguments to forward to LLVM's option processing
And so it would seem that invoking clang-cl -Xclang -std=c++14 would be your best bet.