llvm/llvm-project

We should probably warn at how 'static inline' variables are odd at namespace scope.

Open

#48,977 建立於 2021年3月18日

在 GitHub 查看
 (10 留言) (0 反應) (1 負責人)C++ (10,782 fork)batch import
bugzillac++17clang:diagnosticsconfirmedgood first issue

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

Bugzilla Link 49633
Version unspecified
OS All
CC @serberoth,@zygoloid,@TH3CHARLie

Extended Description

" static inline int A; "

seems a little silly, as 'inline' means 'make this definition mergeable', and static means 'this is a unique definition'. It seems that some sort of warning that questions why someone would do this is valuable.

貢獻者指南