This revision was automatically updated to reflect the committed changes.
Closed by commit rL318900: Do not perform the analysis based warning if the
warnings are ignored (authored by ogoffart).
Changed prior to commit:
https://reviews.llvm.org/D40242?vs=123720&id=124041#toc
Repository:
rL L
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
https://reviews.llvm.org/D40242
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman
ogoffart updated this revision to Diff 123720.
ogoffart added a comment.
Herald added a subscriber: klimek.
I added a test.
I did not add such test before because i know that calling Reset() on the
diagnostics is kind of a hack.
This change does not have any behavioral difference normally, it is
aaron.ballman added a comment.
In https://reviews.llvm.org/D40242#931173, @ogoffart wrote:
> > You should add a test case that demonstrates code which would otherwise
> > trigger an analysis-based warning but doesn't due to disabling all warnings.
>
> No warnings are triggered. Because the diagn
ogoffart marked an inline comment as done.
ogoffart added a comment.
> You should add a test case that demonstrates code which would otherwise
> trigger an analysis-based warning but doesn't due to disabling all warnings.
No warnings are triggered. Because the diagnostic engine ignores them.
Thi
aaron.ballman added a comment.
You should add a test case that demonstrates code which would otherwise trigger
an analysis-based warning but doesn't due to disabling all warnings.
https://reviews.llvm.org/D40242
___
cfe-commits mailing list
cfe-com
ogoffart marked an inline comment as done.
ogoffart added inline comments.
Comment at: lib/Sema/AnalysisBasedWarnings.cpp:2084
+ // Do not do any analysis if we are going to just ignore them.
+ if (Diags.getIgnoreAllWarnings() ||
+ (Diags.getSuppressSystemWarnings() &&
---
lebedev.ri added a comment.
In https://reviews.llvm.org/D40242#930125, @ogoffart wrote:
> I do not know how to add a test: there is no real visible change for clang.
> It just should be faster when passing "-w".
Oh right, i was thinking of something else there.
Comment at:
ogoffart added a comment.
I do not know how to add a test: there is no real visible change for clang. It
just should be faster when passing "-w".
https://reviews.llvm.org/D40242
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.l
lebedev.ri added a comment.
You probably want to add a test for this.
https://reviews.llvm.org/D40242
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ogoffart created this revision.
Do not perform the analysis based warning if all warnings are ignored.
This saves some cycles when compiling with "-w".
But more importantly, for my tool, this fixes a potential crash which may
happen on invalid code. Because the analysis might compute the CFG wh
11 matches
Mail list logo