llvm-project/clang/test/SemaCXX/ms_integer_suffix.cpp
David Majnemer 65a407c2ce Lex: Use the correct types for MS integer suffixes
Something went wrong with r211426, it is an older version of this code
and should not have been committed.  It was reverted with r211434.

Original commit message:
We didn't properly implement support for the sized integer suffixes.
Suffixes like i16 were essentially ignored instead of mapping them to
the appropriately sized integer type.

This fixes PR20008.

Differential Revision: http://reviews.llvm.org/D4132

llvm-svn: 211441
2014-06-21 18:46:07 +00:00

19 lines
519 B
C++

// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fms-extensions -verify %s
// expected-no-diagnostics
#ifdef __SIZEOF_INT8__
static_assert(sizeof(0i8) == __SIZEOF_INT8__, "");
#endif
#ifdef __SIZEOF_INT16__
static_assert(sizeof(0i16) == __SIZEOF_INT16__, "");
#endif
#ifdef __SIZEOF_INT32__
static_assert(sizeof(0i32) == __SIZEOF_INT32__, "");
#endif
#ifdef __SIZEOF_INT64__
static_assert(sizeof(0i64) == __SIZEOF_INT64__, "");
#endif
#ifdef __SIZEOF_INT128__
static_assert(sizeof(0i128) == __SIZEOF_INT128__, "");
#endif