diff options
Diffstat (limited to 'test/SemaCXX/for-range-examples.cpp')
-rw-r--r-- | test/SemaCXX/for-range-examples.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/SemaCXX/for-range-examples.cpp b/test/SemaCXX/for-range-examples.cpp index d6b527ff8a502..477789b56c142 100644 --- a/test/SemaCXX/for-range-examples.cpp +++ b/test/SemaCXX/for-range-examples.cpp @@ -221,11 +221,7 @@ namespace test7 { for (c alignas(8) : arr) { // expected-error {{requires type for loop variable}} static_assert(alignof(c) == 8, ""); // expected-warning {{extension}} } - // FIXME: The fix-it hint here is not sufficient to fix the error. - // We fail to diagnose that d is underaligned for its type, because - // we check the alignment attribute before we perform the auto - // deduction. - for (d alignas(1) : arr) {} // expected-error {{requires type for loop variable}} + for (d alignas(1) : arr) {} // expected-error {{requested alignment is less than minimum}} expected-error {{requires type for loop variable}} for (e [[deprecated]] : arr) { e = 0; } // expected-warning {{deprecated}} expected-note {{here}} expected-error {{requires type for loop variable}} } } @@ -274,4 +270,4 @@ int foo(int b) { }(); return b; } -}
\ No newline at end of file +} |