Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #68182
| From | legalize+jeeves@mail.xmission.com (Richard) |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: What is easiest to use static C++ code analyser? |
| Date | 2019-09-03 20:17 +0000 |
| Organization | multi-cellular, biological |
| Message-ID | <qkmhoe$sp4$4@news.xmission.com> (permalink) |
| References | <hfz7F.36165$Xs5.15669@fx06.am4> <slrnqmdl3j.cdo.grahn+nntp@frailea.sa.invalid> <qk6mgi$u9p$1@news.xmission.com> <qk6nnl$nh0$1@dont-email.me> |
[Please do not mail me a copy of your followup]
David Brown <david.brown@hesbynett.no> spake the secret code
<qk6nnl$nh0$1@dont-email.me> thusly:
>On 28/08/2019 22:00, Richard wrote:
>> I agree, but suggesting that one use lex/yacc for parsing C++ is an
>> approach that many people have tried and failed. It's a really awful
>> idea. That suggestion should not be left out in the open
>> unchallenged.
>>
>> This is particularly true when you can just use the clang libraries to
>> get a perfectly conforming C++20 parser that will just hand you an
>> AST.
>>
>Another option that would be interesting for static analysis is a gcc
>plugin, possibly written in a different language (Python is a reasonable
>choice for such tasks).
Bwuahahahahaha! That is hilarious. Seriously. I know they've
improved gcc at this point, but Stallman et al. have literally said
that they made the internal interface as painful as possible to put
into a library on purpose because they didn't want anyone doing that.
Clang was designed from the ground up to be used as a library.
>I can't tell you whether clang or gcc would be the best starting point
>for making your own static analysis tools, but I look at both of them
>/long/ before looking at lex/yacc.
Don't bother looking at lex/yacc because the context-sensitive nature
of many C++ constructs makes it impossible to use lex/yacc.
Don't waste your time with GCC because it isn't designed to be used
this way.
Go straight to clang because that's what it's been designed for.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What is easiest to use static C++ code analyser? Szyk Cech <szykcech@spoko.pl> - 2019-08-22 18:18 +0200
Re: What is easiest to use static C++ code analyser? David Brown <david.brown@hesbynett.no> - 2019-08-22 20:04 +0200
Re: What is easiest to use static C++ code analyser? Ian Collins <ian-news@hotmail.com> - 2019-08-23 08:42 +1200
Re: What is easiest to use static C++ code analyser? legalize+jeeves@mail.xmission.com (Richard) - 2019-08-22 23:38 +0000
Re: What is easiest to use static C++ code analyser? legalize+jeeves@mail.xmission.com (Richard) - 2019-08-22 23:38 +0000
Re: What is easiest to use static C++ code analyser? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-25 06:09 +0000
Re: What is easiest to use static C++ code analyser? Jens Kallup <jkallup@web.de> - 2019-08-28 15:57 +0200
Re: What is easiest to use static C++ code analyser? legalize+jeeves@mail.xmission.com (Richard) - 2019-08-28 18:18 +0000
Re: What is easiest to use static C++ code analyser? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-28 19:22 +0000
Re: What is easiest to use static C++ code analyser? legalize+jeeves@mail.xmission.com (Richard) - 2019-08-28 20:00 +0000
Re: What is easiest to use static C++ code analyser? David Brown <david.brown@hesbynett.no> - 2019-08-28 22:21 +0200
Re: What is easiest to use static C++ code analyser? legalize+jeeves@mail.xmission.com (Richard) - 2019-09-03 20:17 +0000
Re: What is easiest to use static C++ code analyser? David Brown <david.brown@hesbynett.no> - 2019-09-04 09:03 +0200
Re: What is easiest to use static C++ code analyser? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-29 09:58 +0000
Re: What is easiest to use static C++ code analyser? Bonita Montero <Bonita.Montero@gmail.com> - 2019-09-04 10:44 +0200
csiph-web