[clang] [clang][bytecode][NFC] Remove useless IsOpaqueConstantCall function (PR #237689)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 31 23:22:36 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
We're already including ExprConstShared.h, which has a copy of this function, so just use that.
---
Full diff: https://github.com/llvm/llvm-project/pull/237689.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Interp.h (+1-9)
``````````diff
diff --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h
index 98970cdf2cfc06..a365df655179f0 100644
--- a/clang/lib/AST/ByteCode/Interp.h
+++ b/clang/lib/AST/ByteCode/Interp.h
@@ -1285,14 +1285,6 @@ inline bool CmpHelper<Pointer>(InterpState &S, CodePtr OpPC, CompareFn Fn) {
return true;
}
-static inline bool IsOpaqueConstantCall(const CallExpr *E) {
- unsigned Builtin = E->getBuiltinCallee();
- return (Builtin == Builtin::BI__builtin___CFStringMakeConstantString ||
- Builtin == Builtin::BI__builtin___NSStringMakeConstantString ||
- Builtin == Builtin::BI__builtin_ptrauth_sign_constant ||
- Builtin == Builtin::BI__builtin_function_start);
-}
-
bool arePotentiallyOverlappingStringLiterals(const Pointer &LHS,
const Pointer &RHS);
@@ -1384,7 +1376,7 @@ inline bool CmpHelperEQ<Pointer>(InterpState &S, CodePtr OpPC, CompareFn Fn) {
return false;
}
if (const auto *CE = dyn_cast<CallExpr>(E);
- CE && IsOpaqueConstantCall(CE)) {
+ CE && isOpaqueConstantCall(CE)) {
const SourceInfo &Loc = S.Current->getSource(OpPC);
S.FFDiag(Loc, diag::note_constexpr_opaque_call_comparison)
<< P.toDiagnosticString(S.getASTContext());
``````````
</details>
https://github.com/llvm/llvm-project/pull/237689
More information about the cfe-commits
mailing list