martong added inline comments.

================
Comment at: clang/unittests/StaticAnalyzer/ParamRegionTest.cpp:22
+                                const ParmVarDecl *PVD) {
+    for (const auto *D2: PVD->redecls()) {
+      const auto *PVD2 = cast<ParmVarDecl>(D2);
----------------
I am concerned about the redeclaration chain of ParmVarDecls. In the following 
example:
```
void foo(int a);
void foo(int a);
```
we have the prev decl set only for the FunctionDecls and not for the 
ParmVarDecl (please double check).
So in the test we should go through the redecls() of the FunctionDecl of the 
ParmVarDecl. And we should get a PVD from each redeclaration by the index. 


================
Comment at: clang/unittests/StaticAnalyzer/ParamRegionTest.cpp:87
                   std::make_unique<ParamRegionTestAction>(),
+                  "void foo(int n); "
+                  "void bar(int l); "
----------------
I think a raw string literal with clang-formatted code in it would make the 
test more valuable.


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

https://reviews.llvm.org/D80286



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to