[PATCH] D12326: [Modules] Emit warning if module cannot instantiate static class member.

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 25 11:26:10 PDT 2015


sepavloff created this revision.
sepavloff added a subscriber: cfe-commits.

Instantiation of static class members can be not obvious in some cases. Using
modules can cause problems even more difficult to diagnose. PR24425 describes
one of such cases. As a way to assist a user, compiler could issue warnings if
code that is potentially erroneous. This patch implements a warning if a static
class member is used in a module, but cannot be instantiated there.

http://reviews.llvm.org/D12326

Files:
  include/clang/Basic/DiagnosticGroups.td
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaDecl.cpp
  test/Modules/Inputs/module-inst.cpp
  test/Modules/Inputs/module-inst/a.h
  test/Modules/Inputs/module-inst/module.modulemap

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12326.33094.patch
Type: text/x-patch
Size: 4809 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150825/37b89a73/attachment-0001.bin>


More information about the cfe-commits mailing list