[cfe-dev] Clang-tidy crashes when string reference used as parameter

Stuart Thomson via cfe-dev cfe-dev at lists.llvm.org
Tue Sep 4 06:51:05 PDT 2018


Hi,

The following causes clang-tidy to crash:

test.cpp:
#include <string>

void func(std::string& s){s.c_str();}

command:
clang-tidy test.cpp --

I am on Windows, using clang 8 built from trunk last week. Clang-tidy still crashes when changing c_str() to data(), but does not crash if the parameter used is instead std::string s. Clang-check does not crash at all and is able to produce the AST.

Regards,
Stuart

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


More information about the cfe-dev mailing list