reimplemented in Sema someday. This is tracked in PR2236. Until then
disabling it removes some bogus diagnostics (see 2236).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50263
91177308-0d34-0410-b5e6-
96231b3b80d8
DIAG(ext_return_has_expr, EXTENSION,
"void function '%0' should not return a value")
-//===----------------------------------------------------------------------===//
-// Codegen
-//===----------------------------------------------------------------------===//
-
-DIAG(warn_unused_static, WARNING, "static '%0' defined but not used")
-
#undef DIAG
Changed = true;
}
} while (Changed);
-
- // Warn about all statics that are still unused at end of code generation.
- for (unsigned i = 0, e = StaticDecls.size(); i != e; ++i) {
- const NamedDecl *D = StaticDecls[i];
- std::string Msg = D->getName();
- getDiags().Report(Context.getFullLoc(D->getLocation()),
- diag::warn_unused_static, &Msg, 1);
- }
}
llvm::Constant *CodeGenModule::EmitGlobalInit(const Expr *Expr) {
+++ /dev/null
-// RUN: clang %s -emit-llvm -verify
-// PR1998
-// PR2236
-static void a (void);
-void b (void) { a (); }
-static void a(void) {}
-static void c(void) {} // expected-warning {{static 'c' defined but not used}}