summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/structured_bindings.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-08-01 15:06:57 +0000
committerNico Weber <nicolasweber@gmx.de>2019-08-01 15:06:57 +0000
commit5c2d5f066fba2c080438a8643550b544ac466f5d (patch)
tree887c338e355da4c363de0cef9a8d648233a2898a /clang/test/Analysis/structured_bindings.cpp
parent5f5379d0767dd09d2cb9ecc5c80b6e292bda053b (diff)
downloadbcm5719-llvm-5c2d5f066fba2c080438a8643550b544ac466f5d.tar.gz
bcm5719-llvm-5c2d5f066fba2c080438a8643550b544ac466f5d.zip
Rename two clang tests from .cc to .cpp.
clang/test/lit.cfg.py doesn't list .cc as test extension, so these tests never ran. Tweak one of the two tests to actually pass, now that it runs. (The other one was already passing.) llvm-svn: 367574
Diffstat (limited to 'clang/test/Analysis/structured_bindings.cpp')
-rw-r--r--clang/test/Analysis/structured_bindings.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Analysis/structured_bindings.cpp b/clang/test/Analysis/structured_bindings.cpp
new file mode 100644
index 00000000000..fcc976c4c3d
--- /dev/null
+++ b/clang/test/Analysis/structured_bindings.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_analyze_cc1 -std=c++17 -analyzer-checker=core -verify %s
+
+struct s { int a; };
+int foo() {
+ auto[a] = s{1}; // FIXME: proper modelling
+ if (a) {
+ }
+} // expected-warning{{control reaches end of non-void function}}
+
OpenPOWER on IntegriCloud