================
@@ -1599,6 +1599,36 @@ TEST_P(UncheckedOptionalAccessTest, WithAlias) {
void target(MyOptional<int> opt) {
opt.value(); // [[unsafe]]
+ *opt; // [[unsafe]]
+ if (opt.has_value()) {
+ opt.value();
+ *opt;
+ }
+ if (opt) {
+ opt.value();
+ *opt;
+ }
+ }
+ )");
+
+ ExpectDiagnosticsFor(
----------------
jvoung wrote:
SG -- split out the pointer case
https://github.com/llvm/llvm-project/pull/188044
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits