http://llvm.org/bugs/show_bug.cgi?id=12669
Bug #: 12669
Summary: Constant expressions in constant context not evaluated
as such
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
The attached code returns 1 when compiled with -O2 or higher, and fails to link
otherwise. Either the program does not admit a constexpr foo::contains (which
clang should diagnose here in all cases, since the function is used in constant
context), or the optimizers are smarter than the clang constexpr evaluator.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs