================
@@ -0,0 +1,33 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify 
%s
+// expected-no-diagnostics
+
+void clang_analyzer_warnIfReached();
+
+// Forward declaration
+namespace N { // 1st
+template <class T> struct Wrapper;
----------------
ziqingluo-90 wrote:

Thanks for printing the extra information!  

```
DeclWithIssue initially was 0xacad0d4d0  CXXMethod
  begin: clang/test/Analysis/suppress-namespace-redecl-core.cpp:22:3
  end:   clang/test/Analysis/suppress-namespace-redecl-core.cpp:27:3
DeclWithIssue was changed to 0xacad0d220  ClassTemplateSpecialization
  begin: clang/test/Analysis/suppress-namespace-redecl-core.cpp:13:1
  end:   clang/test/Analysis/suppress-namespace-redecl-core.cpp:13:27
```

This is the confusing step, right?   The `CXXMethod` should be a descendant of 
the template specialization. It is counterintuitive that the lexical parent of 
the `CXXMethod` is not in the same namespace as itself.  And it does not match 
the AST. 

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

Reply via email to