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

            Bug ID: 35580
           Summary: Inconsistent -MD/-MG behavior
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: bo...@codesynthesis.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 19531
  --> https://bugs.llvm.org/attachment.cgi?id=19531&action=edit
Reproducing script.

The attached reproducer shows inconsistent behavior between -MD and -MG modes:

+ clang++ -w -MQ ^ -x c++ -MD -E -frewrite-includes -MF - -o unit.o.ii unit.cxx
unit.cxx:1:10: error: 'hello.hpp' file not found with <angled> include; use
"quotes" instead
#include <hello.hpp>
         ^~~~~~~~~~~
         "hello.hpp"
^: unit.cxx hello.hpp
1 error generated.
+ echo $?
1
+ clang++ -w -MQ ^ -x c++ -M -MG unit.cxx
^: unit.cxx hello.hpp
+ echo $?
0

It cannot be both an invalid include and a potentially generated header.

-- 
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