[PATCH] D110482: [clang] Implement if consteval (P1938)
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 25 09:20:15 PDT 2021
cor3ntin created this revision.
Herald added subscribers: wenlei, martong.
Herald added a reviewer: shafik.
cor3ntin requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Modify the IfStmt node to tuppoort constant evaluated expressions.
Add a new ExpressionEvaluationContext::ImmediateFunctionContext to
keep track of immediate function contexts.
This proved easier/better/probably more efficient than
walking the AST backward.
It allows diagnosing nested if consteval statements.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110482
Files:
clang/include/clang/AST/Stmt.h
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/ExprConstant.cpp
clang/lib/AST/Interp/ByteCodeStmtGen.cpp
clang/lib/AST/JSONNodeDumper.cpp
clang/lib/AST/Stmt.cpp
clang/lib/AST/StmtPrinter.cpp
clang/lib/AST/TextNodeDumper.cpp
clang/lib/Analysis/BodyFarm.cpp
clang/lib/Analysis/CFG.cpp
clang/lib/CodeGen/CGStmt.cpp
clang/lib/CodeGen/CodeGenPGO.cpp
clang/lib/Format/FormatToken.h
clang/lib/Format/TokenAnnotator.cpp
clang/lib/Format/UnwrappedLineParser.cpp
clang/lib/Frontend/InitPreprocessor.cpp
clang/lib/Parse/ParseStmt.cpp
clang/lib/Sema/JumpDiagnostics.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaExprMember.cpp
clang/lib/Sema/SemaLambda.cpp
clang/lib/Sema/SemaStmt.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Serialization/ASTReaderStmt.cpp
clang/lib/Serialization/ASTWriterStmt.cpp
clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp
clang/test/CodeGenCXX/cxx2b-consteval-if.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110482.375043.patch
Type: text/x-patch
Size: 43150 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210925/9b5564a8/attachment-0001.bin>
More information about the cfe-commits
mailing list