[clang-tidy] quickfix: add -fno-delayed-template-parsing as default argument…

Authored by JonasToth on Jan 3 2020, 1:02 PM.


[clang-tidy] quickfix: add -fno-delayed-template-parsing as default argument for runCheckOnCode unit-tests to unbreak windows


JonasTothJan 3 2020, 1:02 PM
rG05ebaa62e0db: [clang-tidy] fix broken linking for AddConstTest with adding clangSema as…

Event Timeline

@aaron.ballman @alexfh i find this change useful, as there would always be an issue with templates in the unit-test code and msvc environments. Without this default argument each runCheckOnCode<>(Code, ....) would require 4 arguments as the additional options is the 4th default-argument.
If this is not ok, it can be reverted. That will break the unit-test for the const-utility.

On the one hand, this makes some degree of sense as the default template parsing behavior on Windows catches people out quite often. On the other hand, this makes it harder to find template-parsing-behavior-related bugs and there are zero clang-tidy unit tests that currently need to pass this flag except for some of the tests you just added.

My preference is to have each test decide on whether they want to opt in to this behavior or not, but it's not a super strong preference.