[all-commits] [llvm/llvm-project] 424733: Implement if consteval (P1938)
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Tue Oct 5 05:04:32 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 424733c12aacc227a28114deba72061153f8dff2
https://github.com/llvm/llvm-project/commit/424733c12aacc227a28114deba72061153f8dff2
Author: Corentin Jabot <corentin.jabot at gmail.com>
Date: 2021-10-05 (Tue, 05 Oct 2021)
Changed paths:
M clang/include/clang/AST/Stmt.h
M clang/include/clang/Basic/DiagnosticParseKinds.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/include/clang/Basic/Specifiers.h
M clang/include/clang/Sema/Sema.h
M clang/lib/AST/ASTImporter.cpp
M clang/lib/AST/ExprConstant.cpp
M clang/lib/AST/Interp/ByteCodeStmtGen.cpp
M clang/lib/AST/JSONNodeDumper.cpp
M clang/lib/AST/Stmt.cpp
M clang/lib/AST/StmtPrinter.cpp
M clang/lib/AST/TextNodeDumper.cpp
M clang/lib/Analysis/BodyFarm.cpp
M clang/lib/Analysis/CFG.cpp
M clang/lib/CodeGen/CGStmt.cpp
M clang/lib/CodeGen/CodeGenPGO.cpp
M clang/lib/Frontend/InitPreprocessor.cpp
M clang/lib/Parse/ParseStmt.cpp
M clang/lib/Sema/JumpDiagnostics.cpp
M clang/lib/Sema/SemaDeclCXX.cpp
M clang/lib/Sema/SemaExpr.cpp
M clang/lib/Sema/SemaExprMember.cpp
M clang/lib/Sema/SemaLambda.cpp
M clang/lib/Sema/SemaStmt.cpp
M clang/lib/Sema/TreeTransform.h
M clang/lib/Serialization/ASTReaderStmt.cpp
M clang/lib/Serialization/ASTWriterStmt.cpp
M clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
A clang/test/AST/Interp/if_consteval.cpp
M clang/test/AST/ast-dump-if-json.cpp
M clang/test/AST/ast-dump-stmt.cpp
A clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp
A clang/test/CodeGenCXX/cxx2b-consteval-if.cpp
Log Message:
-----------
Implement if consteval (P1938)
Modify the IfStmt node to suppoort 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 as it allows diagnosing nested if consteval statements.
More information about the All-commits
mailing list