[PATCH] D127105: [analyzer] Fix null pointer deref in CastValueChecker

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 7 04:11:30 PDT 2022


martong added inline comments.


================
Comment at: clang/test/Analysis/cast-value-state-dump.cpp:26
   if (dyn_cast_or_null<Square>(S)) {
-    // expected-note at -1 {{Assuming 'S' is not a 'Square'}}
+    // expected-note at -1 {{Assuming 'S' is not a 'const class clang::Square *'}}
     // expected-note at -2 {{Taking false branch}}
----------------
steakhal wrote:
> IDK, I see the motivation, but we don't need the full name of these in most cases.
> I find it more disturbing than helpful. I would instead stick to the shorter form.
I see your point, but I this way, the checker provides more precise type info, which is good in my opinion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127105/new/

https://reviews.llvm.org/D127105



More information about the cfe-commits mailing list