]> granicus.if.org Git - clang/commit
Improve the semantic checking for explicit instantiations of
authorDouglas Gregor <dgregor@apple.com>
Wed, 13 May 2009 18:28:20 +0000 (18:28 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 13 May 2009 18:28:20 +0000 (18:28 +0000)
commitff66803b43f2ea9206637dceb793e9505f3b9c48
tree401d9f5eee2178816667fd2139457347bee01a9a
parent70b6a83b833c40f320d0ed2310cbcdf2be4cece0
Improve the semantic checking for explicit instantiations of
templates. In particular:
  - An explicit instantiation can follow an implicit instantiation (we
  were improperly diagnosing this as an error, previously).
  - In C++0x, an explicit instantiation that follows an explicit
  specialization of the same template specialization is ignored. In
  C++98, we just emit an extension warning.
  - In C++0x, an explicit instantiation must be in a namespace
  enclosing the original template. C++98 has no such requirement.

Also, fixed a longstanding FIXME regarding the integral type that is
used for the size of a constant array type when it is being instantiated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71689 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/Sema.h
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/SemaTemplate/temp_explicit.cpp
test/SemaTemplate/temp_explicit_cxx0x.cpp [new file with mode: 0644]