summaryrefslogtreecommitdiff
path: root/test/Sema/implicit-int-float-narrowing.cpp
blob: 6de637e78c59bbd7ed14f6551a0656172d7f7be9 (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: %clang_cc1 %s -verify -Wno-conversion -Wno-c++11-narrowing -Wimplicit-int-float-conversion

void testNoWarningOnNarrowing() {
  // Test that we do not issue duplicated warnings for
  // C++11 narrowing.
  float a = {222222222222L}; // expected-no-diagnostics

  long b = 222222222222L;
  float c = {b}; // expected-no-diagnostics
}