diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-06-15 18:19:48 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-06-15 18:19:48 +0000 |
commit | 2684c68ddc2f19c34ab0ed280c1d3238a1279e73 (patch) | |
tree | 97659e79c2053deee9f94ecf475759809bc04c00 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 7c0abc34f9efa3caecffa91763aea5eaa8f2a2fd (diff) | |
download | llvm-2684c68ddc2f19c34ab0ed280c1d3238a1279e73.zip llvm-2684c68ddc2f19c34ab0ed280c1d3238a1279e73.tar.gz llvm-2684c68ddc2f19c34ab0ed280c1d3238a1279e73.tar.bz2 |
Warn when a static variable is referenced in a non-static inline function.
This is explicitly forbidden in C99 6.7.4p3. This is /not/ forbidden in C++,
probably because by default file-scope const/constexpr variables have internal
linkage, while functions have external linkage. There's also the issue of
anonymous namespaces to consider. Nevertheless, there should probably be a
similar warning, since the semantics of inlining a function that references
a variable with internal linkage do not seem well-defined.
<rdar://problem/11577619>
llvm-svn: 158531
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions