]> granicus.if.org Git - clang/commit
[Sema] Don't crash when friending an unqualified templated constructor
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 30 Sep 2015 22:07:43 +0000 (22:07 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 30 Sep 2015 22:07:43 +0000 (22:07 +0000)
commit20061ec1625cad5306bf6da999caebb50fba6d8f
tree722de6d1a72815a8156476903d71e30142d85150
parentcb96b824e68422932fcb166239a2e983df2de123
[Sema] Don't crash when friending an unqualified templated constructor

Unqualified templated constructors cannot be friended and our lack of a
diagnostic led to violated invariants.  Instead, raise a diagnostic when
processing the friend declaration.

This fixes PR20251.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248953 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclCXX.cpp
test/CXX/class/class.friend/p1.cpp