llvm/llvm-project

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

Open

#48,977 opened on 2021年3月18日

GitHub で見る
 (10 comments) (0 reactions) (1 assignee)C++ (10,782 forks)batch import
bugzillac++17clang:diagnosticsconfirmedgood first issue

Repository metrics

Stars
 (26,378 stars)
PR merge metrics
 (平均マージ 1d 2h) (30d で 1,000 merged PRs)

説明

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.

コントリビューターガイド