teak-llvm/clang/test/Analysis/structured_bindings.cpp
Dávid Bolvanský 1da13237a4 [Diagnostics] Try to improve warning message for -Wreturn-type
Summary: I agree with https://easyaspi314.github.io/gcc-vs-clang.html?fbclid=IwAR1VA0qxiWVUusOQUv5z7JESS7ZpeJy-UqAI5mnJscofGLqXcqeErIUB2gU, current warning message is not very good. We should try to improve it..

Reviewers: rsmith, aaron.ballman, easyaspi314

Reviewed By: aaron.ballman

Subscribers: arphaman, Quuxplusone, mehdi_amini, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D69762
2019-11-09 17:54:58 +01:00

10 lines
240 B
C++

// 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{{non-void function does not return a value}}