[clangd] Include the correct header for typeid()

Fixes https://github.com/clangd/clangd/issues/1449

Differential Revision: https://reviews.llvm.org/D141218
This commit is contained in:
Nathan Ridge 2023-01-08 03:18:13 -05:00
parent 96f1cd2427
commit 056d4dca77

View File

@ -225,7 +225,7 @@ std::vector<Fix> IncludeFixer::fix(DiagnosticsEngine::Level DiagLevel,
case diag::err_implied_std_initializer_list_not_found: case diag::err_implied_std_initializer_list_not_found:
return only(insertHeader("<initializer_list>")); return only(insertHeader("<initializer_list>"));
case diag::err_need_header_before_typeid: case diag::err_need_header_before_typeid:
return only(insertHeader("<typeid>")); return only(insertHeader("<typeinfo>"));
case diag::err_need_header_before_placement_new: case diag::err_need_header_before_placement_new:
case diag::err_implicit_coroutine_std_nothrow_type_not_found: case diag::err_implicit_coroutine_std_nothrow_type_not_found:
return only(insertHeader("<new>")); return only(insertHeader("<new>"));