mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-21 04:25:45 -04:00

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
10 lines
240 B
C++
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}}
|
|
|