[PATCH] D16465: [MS ABI] Prevent some expressions from evaluating to a constant

Ehsan Akhgari via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 22 07:15:04 PST 2016


ehsan created this revision.
ehsan added a reviewer: rnk.
ehsan added a subscriber: cfe-commits.

In the Microsoft ABI, some expressions containing references to variables
cannot be evaluated as a constant.  These are expressions containing a
conditional, logical and/or, or comma operator with an operand that is a
variable name.

This is observable at the ABI level by whether the compiler would emit a
static initializer for such expressions where normally it would emit a
readonly constant data.  See PR26210 for more details.

http://reviews.llvm.org/D16465

Files:
  include/clang/Basic/DiagnosticASTKinds.td
  lib/AST/ExprConstant.cpp
  test/CodeGenCXX/static-init-msvc.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16465.45686.patch
Type: text/x-patch
Size: 9109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160122/c114c8d4/attachment.bin>


More information about the cfe-commits mailing list