r277287 - [NFC] Rearrange an example-file so the c++14 specific example is on top.

Faisal Vali via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 30 18:19:18 PDT 2016


Author: faisalv
Date: Sat Jul 30 20:19:17 2016
New Revision: 277287

URL: http://llvm.org/viewvc/llvm-project?rev=277287&view=rev
Log:
[NFC] Rearrange an example-file so the c++14 specific example is on top.

This makes it easier to add C++1z examples to the bottom, just before the #endif.

Modified:
    cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp

Modified: cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp?rev=277287&r1=277286&r2=277287&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp (original)
+++ cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp Sat Jul 30 20:19:17 2016
@@ -2,6 +2,17 @@
 // RUN: %clang_cc1 -std=c++1z -verify -fsyntax-only -fblocks -fdelayed-template-parsing %s 
 // RUN: %clang_cc1 -std=c++14 -verify -fsyntax-only -fblocks %s -DCPP14_AND_EARLIER
 
+
+namespace test_lambda_is_literal {
+#ifdef CPP14_AND_EARLIER
+//expected-error at +4{{not a literal type}}
+//expected-note at +2{{not an aggregate and has no constexpr constructors}}
+#endif
+auto L = [] { };
+constexpr int foo(decltype(L) l) { return 0; }
+
+}
+
 #ifndef CPP14_AND_EARLIER
 namespace test_constexpr_checking {
 
@@ -35,14 +46,5 @@ namespace ns3 {
 
 } // end ns test_constexpr_call
 
-#endif
-
-namespace test_lambda_is_literal {
-#ifdef CPP14_AND_EARLIER
-//expected-error at +4{{not a literal type}}
-//expected-note at +2{{not an aggregate and has no constexpr constructors}}
-#endif
-auto L = [] { };
-constexpr int foo(decltype(L) l) { return 0; }
+#endif // ndef CPP14_AND_EARLIER
 
-}
\ No newline at end of file




More information about the cfe-commits mailing list