]> granicus.if.org Git - clang/commit
Sema: Respect -fdelayed-template-parsing when parsing constexpr functions
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 27 Sep 2013 04:14:12 +0000 (04:14 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 27 Sep 2013 04:14:12 +0000 (04:14 +0000)
commit54679205de1a348f410d03ce4b331b56b21dce49
tree582814e680a8a0da54e5aec90a09672ec36dc2c8
parent18209a7fa2fa67a56282e5ca52f15a437c1ff70e
Sema: Respect -fdelayed-template-parsing when parsing constexpr functions

Functions declared as constexpr must have their parsing delayed in
-fdelayed-template-parsing mode so as not to upset later template
instantiation.

N.B. My reading of the standard makes it seem like delayed template
parsing is at odds with constexpr.  We may want to make refinements in
other places in clang to make constexpr play nicer with this feature.

This fixes PR17334.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191484 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExpr.cpp
test/Parser/DelayedTemplateParsing.cpp