https://bugs.llvm.org/show_bug.cgi?id=36616

            Bug ID: 36616
           Summary: -Wheader-hygiene is failing on unified builds
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: sylves...@debian.org
                CC: dgre...@apple.com, e...@chromium.org,
                    llvm-bugs@lists.llvm.org

Some projects (ex firefox) are using some unified build technics.
This is causing -Wheader-hygiene to be unusable.

--- foo.cpp ---
#include "bar.cpp"

--- bar.cpp ---
$ cat bar.cpp 
using namespace std;

$ clang++-7 -c -Wheader-hygiene foo.cpp 
[...]
./bar.cpp:1:17: warning: using namespace directive in global context in header
      [-Wheader-hygiene]
2 warnings generated.

Maybe we should check for the extension of the file being included?!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to