From: Mark Stankus <mstankus@calpoly.edu>
To: sourcenav@sourceware.cygnus.com
Subject: Can I use SN to ask questions about C++?
Date: Sun, 24 Sep 2000 12:19:00 -0000 [thread overview]
Message-ID: <39CE53D5.2DE38F8F@calpoly.edu> (raw)
Dear Source Navigator Developer(s),
I love Source Navigator(SN).
I was wondering if there is an API for SN so that I could write small
programs
(or write data base queries) to ask questions about the C++ code which
has been "SN-ed".
The goal is to look for inefficiencies in C++ code and improve
maintainability of C++
via computer programs. The questions below are samples (requiring some
SQL would be
fine or, even better, a C++ interface).
(Note, if any of the following questions can be answered by an existing
tool,
I would like to know.)
Thanks,
Mark Stankus
mstankus@calpoly.edu
1) Determine all class names which have a default constructor generated
by the compiler.
2) Determine all class names which have a default constructor generated
by the compiler
and it is used.
3) Determine all class names which have a copy constructor generated by
the compiler.
4) Determine all class names which have a copy constructor generated by
the compiler
and it is used.
5) Find all class names which use the macro
USE_GENERATED_DEFAULT_CONSTRUCTOR
6) Find all class names which use the macro
USE_GENERATED_DEFAULT_CONSTRUCTOR, and define a default constructor.
( This would be some "AND" in terms of data base queries or a list
intersection
for a C++ interface. )
(BY THE WAY, I would like to start putting EITHER
USE_GENERATED_DEFAULT_CONSTRUCTOR or X()
but not both in every class X which I write so that my intentions
are clear.)
7) Find all instances of 'bool operator==(unsigned int,int)' in the
code.
(For example, int main() {
unsigned int a,b;
int c;
bool d = a==b;
bool e = a==c;
bool f = 0==1L;
bool g = 0U==1;
return 0;
}
would indicate the 'e' and 'g' lines.)
8) Determine all locations where adding the keyword 'explicit' to a
constructor, say 'X(const Y &)', will create a compiler error.
(See http://www.calpoly.edu/~mstankus/mozilla )
9) Find all locations where adding the keyword 'explicit' to the code
wherever appropriate would generate compiler errors.
(See http://www.calpoly.edu/~mstankus/mozilla )
10) Determine when temporaries are created.
next reply other threads:[~2000-09-24 12:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-24 12:19 Mark Stankus [this message]
2000-09-24 12:41 ` Ian Roxborough
2000-09-27 21:38 ` Ben Elliston
2000-09-27 21:38 ` Ben Elliston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39CE53D5.2DE38F8F@calpoly.edu \
--to=mstankus@calpoly.edu \
--cc=sourcenav@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).