<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJytVduO2zYQ_Rr6hbBA3SzpQQ9eOUYCJGiBpM1jQIljiVmKVEgqXv99h5LXm91uCrSpQFjmDHnmzFWtEZf6LShlSNIQdiBs_26ks5O6p-_f__mBKtlSCwq4AxqnEYsY5VpQOdKJ2-VYR5I7XPQkFbjrVbJj7SyV2H_8dLJmbIyAz9IPe9u7oBvBD0ZEq73PA-iA5-0lXPVmQQZqNNAOrOdSL9j0jAiocw4E5bafR9A-oG2dFyQ9XHnEBYqo9NQP1pwddZ5399R8B3tS5kzhoYPJS6NX4ySJSX4nR94DyQ8kKQfvJ0dSVBxxzQ7sdtG6qEfzcxskndEebUedGfFMvqvyMi9y_BvnLKtYkRfbOIm7vDhlW5aU6TYTIt1yljPcFl3WxhBDyaNJ9ySprkSexWKN4j84mQUZNfYVVRw0fgA6WdMqGGlvMC_8zC9r5jw9G3vvMKYaIrra3Stn6DkYf0cFeocEADGke-LwiCYCmjYeIykdRtmY6EcPPqHhJVuvZDTEDbPpMLXqQqXu1CwgqDniDWDXi4GkMyNQAYGiewHPvUMgvHdC7-EButm_qLjjKxVH15ILiV3Rduy6lu0SwT2uWctvM3yZvCVp0ymOGVrkCPuHlp6kbyh3nhR36z36-PxwFCOi5OPmZ5yw0oKzzVpJ2Hsh0C68gzi8SZKsoEtWcXdrUPqvn5t7I7-HL27gFlDQ_N68bdaUgP1tAstDX2Dxv0F2oTD_u8FnMejBN8GTj97K6QATaAG6uxzR0b34OjsP9v81eHyK7Ac-TSh3v2xASN5r47zsENlhS9hb664HSHEg6d2r1bX-YnvZtTeu3Kh016Hp4eFWA0HKHfah41KE0sXU_23CYTUERXNtNYcNhrMROynso42oU1GlFd_wGave1l7i0Py2ma2qn8-3daZdB5lS3x9fW-z2r9AhqSNencGFOZfisxnqsmVlJrpKcJHku6QsS5x5VZolIs6qjMNG8RaUq3GuIk8NZ7pABM75YfPrDGSdsCRhOGFZGRd5GeVVkiUniLtdumOiaEnGYORSRQEnMrbf2HqBbGcshIwpnFvuSYkfFNlrgIUwMvTSK6iXj99PJ8rLhNzGJLI8Kd4_fWY2C_t6of4Xxig4Sg>53333</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLVM buildASTFromCodeWithArgs -std=c++17 argument/flag exception
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tisseq
</td>
</tr>
</table>
<pre>
Hello,
Im using LLVM lib release 13.0.0 and im parsing c++ files using `buildASTfromCodeWithArgs `method.
When im trying to parse one certain file with passed argument `-std=c++17` it throws stack overflow exception
![image](https://user-images.githubusercontent.com/56958575/150490757-121c57f4-0283-4dd3-a050-027c4b1e1e8a.png)
When im using argument `-std=c++14 ` or `-std=c++11` the problem goes away and it works fine.
Also when I dont use this argument problem does not exist too.
The file im trying to parse contains only include to another file and some defines.
Thats code for executing `buildASTFromCodeWithArgs ` method:
```
std::unique_ptr<clang::ASTUnit> ast{
clang::tooling::buildASTFromCodeWithArgs(fileContent, args, file, "clang++",
std::make_shared<PCHContainerOperations>(),
tooling::getClangStripDependencyFileAdjuster(),
tooling::FileContentMappings(),
diagnosticConsumer)
};
```
where fileContent is files text, args is as I said `"-std=c++17"`, file is path to file.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytVVuP0zoQ_jXui9XIuTXtQx66KSuQQCDBgUfk2NPErGMH26Hbf3_GSbfLLgvSuURWU8_Y39y_tFae69egtSVZQ9iBsP2bgU5emY6-ffv5HdWqpQ40cA80zROWMMqNpGqgI3fzMUGyG1z0qDT4y1WyYe2ktNx__HR0dmishC8q9HvX-agbIPRWJou9Lz2YiBfcOV4NdkYGag1QAS5wZWZsekIE1HkPknLXTQOYENHWPkiSHy5-pBWKqAo09M6ePPWBiztqf4A7anuicC9gDMqaxTjJUlLeqIF3QMoDybZ9C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