================
@@ -0,0 +1,86 @@
+// RUN: %clang_analyze_cc1 
-analyzer-checker=core,alpha.cplusplus.ReportDanglingPtrDeref \
+// RUN:   -analyzer-config cfg-lifetime=true -analyzer-output=text -verify %s
+
+void test_case_one() {
+  int *ptr = nullptr;
+  // expected-note@+1 {{'num' is destroyed here}}
----------------
benedekaibas wrote:

Yes, they were. I have looked at @steakhal's patch and switched to the 
`createEnd` function to correctly point to the closing brace. Also checked the 
implementation of `createEnd` to make sure it is the correct one.

https://github.com/llvm/llvm-project/blob/7de5af16e0e72d6325d3dd63ee619a1cb3bce783/clang/include/clang/Analysis/PathDiagnostic.h#L272-L276

https://github.com/llvm/llvm-project/pull/209278
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to