As we know, MSVC is pretty relaxed when it comes to 'typename'. Clang so far does a pretty darn good job of permitting the behavior, however there was 1 missed case that compiles in MSVC (as of 2015), but not in clang. I've updated the test for similar ones that also/still pass, but were not tested.
template<typename T> struct S { typedef int TD; }; template<class TMP> void foo() { S<TMP>::TD varname =0; } void foo2(){ foo<int>(); }
The above was previously an error in clang in -fms-compatibility mode. This patch alters the parser in MSVC mode to correctly assume the 'typename' above where necessary.
Clang-tidy created this layout here that I'm not thrilled with, if OK, I'd like to move the entirety of the 2nd component to the "&&" on its own line. Additionally, if anyone has a better way to do this logic, I'm all ears!