]> granicus.if.org Git - clang/commit
AST: Address of dllimport variables isn't constant
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 24 Jun 2014 05:59:13 +0000 (05:59 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 24 Jun 2014 05:59:13 +0000 (05:59 +0000)
commit99ea974909aecf110b60b2d273f7cec97ebc0f11
tree1bb2efd3945e6b353633a2fd4ab6105a73e9f21c
parentb5db1b77d8fa80c507665d4c5c3217b0e972d3ed
AST: Address of dllimport variables isn't constant

The address of dllimport variables isn't something that can be
meaningfully used in a constexpr context and isn't suitable for
evaluation at load-time.  They require loads from memory to properly
evaluate.

This fixes PR19955.

Differential Revision: http://reviews.llvm.org/D4250

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211568 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp
test/CodeGenCXX/PR19955.cpp [new file with mode: 0644]
test/SemaCXX/PR19955.cpp [new file with mode: 0644]