This is an archive of the discontinued LLVM Phabricator instance.

Provide user name in ClangTidyOptions.
ClosedPublic

Authored by alexfh on Sep 22 2014, 9:29 AM.

Details

Summary

This adds the ClangTidyOptions::User field and fills it from the USER
or the USERNAME environment variable, if possible. The FileOptionsProvider now
takes "default" options instead of "fallback" options, as it now uses these when
an option is not set in the configuration file (one exception is the checks
list).

Diff Detail

Event Timeline

alexfh updated this revision to Diff 13939.Sep 22 2014, 9:29 AM
alexfh retitled this revision from to Provide user name in ClangTidyOptions..
alexfh updated this object.
alexfh edited the test plan for this revision. (Show Details)
alexfh added reviewers: klimek, bkramer.
alexfh added a subscriber: Unknown Object (MLST).
klimek added inline comments.Sep 23 2014, 3:11 AM
clang-tidy/ClangTidyOptions.h
58

I'd probably default to empty, so checks can decide not to insert something in case there's no user name available.

alexfh updated this revision to Diff 14006.Sep 23 2014, 12:07 PM

Use llvm::None to signal that there's no value for the User setting.

clang-tidy/ClangTidyOptions.h
58

llvm::None would work better for signalling that there's no value available.

klimek accepted this revision.Sep 24 2014, 11:42 AM
klimek edited edge metadata.

lg

This revision is now accepted and ready to land.Sep 24 2014, 11:42 AM
alexfh closed this revision.Sep 24 2014, 11:45 AM