]> granicus.if.org Git - clang/commit
Teach the type-id/expression disambiguator about different
authorDouglas Gregor <dgregor@apple.com>
Tue, 10 Feb 2009 00:53:15 +0000 (00:53 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 10 Feb 2009 00:53:15 +0000 (00:53 +0000)
commit8b642592a35167a3780074e78674e0bece87c40c
treee0ae2fbbb5ae014d68d4a54e1270235928db8fd6
parentdd0574e76439f31c02ba54bd7708725176f9531f
Teach the type-id/expression disambiguator about different
disambiguation contexts, so that we properly parse template arguments
such as

  A<int()>

as type-ids rather than as expressions. Since this can be confusing
(especially when the template parameter is a non-type template
parameter), we try to give a friendly error message.

Almost, eliminate a redundant error message (that should have been a
note) and add some ultra-basic checks for non-type template
arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64189 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.def
include/clang/Parse/Parser.h
lib/Parse/ParseTemplate.cpp
lib/Parse/ParseTentative.cpp
lib/Sema/SemaTemplate.cpp
test/SemaTemplate/temp_arg_nontype.cpp [new file with mode: 0644]
test/SemaTemplate/temp_arg_type.cpp