Eli Friedman | e4f22df | 2012-02-29 04:03:55 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
2 | |||||
3 | // Make sure we handle contexts correctly with sizeof | ||||
4 | template<typename T> void f(T n) { | ||||
5 | int buffer[n]; | ||||
6 | [] { int x = sizeof(sizeof(buffer)); }(); | ||||
7 | } | ||||
8 | int main() { | ||||
9 | f<int>(1); | ||||
10 | } |