blob: bf66fdc17c6573a3820b1a09fefdcc4041c21fe8 [file] [log] [blame]
Eli Friedman72b8b1e2012-02-29 04:03:55 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Eli Friedman72b8b1e2012-02-29 04:03:55 +00003
4// Make sure we handle contexts correctly with sizeof
5template<typename T> void f(T n) {
6 int buffer[n];
7 [] { int x = sizeof(sizeof(buffer)); }();
8}
9int main() {
10 f<int>(1);
11}