]> granicus.if.org Git - clang/commit
Add partial semantic checking of template arguments that are meant for
authorDouglas Gregor <dgregor@apple.com>
Wed, 11 Feb 2009 00:19:33 +0000 (00:19 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 11 Feb 2009 00:19:33 +0000 (00:19 +0000)
commita35284bba5db7a6179d70fcce8fbe66481058698
tree3f8df2c0af71fc5ce16b1f5465c2ee573fbd953e
parent297308eda369de400e6ea7057dffeadd9f92e385
Add partial semantic checking of template arguments that are meant for
non-type template parameters of pointer-to-object and
pointer-to-function type. The most fun part of this is the use of
overload resolution to pick a function from the set of overloaded
functions that comes in as a template argument.

Also, fixed two minor bugs in this area:
  - We were allowing non-type template parameters of type pointer to
  void.
  - We weren't patching up an expression that refers to an overloaded
  function set via "&f" properly.

We're still not performing complete checking of the expression to be
sure that it is referring to an object or function with external
linkage (C++ [temp.arg.nontype]p1).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64266 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaOverload.cpp
lib/Sema/SemaTemplate.cpp
test/SemaTemplate/temp_arg_nontype.cpp
test/SemaTemplate/temp_param.cpp