clang/test/Sema/implicit-int-float-narrowing.cpp
raw| 1 | // RUN: %clang_cc1 %s -verify -Wno-conversion -Wno-c++11-narrowing -Wimplicit-int-float-conversion |
| 2 | |
| 3 | void testNoWarningOnNarrowing() { |
| 4 | // Test that we do not issue duplicated warnings for |
| 5 | // C++11 narrowing. |
| 6 | float a = {222222222222L}; // expected-no-diagnostics |
| 7 | |
| 8 | long b = 222222222222L; |
| 9 | float c = {b}; // expected-no-diagnostics |
| 10 | } |