[all-commits] [llvm/llvm-project] 81fc3a: [clang] Avoid re-evaluating field bitwidth (#117732)

Timm Baeder via All-commits all-commits at lists.llvm.org
Wed Jan 8 05:45:40 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 81fc3add1e627c23b7270fe2739cdacc09063e54
      https://github.com/llvm/llvm-project/commit/81fc3add1e627c23b7270fe2739cdacc09063e54
  Author: Timm Baeder <tbaeder at redhat.com>
  Date:   2025-01-08 (Wed, 08 Jan 2025)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/NarrowingConversionsCheck.cpp
    M clang-tools-extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.cpp
    M clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp
    M clang-tools-extra/clangd/Hover.cpp
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/ASTMatchers/ASTMatchers.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ByteCode/Interp.h
    M clang/lib/AST/ByteCode/InterpBuiltinBitCast.cpp
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/DeclCXX.cpp
    M clang/lib/AST/Expr.cpp
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/AST/Randstruct.cpp
    M clang/lib/AST/RecordLayoutBuilder.cpp
    M clang/lib/CodeGen/ABIInfo.cpp
    M clang/lib/CodeGen/ABIInfoImpl.cpp
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CGClass.cpp
    M clang/lib/CodeGen/CGDebugInfo.cpp
    M clang/lib/CodeGen/CGNonTrivialStruct.cpp
    M clang/lib/CodeGen/CGObjCMac.cpp
    M clang/lib/CodeGen/CGObjCRuntime.cpp
    M clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
    M clang/lib/CodeGen/SwiftCallingConv.cpp
    M clang/lib/CodeGen/Targets/LoongArch.cpp
    M clang/lib/CodeGen/Targets/RISCV.cpp
    M clang/lib/CodeGen/Targets/X86.cpp
    M clang/lib/CodeGen/Targets/XCore.cpp
    M clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaDeclObjC.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/lib/StaticAnalyzer/Core/RegionStore.cpp
    M clang/tools/libclang/CXType.cpp
    M clang/unittests/AST/ASTImporterTest.cpp

  Log Message:
  -----------
  [clang] Avoid re-evaluating field bitwidth (#117732)

Save the bitwidth value as a `ConstantExpr` with the value set. Remove
the `ASTContext` parameter from `getBitWidthValue()`, so the latter
simply returns the value from the `ConstantExpr` instead of
constant-evaluating the bitwidth expression every time it is called.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list