[PATCH] D81003: [clang] SequenceChecker: Also visit default arguments and default initializers.

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 17 13:29:55 PDT 2020


riccibruno updated this revision to Diff 271464.
riccibruno retitled this revision from "[clang] SequenceChecker: Also visit default arguments." to "[clang] SequenceChecker: Also visit default arguments and default initializers.".
riccibruno edited the summary of this revision.
riccibruno added a comment.

Ah, I forgot about default initializers. Thanks!

I have updated the patch to track chains of default arguments and/or initializers.
This shouldn't be too expensive since this will only be used when traversing a
`CXXDefaultArgExpr` or `CXXDefaultInitExpr`. Still I am running my usual benchmark
(all of boost) and will report with the results.

I think that this uncovers another issue (`test_default_init` in the test):
`SequenceChecker::VisitCXXConstructExpr` does not visit the default arguments of the constructor.
Because of this `SequenceChecker` misses the mutation in the example you gave, but only in <c++17.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81003

Files:
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/Sema/SemaChecking.cpp
  clang/test/SemaCXX/warn-unsequenced.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81003.271464.patch
Type: text/x-patch
Size: 10298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200617/59a4fb02/attachment-0001.bin>


More information about the cfe-commits mailing list