Commit Graph

69 Commits

Author SHA1 Message Date
Serge Guelton f886c03e47 Portable Python script across Python version
StringIO is obsoleted in Python3, replaced by io.BytesIO or io.StringIO depending on the use.

Differential Revision: https://reviews.llvm.org/D55196

llvm-svn: 350318
2019-01-03 14:26:56 +00:00
Serge Guelton c177c3a5a9 Portable Python script across Python version
urllib2 as been renamed into urllib and the library layout has changed.
Workaround that in a consistent manner.

Differential Revision: https://reviews.llvm.org/D55199

llvm-svn: 349627
2018-12-19 13:46:13 +00:00
Serge Guelton 3ee1ffc9fc Portable Python script across Python version
commands.getoutput has been move to subprocess module in Python3

Differential Revision: https://reviews.llvm.org/D55205

llvm-svn: 349503
2018-12-18 16:07:06 +00:00
Serge Guelton d458974c45 Portable Python script across Python version
In Python3, dict.items, dict.keys, dict.values, zip, map and filter no longer return lists, they create generator instead.

The portability patch consists in forcing an extra `list` call if the result is actually used as a list.
`map` are replaced by list comprehension and `filter` by filtered list comprehension.

Differential Revision: https://reviews.llvm.org/D55197

llvm-svn: 349501
2018-12-18 16:04:21 +00:00
Serge Guelton c0ebe773cd Portable Python script across Python version
Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across Python version.

Differential Revision: https://reviews.llvm.org/D55213

llvm-svn: 349454
2018-12-18 08:36:33 +00:00
Serge Guelton 73cf752f1b Portable Python script across Python version
ConfigParser module has been renamed as configparser in Python3

Differential Revision: https://reviews.llvm.org/D55200

llvm-svn: 349449
2018-12-18 08:25:25 +00:00
Serge Guelton 366c089bb3 Portable Python script across Python version
dict no longer have the `has_key` method in Python3. Instead, one can
use the `in` keyword which already works in Python2.

llvm-svn: 349447
2018-12-18 08:22:47 +00:00
Serge Guelton 040ee58795 Portable Python script across Python version
SocketServer has been renamed socketserver in Python3.

Differential Revision: https://reviews.llvm.org/D55258

llvm-svn: 349010
2018-12-13 07:45:55 +00:00
Serge Guelton b3835de3ee Portable Python script across Python version
Use higher-level and more compatible threading module to start a new thread.

Differential Revision: https://reviews.llvm.org/D55259

llvm-svn: 349008
2018-12-13 07:42:30 +00:00
Serge Guelton dc7d7e3fe8 Portable Python script across Python version
Workaround naming and hierarchy changes in BaseHTTPServer and SimpleHTTPServer module.

Differential Revision: https://reviews.llvm.org/D55203

llvm-svn: 348184
2018-12-03 20:26:51 +00:00
Serge Guelton f606a5ae62 Portable Python script across Python version
Python2 supports both backticks and `repr` to access the __repr__ slot. Python3 only supports `repr`.

Differential Revision: https://reviews.llvm.org/D55201

llvm-svn: 348182
2018-12-03 20:12:34 +00:00
Serge Guelton 09616bdb4a Portable Python script across version
Have all classes derive from object: that's implicitly the default in Python3,
it needs to be done explicilty in Python2.

Differential Revision: https://reviews.llvm.org/D55121

llvm-svn: 348127
2018-12-03 12:12:48 +00:00
Serge Guelton 3de410848c Portable Python script across Python version
Python2 supports the two following equivalent construct

	raise ExceptionType, exception_value
and
	raise ExceptionType(exception_value)

Only the later is supported by Python3.

Differential Revision: https://reviews.llvm.org/D55195

llvm-svn: 348126
2018-12-03 12:11:21 +00:00
Alexander Kornienko 2a8c18d991 Fix typos in clang
Found via codespell -q 3 -I ../clang-whitelist.txt
Where whitelist consists of:

  archtype
  cas
  classs
  checkk
  compres
  definit
  frome
  iff
  inteval
  ith
  lod
  methode
  nd
  optin
  ot
  pres
  statics
  te
  thru

Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few
files that have dubious fixes reverted.)

Differential revision: https://reviews.llvm.org/D44188

llvm-svn: 329399
2018-04-06 15:14:32 +00:00
Vassil Vassilev 3dd966b0ce Add coding and shebang.
Reviewed by Artem Dergachev (D26030)!

llvm-svn: 296781
2017-03-02 18:47:22 +00:00
Chris Bieneman 2bf68c6c1c Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html

    "This is the way [autoconf] ends
    Not with a bang but a whimper."
    -T.S. Eliot

Reviewers: chandlerc, grosbach, bob.wilson, echristo

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D16472

llvm-svn: 258862
2016-01-26 21:30:40 +00:00
Alexander Kornienko fbd33be333 [scan-view] replace deprecated optparse with argparse
Summary: scan-view migrated from optparse deprecated Python module to its replacement (argparse) and resolved few conflicts with pep8

Reviewers: ddunbar, aaron.ballman, dcoughlin, jroelofs, zaks.anna

Subscribers: cfe-commits

Patch by Kirill Bobyrev!

Differential Revision: http://reviews.llvm.org/D15370

