This is an archive of the discontinued LLVM Phabricator instance.

[clang][Sema] Fix diagnostic message for unused constant varialbe templates
ClosedPublic

Authored by hazohelet on Jun 13 2023, 3:17 AM.

Details

Summary

BEFORE this patch, unused const-qualified variable templates such as template <typename T> const double var_t = 0; were diagnosed as unused variable 'var_t'
This patch fixes this message to unused variable template 'var_t'

Diff Detail

Event Timeline

hazohelet created this revision.Jun 13 2023, 3:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2023, 3:17 AM
hazohelet requested review of this revision.Jun 13 2023, 3:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2023, 3:17 AM
tbaeder accepted this revision.Jun 13 2023, 5:47 AM

Makes sense. LGTM provided precommit CI comes back green.

This revision is now accepted and ready to land.Jun 13 2023, 5:47 AM
shafik added inline comments.Jun 21 2023, 8:06 PM
clang/lib/Sema/Sema.cpp
1385

Sorry for late review but we should conform to bugprone-argument-comment for these.

hazohelet marked an inline comment as done.Jun 23 2023, 6:28 AM
hazohelet added inline comments.
clang/lib/Sema/Sema.cpp
1385