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

            Bug ID: 23951
           Summary: __has_include not reported by "clang -dM -E - <
                    /dev/null"
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

__has_include (and also *_next) is *not* reported by "clang -dM -E - <
/dev/null" but it's there:

~/work/clang-bugs % clang-3.6 --version                                         
Ubuntu clang version 3.6.0-2ubuntu1~trusty1 (tags/RELEASE_360/final) (based on
LLVM 3.6.0)
Target: x86_64-pc-linux-gnu
Thread model: posix

~/work/clang-bugs % cat confirmPredefinedHasIncludeMacro.cpp 
#if defined(__has_include)
#  error "OK, __has_include"
#endif

~/work/clang-bugs % clang-3.6 -dM -E - < /dev/null | grep has_include
zsh: done       clang-3.6 -dM -E - < /dev/null | 
zsh: exit 1     grep --color=auto has_include


By the way, is this the preferred way to check for predefined macros in clang?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to