llvm-svn: 256150
2015-12-21 12:19:13 +00:00
Jonathan Roelofs 814aa25a92 [scan-build] Make scan-build work whether it's installed or not
llvm-svn: 253074
2015-11-13 20:34:15 +00:00
Jonathan Roelofs 80df3d262d [scan-build] Move non user-facing utilities to share
llvm-svn: 253068
2015-11-13 19:56:07 +00:00
Jonathan Roelofs 7c297074d4 Fix build
llvm-svn: 252991
2015-11-13 01:23:40 +00:00
Jonathan Roelofs 5e20518443 [scan-view] Rename 'Resources' --> 'share'
llvm-svn: 252977
2015-11-13 00:25:04 +00:00
Aaron Ballman 8f3f6347aa Hiding the scan-build and scan-view projects under the Misc folder in IDEs instead of having them at the root view.
llvm-svn: 252771
2015-11-11 18:13:42 +00:00
Jonathan Roelofs a3219a70be Fix build
llvm-svn: 252667
2015-11-10 22:59:18 +00:00
Jonathan Roelofs 1ff9c63204 Implement post-commit review feedback on r252662
llvm-svn: 252664
2015-11-10 22:48:11 +00:00
Jonathan Roelofs 467ab05291 Implement the fix that r252641 should have been
llvm-svn: 252662
2015-11-10 22:38:59 +00:00
Jonathan Roelofs 2a439a104b Fix missing CMake dependency introduced in r252474
llvm-svn: 252641
2015-11-10 20:01:22 +00:00
Jonathan Roelofs 9c0d3f5e6f Fix the cmake build after r252474 broke it
llvm-svn: 252489
2015-11-09 16:47:09 +00:00
Jonathan Roelofs e961432ae7 Create install targets for scan-build and scan-view
http://reviews.llvm.org/D14403

llvm-svn: 252474
2015-11-09 16:12:56 +00:00
Jordan Rose 63524b9453 [analyzer] scan-view: don't ever serve absolute paths.
At one point in time scan-view allowed absolute paths to reference files
within the server root, but this doesn't seem to be used anymore, and
caused problems if a server-root-relative path actually matched an
absolute path to an existing file. This patch just treats paths as
server-root-relative all the time.

PR15843

llvm-svn: 180715
2013-04-29 17:23:06 +00:00
Ted Kremenek 639a17a229 Further harden checking that scan-view isn't serving up pages outside
the server root.

llvm-svn: 165839
2012-10-12 22:56:38 +00:00
Ted Kremenek 3073c58cab Have scan-view guard against serving up pages outside the root directory.
llvm-svn: 165815
2012-10-12 19:16:31 +00:00
Ted Kremenek bda17491c4 Fix call to send_error() in scan-view. An int error code is expected but a string was being sent. Patch by Andrew Price!
llvm-svn: 126138
2011-02-21 19:26:48 +00:00
Ted Kremenek a4a81c0ac7 Increase scan-view max timeout to 1 minute.
llvm-svn: 70896
2009-05-04 19:02:41 +00:00
Ted Kremenek 1e0d95e17e "missing ivar release" is a performance bug.
llvm-svn: 58436
2008-10-30 17:29:54 +00:00
Ted Kremenek 4bc52fdd75 Generalize searching for the keyword "leak" in a bug type.
llvm-svn: 58115
2008-10-24 21:23:51 +00:00
Ted Kremenek 049ba7fbb1 For Radar reporting, null dereferences should be default classified as "Crash/Hang/Data loss" <rdar://problem/6315624>
llvm-svn: 58045
2008-10-23 21:36:52 +00:00
Ted Kremenek 7a93cd8ac6 Set reproducibility back to "Always"
llvm-svn: 56891
2008-09-30 23:23:58 +00:00
Daniel Dunbar 9e3b917965 scan-view: Remove some debugging prints.
llvm-svn: 56864
2008-09-30 17:54:44 +00:00
Ted Kremenek 05f3ccda24 Default reproducibility to "Not applicable"
llvm-svn: 56860
2008-09-30 17:28:54 +00:00
Ted Kremenek 9f403161d7 Make "Performance" the default Radar classification for leaks. "Other" for all others (for now).
llvm-svn: 56858
2008-09-30 17:12:32 +00:00
Ted Kremenek fb0fef9157 Make a separate parameter class for "Radar classifications".
Do not save the radar classification to the config file.

llvm-svn: 56856
2008-09-30 17:00:30 +00:00
Ted Kremenek b166299f2b Add "SelectionParameter" class to represent drop-down boxes.
Added "Classification" field to Radar filing.
Modified FileRadar.scpt to take the classification as an argument.

llvm-svn: 56854
2008-09-30 16:37:50 +00:00
Ted Kremenek fef3c4092d Conditionally load/save default parameter value from config file.
llvm-svn: 56852
2008-09-30 16:11:33 +00:00
Ted Kremenek 094ff0b061 Use objects to represent form parameters. This allows us to abstract away some
of the details of HTML rendering of form parameters, and also us with the
ability to delegate other actions (such as in the filling in of default values)
to specific parameter objects.

llvm-svn: 56851
2008-09-30 16:08:13 +00:00
Ted Kremenek a930b56252 Tabs -> Spaces.
llvm-svn: 56833
2008-09-30 05:45:59 +00:00
Daniel Dunbar 068f7f7092 Fix braindead bug, ID number was hardcoded.
llvm-svn: 56789
2008-09-29 16:06:43 +00:00
Daniel Dunbar 08971bf2c4 Change Radar reproducibility to "Always".
llvm-svn: 56644
2008-09-26 05:00:28 +00:00
Daniel Dunbar 8e519d0d48 Disable report crashes link for the time being.
llvm-svn: 56617
2008-09-25 19:59:17 +00:00
Daniel Dunbar 0dbad4670c Add link to report analyzer failures (parse errors, asserts, etc).
llvm-svn: 56606
2008-09-25 06:05:31 +00:00
Daniel Dunbar d8d1fec6bd Add scan-view '--allow-all-hosts' option, by default access is now
restricted to 127.0.0.1.

llvm-svn: 56563
2008-09-24 17:59:41 +00:00