mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 20:36:05 +00:00

With r190382, -Wunused-variable warns about unused const variables when appropriate. For codebases that use -Werror, this poses a problem as existing unused const variables need to be cleaned up first. To make the transistion easier, this patch splits -Wunused-variable by pulling out an additional -Wunused-const-variable (by default activated along with -Wunused-variable). llvm-svn: 190508
7 lines
181 B
C++
7 lines
181 B
C++
// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wno-unused-const-variable -verify %s
|
|
|
|
namespace {
|
|
int i = 0; // expected-warning {{unused variable 'i'}}
|
|
const int j = 0;;
|
|
}
|