This is an archive of the discontinued LLVM Phabricator instance.

llvm-strings tool
AbandonedPublic

Authored by compnerd on Jan 9 2013, 5:40 PM.

Details

Summary

This is a new tool, named llvm-strings.

Designed to replace the GCC tool "strings"

Diff Detail

Event Timeline

gribozavr added a subscriber: Unknown Object (MLST).Jan 9 2013, 5:41 PM

A ton of nitpicks...

llvm-strings/llvm-strings.cpp
1

Extra space after the dash.

10–13

Please add \file and make this comment a Doxygen comment (three slashes).

See include/llvm/Attributes.h for an example.

36–41

We have discussed before that this is locale-dependent. I think this should eventually be configurable with a command-line option: ASCII-only, locale-dependent, UTF-8.

43–48

Make this a proper Doxygen comment (use line comments with three slashes, format to 80 cols)

50

Variable names should start with an uppercase letter (here and below).

52

pf -> PF

99

Variable names should be CamelCase.

174

Comments should be sentences (start with a capital letter, end with full stop).

212–213

Simplify code with early returns. Just return here, and remove the else {} block and de-indent.

Tests?

llvm-strings/llvm-strings.cpp
31

Please sort includes alphabetically.

Also needs tons of comments. The top level functions should have comments and it'd be nice to have some number of blocks in the code with functions as well.

llvm-strings/llvm-strings.cpp
19

No need for spaces here either...

75

The indenting here feels awkward. See what clang-format can do to the file?

237

Lowercase 'o' is a very hard to read/reason about variable name. Ditto with any of the others similarly named.

compnerd commandeered this revision.May 1 2017, 5:35 PM
compnerd edited reviewers, added: mclow.lists; removed: compnerd.
compnerd edited edge metadata.

All of this functionality is in the current tool AFAIK. Furthermore, this has been out of date for so long that it's not particularly useful anymore. Commandeering to close the differential.

compnerd abandoned this revision.May 1 2017, 5:35 PM