<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 - -Wextra-semi shouldn't report semicolons in macros entirely in system headers"
   href="https://bugs.llvm.org/show_bug.cgi?id=40874">40874</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-Wextra-semi shouldn't report semicolons in macros entirely in system headers
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>nicolasweber@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>Consider this ATL code:

thakis@thakis:~/src/chrome/src$ cat test.cc
#include <atlbase.h>
#include <atlcom.h>

class __declspec(uuid("00000000-0000-0000-c000-000000000046"))
    GaiaCredentialProvider {};

EXTERN_C const CLSID CLSID_GaiaCredentialProvider;

class CGaiaCredentialProvider
    : public CComObjectRootEx<CComMultiThreadModel>,
      public CComCoClass<CGaiaCredentialProvider,
                         &CLSID_GaiaCredentialProvider> {
 public:
  DECLARE_NO_REGISTRY()

  BEGIN_COM_MAP(CGaiaCredentialProvider)
  END_COM_MAP()
};

OBJECT_ENTRY_AUTO(__uuidof(GaiaCredentialProvider), CGaiaCredentialProvider)

thakis@thakis:~/src/chrome/src$
third_party/llvm-build/Release+Asserts/bin/clang-cl -c test.cc -imsvc
third_party/depot_tools/win_toolchain/vs_files/818a152b3f1da991c1725d85be19a0f27af6bab4/VC/Tools/MSVC/14.16.27023/atlmfc/include
-imsvc
third_party/depot_tools/win_toolchain/vs_files/818a152b3f1da991c1725d85be19a0f27af6bab4/win_sdk/Include/10.0.17763.0/ucrt/
-imsvc
third_party/depot_tools/win_toolchain/vs_files/818a152b3f1da991c1725d85be19a0f27af6bab4/VC/Tools/MSVC/14.16.27023/include/
-imsvc
third_party/depot_tools/win_toolchain/vs_files/818a152b3f1da991c1725d85be19a0f27af6bab4/win_sdk/Include/10.0.17763.0/um
-imsvc
third_party/depot_tools/win_toolchain/vs_files/818a152b3f1da991c1725d85be19a0f27af6bab4/win_sdk/Include/10.0.17763.0/shared/
-Wextra-semi
test.cc(20,1):  warning: extra ';' outside of a function is incompatible with
C++98 [-Wc++98-compat-extra-semi]
OBJECT_ENTRY_AUTO(__uuidof(GaiaCredentialProvider), CGaiaCredentialProvider)
^
third_party/depot_tools/win_toolchain/vs_files/818a152b3f1da991c1725d85be19a0f27af6bab4/VC/Tools/MSVC/14.16.27023/atlmfc/include/atlcom.h(2407,2):
 note: 
      expanded from macro 'OBJECT_ENTRY_AUTO'
        OBJECT_ENTRY_PRAGMA(class)
        ^
third_party/depot_tools/win_toolchain/vs_files/818a152b3f1da991c1725d85be19a0f27af6bab4/VC/Tools/MSVC/14.16.27023/atlmfc/include/atlcom.h(2396,91):
 note: 
      expanded from macro 'OBJECT_ENTRY_PRAGMA'
#define OBJECT_ENTRY_PRAGMA(class) __pragma(comment(linker,
"/include:__pobjMap_" #class));
                                                                               
          ^
1 warning generated.





-Wextra-semi complains about this, even though no part of the macro expansion
that adds the extra semicolon is in user code. clang shouldn't emit
-Wextra-semi for semicolons are 100% in system headers.</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>