[clang] Improve source location in binary type traits diagnostics (#88097)
This patch takes advantage of a recent NFC change that refactored `EvaluateBinaryTypeTrait()` to accept `TypeSourceInfo` instead of `QualType` c7db450e. Before: ``` test2.cpp:105:55: error: variable length arrays are not supported in '__is_layout_compatible' 105 | static_assert(!__is_layout_compatible(int[n], int[n])); | ^ test2.cpp:125:76: error: incomplete type 'CStructIncomplete' where a complete type is required 125 | static_assert(__is_layout_compatible(CStructIncomplete, CStructIncomplete)); | ^ ``` After: ``` test2.cpp:105:41: error: variable length arrays are not supported in '__is_layout_compatible' 105 | static_assert(!__is_layout_compatible(int[n], int[n])); | ^ test2.cpp:125:40: error: incomplete type 'CStructIncomplete' where a complete type is required 125 | static_assert(__is_layout_compatible(CStructIncomplete, CStructIncomplete)); | ^ ```
parent
6c40d463
Please register or sign in to comment