[PATCH] D73007: [Sema] Avoid Wrange-loop-analysis false positives
Mark de Wever via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 19 10:03:47 PST 2020
Mordante created this revision.
Mordante added reviewers: rsmith, rtrieu, aaron.ballman, xbolva00.
Mordante added a project: clang.
When Wrange-loop-analysis issues a diagnostic on a dependent type in a template the diagnostic may not be valid for all instantiations. Therefore the diagnostic is suppressed during the instantiation. Non dependent types still issue a diagnostic.
The same can happen when using macros. Therefore the diagnostic is disabled for macros.
Fixes https://bugs.llvm.org/show_bug.cgi?id=44556
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73007
Files:
clang/lib/Sema/SemaStmt.cpp
clang/test/SemaCXX/warn-range-loop-analysis.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73007.239001.patch
Type: text/x-patch
Size: 3285 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200119/bafe023d/attachment-0001.bin>
More information about the cfe-commits
mailing list