[clang] d563c0f - [clang][Interp][NFC] Add source ranges to some diagnostics.
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 17 22:54:13 PDT 2024
Author: Timm Bäder
Date: 2024-06-18T07:53:51+02:00
New Revision: d563c0f96ca4a4160b149ce83b99c78eed865fa8
URL: https://github.com/llvm/llvm-project/commit/d563c0f96ca4a4160b149ce83b99c78eed865fa8
DIFF: https://github.com/llvm/llvm-project/commit/d563c0f96ca4a4160b149ce83b99c78eed865fa8.diff
LOG: [clang][Interp][NFC] Add source ranges to some diagnostics.
Added:
Modified:
clang/lib/AST/Interp/InterpBuiltin.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/InterpBuiltin.cpp b/clang/lib/AST/Interp/InterpBuiltin.cpp
index 00206d09c113d..44629fe218b1e 100644
--- a/clang/lib/AST/Interp/InterpBuiltin.cpp
+++ b/clang/lib/AST/Interp/InterpBuiltin.cpp
@@ -147,12 +147,12 @@ static bool interp__builtin_is_constant_evaluated(InterpState &S, CodePtr OpPC,
const Expr *E = Caller->Caller->getExpr(Caller->getRetPC());
S.report(E->getExprLoc(),
diag::warn_is_constant_evaluated_always_true_constexpr)
- << "std::is_constant_evaluated";
+ << "std::is_constant_evaluated" << E->getSourceRange();
} else {
const Expr *E = Frame->Caller->getExpr(Frame->getRetPC());
S.report(E->getExprLoc(),
diag::warn_is_constant_evaluated_always_true_constexpr)
- << "__builtin_is_constant_evaluated";
+ << "__builtin_is_constant_evaluated" << E->getSourceRange();
}
}
More information about the cfe-commits
mailing list