//===-- main.cpp ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LIDENSE.TXT for details. // //===----------------------------------------------------------------------===// template int staticSizeof() { return sizeof(T); } template int staticSizeof() { return staticSizeof() + sizeof(T1); } int main (int argc, char const *argv[]) { int sz = staticSizeof(); return staticSizeof() != sz; //% self.expect("expression -- sz == staticSizeof()", "staticSizeof worked", substrs = ["true"]) //% self.expect("expression -- sz == staticSizeof() + sizeof(char)", "staticSizeof worked", substrs = ["true"]) //% self.expect("expression -- sz == staticSizeof() + sizeof(int) + sizeof(char)", "staticSizeof worked", substrs = ["true"]) }