]> granicus.if.org Git - clang/commit
[Sema][Crash] Correctly handle an non-dependent noexcept expr in function template
authorErich Keane <erich.keane@intel.com>
Thu, 12 Oct 2017 23:01:53 +0000 (23:01 +0000)
committerErich Keane <erich.keane@intel.com>
Thu, 12 Oct 2017 23:01:53 +0000 (23:01 +0000)
commitc5c0712284d66ff134dcd7659e38efc3404ada6d
tree53ec11c9fe8a3a842a86ce8c66d324cce1fc1a19
parent720ba14b8e3f5f4fc58b0e2c05c2ca989ea2bac5
[Sema][Crash] Correctly handle an non-dependent noexcept expr in function template

It seems that all of the other templated cases are handled correctly,
however the function template case was not correctly handled. This
patch recovers from this condition by setting the function to noexcept
after diagnosing. Previously it simply set NoexceptExpr to null,
which caused an Assert when this was evaluated during substitution.

Differential Revision:https://reviews.llvm.org/D38700

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