[clang] [clang-tools-extra] [clang][Analysis] Handle const-qualified pointer refs in `ExprMutationAnalyzer` (PR #190421)
Daniil Dudkin via cfe-commits
cfe-commits at lists.llvm.org
Sun May 3 11:00:58 PDT 2026
================
@@ -123,3 +126,59 @@ void pointer_in_emplacement_new() {
// CHECK-NOT: warning
new(ptr) int {123};
}
+
+void takesConstPointerRef(int *const &);
+void takesConstPointerRRef(int *const &&);
+using IntPtrAlias = int *;
+typedef int *IntPtrTypedef;
+void takesAliasConstPointerRef(IntPtrAlias const &);
+void takesTypedefConstPointerRef(IntPtrTypedef const &);
+
+void ignore_const_pointer_reference_sinks() {
+ int value = 0;
+
+ int *p_local0 = &value;
+ // CHECK-FIXES: int *p_local0 = &value;
----------------
unterumarmung wrote:
Fixed this one. Will merge in a day or two, if there will be no objections
https://github.com/llvm/llvm-project/pull/190421
More information about the cfe-commits
mailing list