public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* add more C++ name hints
@ 2022-08-05 19:35 Ulrich Drepper
  2022-08-17 10:29 ` Ulrich Drepper
  2022-08-17 12:17 ` Marek Polacek
  0 siblings, 2 replies; 3+ messages in thread
From: Ulrich Drepper @ 2022-08-05 19:35 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

How about adding a few more names from the std namespace to get appropriate
hints?  This patch compiles and the appropriate messages are printed.  Is
there a problem with just adding more or even at some point all the symbols
of the standard library?

gcc/ChangeLog:

        * cp/name-lookup.cc (get_std_name_hint): Add more symbols from the
        <iomanip>, <ios>, <istream> and <ostream> headers.

[-- Attachment #2: d-g++-std-io-syms-hints --]
[-- Type: application/octet-stream, Size: 2509 bytes --]

diff --git a/gcc/cp/name-lookup.cc b/gcc/cp/name-lookup.cc
index ce622761a1a..e77065b83b7 100644
--- a/gcc/cp/name-lookup.cc
+++ b/gcc/cp/name-lookup.cc
@@ -6771,6 +6771,43 @@ get_std_name_hint (const char *name)
     {"future", "<future>", cxx11},
     {"packaged_task", "<future>", cxx11},
     {"promise", "<future>", cxx11},
+    /* <iomanip>.  */
+    {"resetiosflags", "<iomanip>", cxx98},
+    {"setiosflags", "<iomanip>", cxx98},
+    {"setbase", "<iomanip>", cxx98},
+    {"setfill", "<iomanip>", cxx98},
+    {"setprecision", "<iomanip>", cxx98},
+    {"setw", "<iomanip>", cxx98},
+    {"get_money", "<iomanip>", cxx11},
+    {"put_money", "<iomanip>", cxx11},
+    {"get_time", "<iomanip>", cxx11},
+    {"put_time", "<iomanip>", cxx11},
+    {"quoted", "<iomanip>", cxx14},
+    /* <ios>.  */
+    {"boolalpha", "<ios>", cxx98},
+    {"noboolalpha", "<ios>", cxx98},
+    {"showbase", "<ios>", cxx98},
+    {"noshowbase", "<ios>", cxx98},
+    {"showpoint", "<ios>", cxx98},
+    {"noshowpoint", "<ios>", cxx98},
+    {"showpos", "<ios>", cxx98},
+    {"noshowpos", "<ios>", cxx98},
+    {"skipws", "<ios>", cxx98},
+    {"noskipws", "<ios>", cxx98},
+    {"uppercase", "<ios>", cxx98},
+    {"nouppercase", "<ios>", cxx98},
+    {"unitbuf", "<ios>", cxx98},
+    {"nounitbuf", "<ios>", cxx98},
+    {"internal", "<ios>", cxx98},
+    {"left", "<ios>", cxx98},
+    {"right", "<ios>", cxx98},
+    {"dec", "<ios>", cxx98},
+    {"hex", "<ios>", cxx98},
+    {"oct", "<ios>", cxx98},
+    {"fixed", "<ios>", cxx98},
+    {"scientific", "<ios>", cxx98},
+    {"hexfloat", "<ios>", cxx11},
+    {"defaultfloat", "<ios>", cxx11},
     /* <iostream>.  */
     {"cin", "<iostream>", cxx98},
     {"cout", "<iostream>", cxx98},
@@ -6781,6 +6818,7 @@ get_std_name_hint (const char *name)
     {"wclog", "<iostream>", cxx98},
     /* <istream>.  */
     {"istream", "<istream>", cxx98},
+    {"ws", "<istream>", cxx98},
     /* <iterator>.  */
     {"advance", "<iterator>", cxx98},
     {"back_inserter", "<iterator>", cxx98},
@@ -6800,6 +6838,12 @@ get_std_name_hint (const char *name)
     {"reverse_iterator", "<iterator>", cxx98},
     /* <ostream>.  */
     {"ostream", "<ostream>", cxx98},
+    {"ends", "<ostream>", cxx98},
+    {"flush", "<ostream>", cxx98},
+    {"endl", "<ostream>", cxx98},
+    {"emit_on_flush", "<ostream>", cxx20},
+    {"noemit_on_flush", "<ostream>", cxx20},
+    {"flush_emit", "<ostream>", cxx20},
     /* <list>.  */
     {"list", "<list>", cxx98},
     /* <map>.  */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-17 12:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 19:35 add more C++ name hints Ulrich Drepper
2022-08-17 10:29 ` Ulrich Drepper
2022-08-17 12:17 ` Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).