================
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -std=c11 -triple x86_64-unknown-linux -verify -fsyntax-only 
%s
+
+// Check that a cleanup attribute on an invalid declaration doesn't crash,
+// and that we diagnose duplicate cleanup attributes.
+
+#define C(x) __attribute__((cleanup(x)))
+void foo(double *x U) {} // expected-error {{expected ')'}} expected-note {{to 
match this '('}}
----------------
AaronBallman wrote:

That's what I figured; I'd drop the `U` here so this is a valid function 
definition.

https://github.com/llvm/llvm-project/pull/207785
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to