[PATCH] D24158: Try contextually converting condition of constexpr if to Boolean value

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 7 10:58:05 PDT 2016

rsmith added inline comments.

Comment at: test/CodeGenCXX/cxx1z-constexpr-if.cpp:2
@@ -1,2 +1,3 @@
 // RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - | FileCheck %s --implicit-check-not=should_not_be_used
+// RUN: %clang_cc1 -std=c++1z %s -DCHECK_CONVERSION -verify %s
ismailp wrote:
> Is there a more elegant way to do this? The previous check didn't seem to work with diagnostics.
Tests for semantic issues should go into test/SemaCXX (organized by category) or test/CXX (organized by section of the standard). In this case, test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp is probably the most appropriate place (somewhere in its `namespace ccce`, perhaps).


More information about the cfe-commits mailing list