This is an archive of the discontinued LLVM Phabricator instance.

Rename/refactor isIntegerConstantExpression to getIntegerConstantExpression
ClosedPublic

Authored by dblaikie on Mar 23 2020, 3:18 PM.

Details

Summary

There is a version that just tests (also called
isIntegerConstantExpression) & whereas this version is specifically used
when the value is of interest (a few call sites were actually refactored
to calling the test-only version) so let's make the API look more like
it.

Diff Detail

Event Timeline

dblaikie created this revision.Mar 23 2020, 3:18 PM
Herald added a project: Restricted Project. · View Herald Transcript
jdoerfert resigned from this revision.Mar 23 2020, 5:46 PM
aaron.ballman accepted this revision.May 5 2020, 4:42 AM

LGTM aside from the formatting nits. I think this is a nice cleanup, thanks!

clang/include/clang/AST/Expr.h
513–515

80-col issue, should clang-format the patch.

This revision is now accepted and ready to land.May 5 2020, 4:42 AM
This revision was automatically updated to reflect the committed changes.
sberg added a subscriber: sberg.Jul 27 2020, 7:19 AM
sberg added inline comments.
clang/include/clang/AST/Expr.h
513

I think the "Return the value..." description now matches getIntegerConstantExpr, not isIntegerConstantExpr