diff options
Diffstat (limited to 'test/Analysis/structured_bindings.cc')
-rw-r--r-- | test/Analysis/structured_bindings.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Analysis/structured_bindings.cc b/test/Analysis/structured_bindings.cc new file mode 100644 index 0000000000000..1e23246f9a12c --- /dev/null +++ b/test/Analysis/structured_bindings.cc @@ -0,0 +1,10 @@ +// RUN: %clang_analyze_cc1 -std=c++17 -analyzer-checker=core -verify %s + +// expected-no-diagnostics +struct s { int a; }; +int foo() { + auto[a] = s{1}; // FIXME: proper modelling + if (a) { + } +} + |