summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprCXX.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-02-26 09:29:13 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-02-26 09:29:13 +0000
commit98c56a4fe986d78b54bc866dd96909dc582f1d31 (patch)
tree288089b4865a0db58d383e08185a1f6fb5cee749 /clang/lib/AST/ExprCXX.cpp
parente23b9f4e5984d1e2ab7e5f408c8dc65615dc16eb (diff)
downloadbcm5719-llvm-98c56a4fe986d78b54bc866dd96909dc582f1d31.tar.gz
bcm5719-llvm-98c56a4fe986d78b54bc866dd96909dc582f1d31.zip
Rewrite of isIntegerConstantExpr to be centered around Evaluate. This
is a rather big change, but I think this is the direction we want to go; the code is significantly shorter now, and it doesn't duplicate Evaluate code. There shouldn't be any visible changes as far as I know. There has been some movement towards putting ICE handling into Evaluate (for example, VerifyIntegerConstantExpression uses Evaluate instead of isICE). This patch is sort of the opposite of the approach, making ICE handling work without Evaluate being aware of it. I think this approach is better because it separates the code that does the constant evaluation from code that's calculating a rather arbitrary predicate. The one thing I don't really like about this patch is that the handling of commas in C99 complicates it signficantly. (Seriously, what was the standards committee thinking when they wrote that part?) I think I've come up with a decent approach, but it doesn't feel ideal. I might add some way to check for evaluated commas from Evaluate in a subsequent patch; that said, it might not be worth bothering. llvm-svn: 65524
Diffstat (limited to 'clang/lib/AST/ExprCXX.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud