[clang] [clang][Sema] Suggest/Hint Standard Library Include File (PR #146227)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 1 06:22:00 PDT 2025


================
@@ -3613,6 +3613,16 @@ class Sema final : public SemaBase {
                                ParsedType &SuggestedType,
                                bool IsTemplateName = false);
 
+  // Try to suggest the missing standard library include files
+  //
+  // \param SymbolName the symbol name like 'cout'
+  // \param SourceLocation the location of the note being emitted
+  // \param Namespace the namespace that must end with ::, so like 'std::'
+  void NoteStandardIncludes(StringRef SymbolName, SourceLocation IILoc,
----------------
erichkeane wrote:

I'm not really a fan of this interface.  Unless it is particularly easy, we shouldn't be forcing the inclusion of the '::' in this interface.

https://github.com/llvm/llvm-project/pull/146227


More information about the cfe-commits mailing list