Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -0,0 +1,55 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir
-Wno-unused-value -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s
+
+unsigned id0() {
+ unsigned a = 1;
+ return ++a;
+}
+
+// CHECK: cir.func dso_local @_Z3id0v() -> !u32i
+// CHECK: %[[#RET:]] = cir.alloca !u32i, !cir.ptr<!u32i>, ["__retval"]
----------------
andykaylor wrote:
I don't like the `#` matches because they prevent the pattern names from being
re-used in other ways later in the test. I also strongly prefer `%[[RET:.*]]`
over `[[RET:%.*]]` for several reasons: (1) it's easier to see at a glance that
the leading `%` marks this as a value, (2) it's easy to miss the fact that the
`%` is part of the pattern being matched because at a glance `:%.*` just looks
like a bunch of non-alphanumeric symbols and my brain tends to mash them all
together as some arbitrary regular expression, and (3) when you have checks
that involve labels, the `%` isn't always part of what you're matching, so you
can end up with a mix of some patterns that include the `%` and some that
don't, which further hurts readability.
https://github.com/llvm/llvm-project/pull/157333
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits