summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseCXXInlineMethods.cpp
diff options
context:
space:
mode:
authorGauthier Harnisch <tyker1@outlook.com>2019-06-14 08:56:20 +0000
committerGauthier Harnisch <tyker1@outlook.com>2019-06-14 08:56:20 +0000
commit796ed03b841289a5ca75a3046b09d6b8222f01ef (patch)
tree3592b4b7315dcf883f35915dec065aca170d4f53 /clang/lib/Parse/ParseCXXInlineMethods.cpp
parentb63e577444d3617843e0835feb7aa457fee79f97 (diff)
downloadbcm5719-llvm-796ed03b841289a5ca75a3046b09d6b8222f01ef.tar.gz
bcm5719-llvm-796ed03b841289a5ca75a3046b09d6b8222f01ef.zip
[C++20] add Basic consteval specifier
Summary: this revision adds Lexing, Parsing and Basic Semantic for the consteval specifier as specified by http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1073r3.html with this patch, the consteval specifier is treated as constexpr but can only be applied to function declaration. Changes: - add the consteval keyword. - add parsing of consteval specifier for normal declarations and lambdas expressions. - add the whether a declaration is constexpr is now represented by and enum everywhere except for variable because they can't be consteval. - adapt diagnostic about constexpr to print constexpr or consteval depending on the case. - add tests for basic semantic. Reviewers: rsmith, martong, shafik Reviewed By: rsmith Subscribers: eraman, efriedma, rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61790 llvm-svn: 363362
Diffstat (limited to 'clang/lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r--clang/lib/Parse/ParseCXXInlineMethods.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp
index f2e552a3ce1..14151efd3d2 100644
--- a/clang/lib/Parse/ParseCXXInlineMethods.cpp
+++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp
@@ -109,7 +109,7 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(
// the tokens and store them for parsing at the end of the translation unit.
if (getLangOpts().DelayedTemplateParsing &&
D.getFunctionDefinitionKind() == FDK_Definition &&
- !D.getDeclSpec().isConstexprSpecified() &&
+ !D.getDeclSpec().hasConstexprSpecifier() &&
!(FnD && FnD->getAsFunction() &&
FnD->getAsFunction()->getReturnType()->getContainedAutoType()) &&
((Actions.CurContext->isDependentContext() ||
OpenPOWER on IntegriCloud