Page MenuHomePhabricator

[clang-tidy] Fix FP with readability-redundant-string-init for default arguments

Authored by etienneb on Apr 6 2016, 8:38 AM.



Clang-tidy is reporting a warning of redundant string initialisation
on a string parameter initialized with empty string.

See bug: 27087

The reported example is:

#include <string>
void fn(std::string a = "");

Diff Detail

Event Timeline

etienneb updated this revision to Diff 52806.Apr 6 2016, 8:38 AM
etienneb retitled this revision from to [clang-tidy] Fix FP with readability-redundant-string-init for default arguments.
etienneb updated this object.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
alexfh accepted this revision.Apr 7 2016, 6:37 AM
alexfh edited edge metadata.

Awesome! Thanks for the fix!

This revision is now accepted and ready to land.Apr 7 2016, 6:37 AM
etienneb closed this revision.Apr 7 2016, 7:24 AM