llvm-project/clang/lib
Gauthier Harnisch 796ed03b84 [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
2019-06-14 08:56:20 +00:00
..
ARCMigrate [PlistSupport] Produce a newline to end plist output files 2019-06-10 22:30:57 +00:00
AST [C++20] add Basic consteval specifier 2019-06-14 08:56:20 +00:00
ASTMatchers Added AST matcher for ignoring elidable constructors 2019-06-13 13:48:24 +00:00
Analysis [analyzer] ProgramPoint: more explicit printJson() 2019-06-12 18:24:02 +00:00
Basic [Targets] Move soft-float-abi filtering to `initFeatureMap` 2019-06-14 00:35:17 +00:00
CodeGen Revert 363295, it caused PR42276. Also revert follow-ups 363337, 363340. 2019-06-14 04:05:17 +00:00
CrossTU [ASTImporter] Use llvm::Expected and Error in the importer API 2019-05-15 10:29:48 +00:00
Driver [AMDGPU] gfx1010 wave32 clang support 2019-06-13 23:47:59 +00:00
Edit Range-style std::find{,_if} -> llvm::find{,_if}. NFC 2019-03-31 08:48:19 +00:00
Format clang-format: better handle namespace macros 2019-06-06 20:06:23 +00:00
Frontend [WebAssembly] Modernize include path handling 2019-06-13 09:42:43 +00:00
FrontendTool Add clang source minimizer that reduces source to directives 2019-06-03 22:59:17 +00:00
Headers [PowerPC] [Clang] Port SSE2 intrinsics to PowerPC 2019-06-12 05:25:40 +00:00
Index [Index] Compute correct symbol kind for variable templates 2019-05-29 17:49:30 +00:00
Lex [clang][HeaderSearch] Consider all path separators equal 2019-06-06 18:49:16 +00:00
Parse [C++20] add Basic consteval specifier 2019-06-14 08:56:20 +00:00
Rewrite [analyzer] [NFC] PathDiagnostic: Create PathDiagnosticPopUpPiece 2019-05-29 19:21:59 +00:00
Sema [C++20] add Basic consteval specifier 2019-06-14 08:56:20 +00:00
Serialization [C++20] add Basic consteval specifier 2019-06-14 08:56:20 +00:00
StaticAnalyzer Revert 363295, it caused PR42276. Also revert follow-ups 363337, 363340. 2019-06-14 04:05:17 +00:00
Tooling [LibTooling] Add `before` and `after` selectors for selecting point-ranges relative to nodes. 2019-05-29 12:40:36 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00