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 /clang/lib/Sema/SemaCodeComplete.cpp | |
| parent | 7c0abc34f9efa3caecffa91763aea5eaa8f2a2fd (diff) | |
| download | bcm5719-llvm-2684c68ddc2f19c34ab0ed280c1d3238a1279e73.tar.gz bcm5719-llvm-2684c68ddc2f19c34ab0ed280c1d3238a1279e73.zip | |
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 'clang/lib/Sema/SemaCodeComplete.cpp')
0 files changed, 0 insertions, 0 deletions

