Bug 1167030 - Suppress MSVC warning C4661 in js/src. r=luke
authorJan de Mooij <jdemooij@mozilla.com>
Fri, 22 May 2015 13:39:59 +0200
changeset 266238 55f99ca025a4fa42ed8724cca629b8130585d606
parent 266237 b35c88257a9cf62257a3c236c7506f5ae0bc6990
child 266239 bee4bdb3624cc286895f534872ce89a84abb98b3
push id2231
push usermichael.l.comella@gmail.com
push dateFri, 22 May 2015 20:04:59 +0000
reviewersluke
bugs1167030
milestone41.0a1
Bug 1167030 - Suppress MSVC warning C4661 in js/src. r=luke
js/src/frontend/Parser.h
js/src/irregexp/RegExpParser.h
js/src/moz.build
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -688,17 +688,16 @@ class Parser : private JS::AutoGCRooter,
     bool checkAndPrepareLexical(bool isConst, const TokenPos& errorPos);
     Node makeInitializedLexicalBinding(HandlePropertyName name, bool isConst, const TokenPos& pos);
 
     Node newBindingNode(PropertyName* name, bool functionScope, VarContext varContext = HoistVars);
     bool checkDestructuring(BindData<ParseHandler>* data, Node left);
     bool checkDestructuringObject(BindData<ParseHandler>* data, Node objectPattern);
     bool checkDestructuringArray(BindData<ParseHandler>* data, Node arrayPattern);
     bool bindInitialized(BindData<ParseHandler>* data, Node pn);
-    bool bindDestructuringLHS(Node pn);
     bool makeSetCall(Node pn, unsigned msg);
     Node cloneDestructuringDefault(Node opn);
     Node cloneLeftHandSide(Node opn);
     Node cloneParseTree(Node opn);
 
     Node newNumber(const Token& tok) {
         return handler.newNumber(tok.number(), tok.decimalPoint(), tok.pos);
     }
--- a/js/src/irregexp/RegExpParser.h
+++ b/js/src/irregexp/RegExpParser.h
@@ -173,17 +173,16 @@ template <typename CharT>
 class RegExpParser
 {
   public:
     RegExpParser(frontend::TokenStream& ts, LifoAlloc* alloc,
                  const CharT* chars, const CharT* end, bool multiline_mode);
 
     RegExpTree* ParsePattern();
     RegExpTree* ParseDisjunction();
-    RegExpTree* ParseGroup();
     RegExpTree* ParseCharacterClass();
 
     // Parses a {...,...} quantifier and stores the range in the given
     // out parameters.
     bool ParseIntervalQuantifier(int* min_out, int* max_out);
 
     // Parses and returns a single escaped character.  The character
     // must not be 'b' or 'B' since they are usually handled specially.
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -533,16 +533,21 @@ if CONFIG['_MSC_VER']:
         SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661
     # Prevent floating point errors caused by VC++ optimizations
     # XXX We should add this to CXXFLAGS, too?
     CFLAGS += ['-fp:precise']
     # C4805 warns mixing bool with other integral types in computation.
     # But given the conversion from bool is specified, and this is a
     # pattern widely used in code in js/src, suppress this warning here.
     CXXFLAGS += ['-wd4805']
+    # C4661 ("no suitable definition provided for explicit template
+    # instantiation request") is emitted for all Parser methods that
+    # have a Parser<FullParseHandler> definition but no
+    # Parser<SyntaxParseHandler> definition, see bug 1167030.
+    CXXFLAGS += ['-wd4661']
     CXXFLAGS += ['-we4067', '-we4258', '-we4275']
 
 if CONFIG['OS_ARCH'] not in ('WINNT', 'HP-UX'):
     OS_LIBS += [
         'm',
     ]
 
 if CONFIG['OS_ARCH'] == 'FreeBSD':