mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-29 00:08:59 -04:00

This patch does a few different things. This patch improves unused var diags for const vars: we no longer unconditionally suppress diagnostics for const vars, instead only suppressing the diagnostic when the declaration appears to be useful. This patch also makes us more consistently use whether a variable/function is declared in the main file to suppress diagnostics where appropriate. Fixes <rdar://problem/14907887>. llvm-svn: 190382
14 lines
242 B
C++
14 lines
242 B
C++
// Verify that we don't warn about variables of internal-linkage type in
|
|
// headers, as the use may be in another TU.
|
|
namespace PR15558 {
|
|
namespace {
|
|
class A {};
|
|
}
|
|
|
|
class B {
|
|
static A a;
|
|
static A b;
|
|
static const int x = sizeof(b);
|
|
};
|
|
}
|