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)
commitc28a964cbad888e41dc870f6e96e8127ab2524c9
treed669eec2a67ecccfc995d9841fcda7c122103ac4
parent93d45ecdbf6ad50b02f632dc6b66ec6d49b4f2bf
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

llvm-svn: 211568
clang/lib/AST/ExprConstant.cpp
clang/test/CodeGenCXX/PR19955.cpp [new file with mode: 0644]
clang/test/SemaCXX/PR19955.cpp [new file with mode: 0644]