This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] ignore predefined expressions in cppcoreguidelines-pro-bounds-array-to-pointer-decay check
AbandonedPublic

Authored by lewmpk on Feb 28 2019, 2:11 AM.

Details

Reviewers
lebedev.ri
Group Reviewers
Restricted Project
Summary

Bugzilla: 40852

 c++
int main()
{
  const char* a = __FILE__; 
  const char* b = __FUNCTION__; 
}

variable b is now not marked as an error by cppcoreguidelines-pro-bounds-array-to-pointer-decay check

Diff Detail

Event Timeline

lewmpk created this revision.Feb 28 2019, 2:11 AM
lebedev.ri requested changes to this revision.Feb 28 2019, 2:19 AM
lebedev.ri added a subscriber: lebedev.ri.

See D22196.

This revision now requires changes to proceed.Feb 28 2019, 2:19 AM
lewmpk added a comment.EditedFeb 28 2019, 2:46 AM

Okk, it seems that the consensus is that __FUNCTION__ should not be cast to char*. ( I'll research a bit before I pick up a task in the future :) )
I'm happy to abandon this diff - any objections?

You can abondon this. A short justification (with reference to the other revision) on the bug report would be great!

lewmpk abandoned this revision.Feb 28 2019, 7:35 AM