]> granicus.if.org Git - clang/commit
Sema: Don't crash when variable is redefined as a constexpr function
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 9 Jan 2015 10:33:23 +0000 (10:33 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 9 Jan 2015 10:33:23 +0000 (10:33 +0000)
commit747fe82ae7826ad74e0b0b8fec2b1d833a8b2d38
tree521610525fbfddf756087195ad28f3c29a772a57
parente03d7d792c93418928e4b30a79bc7a19a26b7edb
Sema: Don't crash when variable is redefined as a constexpr function

We have a diagnostic describing that constexpr changed in C++14 when
compiling in C++11 mode.  While doing this, it examines the previous
declaration and assumes that it is a function.  However it is possible,
in the context of error recovery, for this to not be the case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225518 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/SemaCXX/constant-expression-cxx11.cpp