]> granicus.if.org Git - clang/commit
Constant expression evaluation refactoring:
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 10 Oct 2011 18:28:20 +0000 (18:28 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 10 Oct 2011 18:28:20 +0000 (18:28 +0000)
commita6b8b2c09610b8bc4330e948ece8b940c2386406
treef59c822c4be1f7a73f2e536222e27fe1fe35c04d
parentfcdd2cb2fdf35f806dd800b369fe0772a1c8c26c
Constant expression evaluation refactoring:
 - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
   and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
   behaviour.
 - Factor out evaluation of bitfield bit widths.
 - Fix a few places which would evaluate an expression twice: once to determine
   whether it is a constant expression, then again to get the value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
29 files changed:
include/clang/AST/Decl.h
include/clang/AST/Expr.h
lib/AST/ASTContext.cpp
lib/AST/ASTImporter.cpp
lib/AST/Decl.cpp
lib/AST/DeclCXX.cpp
lib/AST/Expr.cpp
lib/AST/ExprConstant.cpp
lib/AST/ItaniumMangle.cpp
lib/AST/RecordLayoutBuilder.cpp
lib/CodeGen/CGBuiltin.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h
lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CGObjCMac.cpp
lib/CodeGen/CGObjCRuntime.cpp
lib/CodeGen/CGRecordLayoutBuilder.cpp
lib/CodeGen/CGStmt.cpp
lib/CodeGen/TargetInfo.cpp
lib/Sema/SemaChecking.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaStmt.cpp
lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
lib/StaticAnalyzer/Core/BugReporter.cpp
utils/TableGen/ClangAttrEmitter.cpp