jbcoe abandoned this revision.
jbcoe added a comment.
Posting a comment re-opened this patch. The approach taken cannot handle
templates using `std::vector`, a radical rework is needed.
https://reviews.llvm.org/D29267 introduces the safety critical module with a
much simpler check (no assembler
jbcoe updated this revision to Diff 86225.
jbcoe added a comment.
Minor changes in response to review comments.
Patch abandoned as approach taken cannot handle templates.
https://reviews.llvm.org/D29118
Files:
clang-tools-extra/clang-tidy/CMakeLists.txt
clang-tools-extra/clang-tidy/safety/
jbcoe marked 5 inline comments as done.
jbcoe added a comment.
Handling code like `std::pair, int>` is currently eluding me.
If I define `std::pair` to have members `first` and `second` then
`std::pair, int>` triggers the `vector` diagnostic but
in the template, not the instantiation point.
I
djehuti added inline comments.
Comment at: clang-tools-extra/clang-tidy/safety/NoVectorBoolCheck.cpp:52
+<< MatchedDecl;
+ }
+}
JonasToth wrote:
> maybe an safety else with an failing assert, so you can see that unexpected
> behaviour, see comment above
JonasToth added inline comments.
Comment at: clang-tools-extra/clang-tidy/safety/NoVectorBoolCheck.cpp:50
+diag(MatchedDecl->getLocation(),
+ " function %0 returns an instance of std::vector")
+<< MatchedDecl;
jbcoe wrote:
> djehuti wrote:
> >
jbcoe added inline comments.
Comment at: clang-tools-extra/clang-tidy/safety/NoVectorBoolCheck.cpp:50
+diag(MatchedDecl->getLocation(),
+ " function %0 returns an instance of std::vector")
+<< MatchedDecl;
djehuti wrote:
> JonasToth wrote:
> >
jbcoe updated this revision to Diff 85967.
jbcoe marked 2 inline comments as done.
jbcoe added a comment.
Responses to some change requests. Input needed on template argument matcher.
https://reviews.llvm.org/D29118
Files:
clang-tools-extra/clang-tidy/CMakeLists.txt
clang-tools-extra/clang-