[clang] Fix time profile in "isIntegerConstantExpr"
authorEvgeny Shulgin <izaronplatz@gmail.com>
Sun, 23 Oct 2022 11:00:41 +0000 (11:00 +0000)
committerEvgeny Shulgin <izaronplatz@gmail.com>
Sun, 23 Oct 2022 23:17:56 +0000 (23:17 +0000)
commit2bb50a55b0f5a88bd432ad2691060d82748b5bc0
tree3be05736c780c0a7dee05d1c615349eb17872365
parent08d1c43c7023a2e955c43fbf4c3f1635f91521e0
[clang] Fix time profile in "isIntegerConstantExpr"

The time profiler in `Expr::isIntegerConstantExpr` used to
call `Loc->printToString`, it was inconsistent with other time
profiles in the file and caused segfaults if `Loc` was `nullptr`.

Fixes https://github.com/llvm/llvm-project/issues/58551

Reviewed By: dyung, jloser

Differential Revision: https://reviews.llvm.org/D136549
clang/lib/AST/ExprConstant.cpp
clang/unittests/Support/TimeProfilerTest.cpp