Add a new warning -Wmissing-variable-declarations, to warn about variables
defined without a previous declaration. This is similar to -Wmissing-prototypes, but for variables instead of functions. Patch by Ed Schouten. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166498 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/DiagnosticSemaKinds.td 3 additions, 0 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- lib/Sema/Sema.cpp 2 additions, 0 deletionslib/Sema/Sema.cpp
- lib/Sema/SemaDecl.cpp 11 additions, 0 deletionslib/Sema/SemaDecl.cpp
- test/Sema/warn-missing-variable-declarations.c 36 additions, 0 deletionstest/Sema/warn-missing-variable-declarations.c
- test/Sema/warn-missing-variable-declarations.cpp 39 additions, 0 deletionstest/Sema/warn-missing-variable-declarations.cpp
Loading
Please register or sign in to comment