<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Don,<br>
    <br>
    I removed the extra "-I" directives but I still get the same result.<br>
    <br>
    <blockquote type="cite">
      <div>Hi Paul:</div>
      <div><br>
      </div>
      Why are you explicitly including .../c++/4.2.1? 
      <div><br>
      </div>
      <div>If clang was compiled correctly, it should be able to find
        it's own c++ headers -- on OSX, that's most likely libc++
        headers.  Try running:</div>
      <div><br>
      </div>
      <div>
        <pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);word-wrap:normal;color:rgb(36,39,41)"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;white-space:inherit">clang++ -v -c -x c++ - < /dev/null</code></pre>
      </div>
      <div class="gmail_quote">hth...</div>
      <div class="gmail_quote">don</div>
      <div class="gmail_quote"><br>
      </div>
    </blockquote>
    <br>
    <blockquote type="cite">On Fri, Dec 23, 2016 at 10:12 AM, icloud via
      cfe-dev <span dir="ltr"><<a
          href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span>
      wrote:<br>
      <p> </p>
      I am writing a parser for c++. <br>
      <br>
      I am developing on a Mac. OS X Sierra 10.12.1 <br>
      <br>
      I am frustrated by the fact that I cannot compile even the
      simplest c++ code because clang 4.0 finds errors in the clang
      headers themselves! for example: <br>
      <br>
      #include "clang/AST/ASTContext.h" <br>
      #include "clang/AST/ASTConsumer.h" <br>
      #include "clang/AST/
      <div class="m_-1924487469993077611moz-text-flowed"
        style="font-family:-moz-fixed;font-size:12px" lang="x-unicode"><wbr>#include
        "clang/RecursiveASTVisitor.h" <br>
        #include "clang/Frontend/ASTConsumers.<wbr>h" <br>
        #include "clang/Frontend/<wbr>FrontendActions.h" <br>
        #include "clang/Frontend/<wbr>CompilerInstance.h" <br>
        #include "clang/Tooling/<wbr>CommonOptionsParser.h" <br>
        #include "clang/Tooling/Tooling.h" <br>
        #include "clang/Rewrite/Core/Rewriter.<wbr>h" <br>
        #include "llvm/Support/raw_ostream.h" <br>
        #include <string> <br>
        #include <memory> <br>
        <br>
        <br>
        int main( void ) <br>
        { <br>
            return 0; <br>
        } <br>
        <br>
        <br>
        --- <br>
        <br>
      </div>
    </blockquote>
    I have been trying to solve this by examining others' Makefiles but
    to no avail.<br>
    This is the result of my latest effort:<br>
    <br>
     50%] Building CXX object CMakeFiles/testProject.dir/main.cpp.o<br>
    In file included from /Users/paul/Temp/test/src/main.cpp:1:<br>
    In file included from /usr/local/include/clang/AST/AST.h:18:<br>
    In file included from /usr/local/include/clang/AST/ASTContext.h:18:<br>
    In file included from
    /usr/local/include/clang/AST/ASTTypeTraits.h:20:<br>
    In file included from /usr/local/include/clang/AST/Decl.h:17:<br>
    In file included from /usr/local/include/clang/AST/APValue.h:18:<br>
    In file included from /usr/local/include/llvm/ADT/APFloat.h:20:<br>
    In file included from /usr/local/include/llvm/ADT/APInt.h:20:<br>
    /usr/local/include/llvm/Support/MathExtras.h:248:1: error: unknown
    type name 'constexpr'<br>
    constexpr inline uint32_t Hi_32(uint64_t Value) {<br>
    ^<br>
    /usr/local/include/llvm/Support/MathExtras.h:248:11: error: expected
    unqualified-id<br>
    constexpr inline uint32_t Hi_32(uint64_t Value) {<br>
              ^<br>
    /usr/local/include/llvm/Support/MathExtras.h:253:1: error: unknown
    type name 'constexpr'<br>
    constexpr inline uint32_t Lo_32(uint64_t Value) {<br>
    ^<br>
    /usr/local/include/llvm/Support/MathExtras.h:253:11: error: expected
    unqualified-id<br>
    constexpr inline uint32_t Lo_32(uint64_t Value) {<br>
              ^<br>
    /usr/local/include/llvm/Support/MathExtras.h:259:1: error: unknown
    type name 'constexpr'<br>
    constexpr inline uint64_t Make_64(uint32_t High, uint32_t Low) {<br>
    ^<br>
    /usr/local/include/llvm/Support/MathExtras.h:259:11: error: expected
    unqualified-id<br>
    constexpr inline uint64_t Make_64(uint32_t High, uint32_t Low) {<br>
              ^<br>
    /usr/local/include/llvm/Support/MathExtras.h:264:23: error: unknown
    type name 'constexpr'<br>
    template <unsigned N> constexpr inline bool isInt(int64_t x) {<br>
                          ^<br>
    /usr/local/include/llvm/Support/MathExtras.h:264:33: error: expected
    unqualified-id<br>
    template <unsigned N> constexpr inline bool isInt(int64_t x) {<br>
                                    ^<br>
    /usr/local/include/llvm/Support/MathExtras.h:710:10: error: use of
    undeclared identifier 'alignTo'<br>
      return alignTo(Value, Align) - Value;<br>
             ^<br>
    /usr/local/include/llvm/Support/MathExtras.h:715:23: error: unknown
    type name 'constexpr'<br>
    template <unsigned B> constexpr inline int32_t
    SignExtend32(uint32_t X) {<br>
                          ^<br>
    /usr/local/include/llvm/Support/MathExtras.h:715:33: error: expected
    unqualified-id<br>
    template <unsigned B> constexpr inline int32_t
    SignExtend32(uint32_t X) {<br>
                                    ^<br>
    In file included from /Users/paul/Temp/test/src/main.cpp:1:<br>
    In file included from /usr/local/include/clang/AST/AST.h:18:<br>
    In file included from /usr/local/include/clang/AST/ASTContext.h:18:<br>
    In file included from
    /usr/local/include/clang/AST/ASTTypeTraits.h:20:<br>
    In file included from /usr/local/include/clang/AST/Decl.h:17:<br>
    In file included from /usr/local/include/clang/AST/APValue.h:18:<br>
    In file included from /usr/local/include/llvm/ADT/APFloat.h:20:<br>
    /usr/local/include/llvm/ADT/APInt.h:393:14: error: use of undeclared
    identifier 'isPowerOf2_64'<br>
          return isPowerOf2_64(VAL);<br>
                 ^<br>
    /usr/local/include/llvm/ADT/APInt.h:1387:20: error: no member named
    'countTrailingOnes' in namespace 'llvm'; did you mean
    'countTrailingZeros'?<br>
          return llvm::countTrailingOnes(VAL);<br>
                 ~~~~~~^<br>
    /usr/local/include/llvm/Support/MathExtras.h:111:13: note:
    'countTrailingZeros' declared here<br>
    std::size_t countTrailingZeros(T Val, ZeroBehavior ZB = ZB_Width) {<br>
                ^<br>
    In file included from /Users/paul/Temp/test/src/main.cpp:1:<br>
    In file included from /usr/local/include/clang/AST/AST.h:18:<br>
    In file included from /usr/local/include/clang/AST/ASTContext.h:18:<br>
    In file included from
    /usr/local/include/clang/AST/ASTTypeTraits.h:20:<br>
    In file included from /usr/local/include/clang/AST/Decl.h:17:<br>
    In file included from /usr/local/include/clang/AST/APValue.h:18:<br>
    In file included from /usr/local/include/llvm/ADT/APFloat.h:20:<br>
    /usr/local/include/llvm/ADT/APInt.h:1399:20: error: no member named
    'countPopulation' in namespace 'llvm'<br>
          return llvm::countPopulation(VAL);<br>
                 ~~~~~~^<br>
    In file included from /Users/paul/Temp/test/src/main.cpp:1:<br>
    In file included from /usr/local/include/clang/AST/AST.h:18:<br>
    In file included from /usr/local/include/clang/AST/ASTContext.h:18:<br>
    In file included from
    /usr/local/include/clang/AST/ASTTypeTraits.h:20:<br>
    In file included from /usr/local/include/clang/AST/Decl.h:17:<br>
    In file included from /usr/local/include/clang/AST/APValue.h:18:<br>
    /usr/local/include/llvm/ADT/APFloat.h:661:15: error: union member
    'IEEE' has a non-trivial copy constructor<br>
        IEEEFloat IEEE;<br>
                  ^<br>
    /usr/local/include/llvm/ADT/APFloat.h:224:3: note: because type
    'llvm::detail::IEEEFloat' has a user-provided copy constructor<br>
      IEEEFloat(const IEEEFloat &);<br>
      ^<br>
    /usr/local/include/llvm/ADT/APFloat.h:662:19: error: union member
    'Double' has a non-trivial copy constructor<br>
        DoubleAPFloat Double;<br>
                      ^<br>
    /usr/local/include/llvm/ADT/APFloat.h:617:3: note: because type
    'llvm::detail::DoubleAPFloat' has a user-provided copy constructor<br>
      DoubleAPFloat(const DoubleAPFloat &RHS);<br>
      ^<br>
    /usr/local/include/llvm/ADT/APFloat.h:750:35: error: too many
    arguments provided to function-like macro invocation<br>
                      std::is_same<T, DoubleAPFloat>::value, "");<br>
                                      ^<br>
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:596:9:
    note: macro 'static_assert' defined here<br>
    #define static_assert(__b, __m) \<br>
            ^<br>
    In file included from /Users/paul/Temp/test/src/main.cpp:1:<br>
    In file included from /usr/local/include/clang/AST/AST.h:18:<br>
    In file included from /usr/local/include/clang/AST/ASTContext.h:18:<br>
    In file included from
    /usr/local/include/clang/AST/ASTTypeTraits.h:20:<br>
    In file included from /usr/local/include/clang/AST/Decl.h:17:<br>
    In file included from /usr/local/include/clang/AST/APValue.h:18:<br>
    /usr/local/include/llvm/ADT/APFloat.h:749:5: error: use of
    undeclared identifier 'static_assert'<br>
        static_assert(std::is_same<T, IEEEFloat>::value ||<br>
        ^<br>
    In file included from /Users/paul/Temp/test/src/main.cpp:1:<br>
    In file included from /usr/local/include/clang/AST/AST.h:18:<br>
    In file included from /usr/local/include/clang/AST/ASTContext.h:18:<br>
    In file included from
    /usr/local/include/clang/AST/ASTTypeTraits.h:20:<br>
    In file included from /usr/local/include/clang/AST/Decl.h:17:<br>
    In file included from /usr/local/include/clang/AST/APValue.h:20:<br>
    In file included from
    /usr/local/include/llvm/ADT/PointerIntPair.h:18:<br>
    /usr/local/include/llvm/Support/PointerLikeTypeTraits.h:45:61:
    error: 'T' does not refer to a value<br>
      enum { NumLowBitsAvailable =
    detail::ConstantLog2<alignof(T)>::value };<br>
                                                                ^<br>
    /usr/local/include/llvm/Support/PointerLikeTypeTraits.h:40:20: note:
    declared here<br>
    template <typename T> class PointerLikeTypeTraits<T *> {<br>
                       ^<br>
    fatal error: too many errors emitted, stopping now [-ferror-limit=]<br>
    20 errors generated.<br>
    make[2]: *** [CMakeFiles/testProject.dir/main.cpp.o] Error 1<br>
    make[1]: *** [CMakeFiles/testProject.dir/all] Error 2<br>
    make: *** [all] Error 2<br>
    <br>
    <blockquote type="cite">
      <div class="m_-1924487469993077611moz-text-flowed"
        style="font-family:-moz-fixed;font-size:12px" lang="x-unicode">
        Help will be greatly appreciated. <br>
        <span class="HOEnZb"><font color="#888888"> </font></span></div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 

Paul</pre>
  </body>
</html>