================
@@ -22,3 +22,11 @@ int compare(Data &a, Data &b) {
return compare(*aData, *bData); // no-warning
}
+
+void GH3206(char* a, char* b) {
+ if (a != b) {
+ if (a != nullptr || b == nullptr) {
+ a[0] = '\0'; // no-warning
+ }
+ }
+}
----------------
NagyDonat wrote:
The formatting was a bit broken, probably due to the presence of tabs. Let's
re-format and also unbrace if we're already touching the code.
```suggestion
void GH3206(char* a, char* b) {
if (a != b)
if (a != nullptr || b == nullptr)
a[0] = '\0'; // no-warning
}
```
https://github.com/llvm/llvm-project/pull/241058
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits