[cfe-dev] clang-tidy thinks it is parsing C

Jonas Toth via cfe-dev cfe-dev at lists.llvm.org
Tue Oct 17 03:55:06 PDT 2017

clang-tidy infers the language from the file extension or the 
compile_commands.json if present (this is not the case when using '--' 
like you do).

Please use '.cpp' as the file extension and try to set the '-std=c++11' 
for now. Maybe your clang-tidy version is too old for 'c++1z'.

Am 17.10.2017 um 11:08 schrieb Tiago Macarios via cfe-dev:
> I am trying to run clang-tidy directly from the command line:
> clang-tidy <file> -- <compilation flags>
> and it seems like clang-tidy thinks it is parsing C:
> ...
> error: 'uuid' attribute is not supported in C
> ...
> error: invalid argument '-std=c++1z' not allowed with 'C'
> ...
> How can I tell clang-tidy that the code is C++?
> Tiago
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171017/ef39aba0/attachment.html>

More information about the cfe-dev mailing list