<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Wmissing-variable-declarations for variable templates with auto deduction"
   href="https://bugs.llvm.org/show_bug.cgi?id=42042">42042</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Wmissing-variable-declarations for variable templates with auto deduction
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mark.sonnentag@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi,

Clang reports missing-variable-declarations for variable templates if the type
is auto deduced, whereas no warning is reported if the type is specified:

/////////////////////////////////////////////////////////

// no warning:
template<typename T>
constexpr bool foo = T{};

// warning: no previous extern declaration for non-static variable 
// auto_foo<bool>
template<typename T>
constexpr auto auto_foo = T{};


int main(){
    foo<bool>;
    auto_foo<bool>;
}


////////////////////////////////////////////////////////
Apparently Clang reported the same warning for variable templates with specific
types before (<a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - -Wmissing-variable-declarations warnings trigger on inline variables and variable temples"
   href="show_bug.cgi?id=35862">bug 35862</a>).</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>