Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend readability-redundant-string-init to check for assignment of temporary strings #27130

Open
EugeneZelenko opened this issue Feb 27, 2016 · 1 comment
Labels
bugzilla Issues migrated from bugzilla clang-tidy enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@EugeneZelenko
Copy link
Contributor

Bugzilla Link 26756
Version unspecified
OS All

Extended Description

It'll be great to extend readability-redundant-string-init to report next situations:

std::string S1 = std::string( "Value" );
std::string S2 = std::string( "" );

const char* CString;

std::string S3 = std::string( CString );

I found such example in my code base which may be not unique :-)

@EugeneZelenko
Copy link
Contributor Author

Check also misses empty strings in call to constructors of class members. My code base is C++03, so probably same problem will exist for C++11 member initialization.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@EugeneZelenko EugeneZelenko added the enhancement Improving things as opposed to bug fixing, e.g. new or missing feature label Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang-tidy enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

No branches or pull requests

1 participant