@@ -93,11 +93,7 @@ public:
set_location (make_location (m_loc, start, finish));
}
- cp_expr& maybe_add_location_wrapper ()
- {
- m_value = maybe_wrap_with_location (m_value, m_loc);
- return *this;
- }
+ cp_expr& maybe_add_location_wrapper ();
private:
tree m_value;
@@ -1642,6 +1638,16 @@ struct warning_sentinel
~warning_sentinel() { flag = val; }
};
+inline cp_expr&
+cp_expr::maybe_add_location_wrapper ()
+{
+ /* For now, don't add wrappers when processing template decls. */
+ if (!processing_template_decl)
+ m_value = maybe_wrap_with_location (m_value, m_loc);
+ return *this;
+}
+
+
/* The cached class binding level, from the most recently exited
class, or NULL if none. */