[PATCH] D63960: [C++20] Add consteval-specifique semantic for functions

Tyker via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 17:13:51 PDT 2019


Tyker updated this revision to Diff 219205.
Tyker retitled this revision from "[C++20] Add consteval-specifique semantic" to "[C++20] Add consteval-specifique semantic for functions".
Tyker added a comment.
Herald added a subscriber: mgrang.

I narrowed the patch because it was getting quite big. this patch only handle consteval function, not constructors.

Changes:

- keep track of DeclRefExpr on consteval decaltions.
- keep track of candidates for immediate invocation.
- detect and remove nested immediate invocation candidates
- detect and remove DeclRefExpr on consteval declarations inside immediate invocations.
- diagnose non removed DeclRefExpr on consteval declarations and candidates for immediate invocation.
- fixe existing bug where defaulted consteval special members where constexpr instead of consteval.
- improve tests.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63960/new/

https://reviews.llvm.org/D63960

Files:
  clang/include/clang/AST/DeclCXX.h
  clang/include/clang/Basic/DiagnosticASTKinds.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Sema/Sema.h
  clang/lib/AST/DeclCXX.cpp
  clang/lib/AST/ExprConstant.cpp
  clang/lib/Sema/Sema.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaDeclCXX.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaLambda.cpp
  clang/lib/Sema/SemaOverload.cpp
  clang/lib/Sema/TreeTransform.h
  clang/lib/Serialization/ASTReaderDecl.cpp
  clang/lib/Serialization/ASTWriter.cpp
  clang/test/SemaCXX/cxx2a-consteval.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63960.219205.patch
Type: text/x-patch
Size: 35567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190907/ee883c3f/attachment-0001.bin>


More information about the cfe-commits mailing list