[all-commits] [llvm/llvm-project] b3eb00: [C++20] [Modules] Only diagnose the non-inline ext...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Tue Jan 17 01:48:31 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b3eb004ca78f522c91c0d83bafeab2ee753417c8
https://github.com/llvm/llvm-project/commit/b3eb004ca78f522c91c0d83bafeab2ee753417c8
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2023-01-17 (Tue, 17 Jan 2023)
Changed paths:
M clang/lib/Sema/SemaDecl.cpp
M clang/test/CXX/module/module.import/p6.cpp
Log Message:
-----------
[C++20] [Modules] Only diagnose the non-inline external variable
definitions in header units
Address part of https://github.com/llvm/llvm-project/issues/60079.
Since the the declaration of a non-inline static data member in its
class definition is not a definition. The following form:
```
class A {
public:
static const int value = 43;
};
```
should be fine to appear in a header unit. From the perspective of
implementation, it looks like we simply forgot to check if the variable
is a definition...
Reviewed By: iains
Differential Revision: https://reviews.llvm.org/D141905
More information about the All-commits
mailing list