aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2015-04-15 14:31:36 +0200
committerBjörn Gustavsson <[email protected]>2015-04-30 12:14:30 +0200
commite3adb6096a9528c2adc0d1a67f06876d972ac157 (patch)
tree643b96762443c140bc08b41505bafe5887f51a7d /lib/stdlib/src
parent87a0af476ef82ca2f33d0e15ce324afcfafe3aad (diff)
downloadotp-e3adb6096a9528c2adc0d1a67f06876d972ac157.tar.gz
otp-e3adb6096a9528c2adc0d1a67f06876d972ac157.tar.bz2
otp-e3adb6096a9528c2adc0d1a67f06876d972ac157.zip
stdlib: Silence some of qlc's warnings
As long as the Erlang Compiler and qlc do not agree on the location of LC warnings, qlc's own warnings about patterns and filters that always fail have been silenced.
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/qlc_pt.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/stdlib/src/qlc_pt.erl b/lib/stdlib/src/qlc_pt.erl
index c99d4128a1..a4d2157b35 100644
--- a/lib/stdlib/src/qlc_pt.erl
+++ b/lib/stdlib/src/qlc_pt.erl
@@ -229,9 +229,15 @@ mforms(Tag, L) ->
%% Avoid duplicated lint warnings and lint errors. Care has been taken
%% not to introduce unused variables in the transformed code.
%%
-no_duplicates(Forms, Errors, Warnings0, ExtraWarnings, Options) ->
+no_duplicates(Forms, Errors, Warnings0, ExtraWarnings0, Options) ->
%% Some mistakes such as "{X} =:= {}" are found by strong
%% validation as well as by qlc. Prefer the warnings from qlc:
+ %% The Compiler and qlc do not agree on the location of errors.
+ %% For now, qlc's messages about failing patterns and filters
+ %% are ignored.
+ ExtraWarnings = [W || W={_File,[{_,qlc,Tag}]} <-
+ ExtraWarnings0,
+ not lists:member(Tag, [nomatch_pattern,nomatch_filter])],
Warnings1 = mforms(Warnings0) --
([{File,[{L,v3_core,nomatch}]} ||
{File,[{L,qlc,M}]} <- mforms(ExtraWarnings),