This is an archive of the discontinued LLVM Phabricator instance.

[include-fixer] Correct an incorrecst judgement about prefix scoped qualifiers.
ClosedPublic

Authored by hokein on Jul 14 2016, 2:24 AM.

Details

Summary

The judgement that checks whether the fully-qualified name has scoped qualifiers
prefix is incorrect. Should always check whether the first matched postion is the
beginning position.

Diff Detail

Event Timeline

hokein updated this revision to Diff 63940.Jul 14 2016, 2:24 AM
hokein retitled this revision from to [include-fixer] Correct an incorrecst judgement about prefix scoped qualifiers..
hokein updated this object.
hokein added a reviewer: bkramer.
hokein added a subscriber: cfe-commits.
bkramer added inline comments.Jul 14 2016, 2:31 AM
include-fixer/IncludeFixerContext.cpp
46

StringRef(FullyQualifiedName).startswith

hokein updated this revision to Diff 63941.Jul 14 2016, 2:36 AM
hokein marked an inline comment as done.

Use StringRef::startwith.

include-fixer/IncludeFixerContext.cpp
46

+1, more clear than std::string methods.

bkramer accepted this revision.Jul 14 2016, 2:37 AM
bkramer edited edge metadata.
This revision is now accepted and ready to land.Jul 14 2016, 2:37 AM
This revision was automatically updated to reflect the committed changes.