[PATCH] D48297: [Darwin] Add a warning for missing include path for libstdc++
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 18 14:59:16 PDT 2018
vsapsai added inline comments.
================
Comment at: lib/Frontend/InitHeaderSearch.cpp:374-377
+ IsBaseFound = AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2.1",
+ "powerpc-apple-darwin10", "",
+ "ppc64", triple);
+ IsBaseFound &= AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.0.0",
----------------
Why are you using `&=` here instead of `|=`? I haven't tested but I expect that either 4.2.1 will work or 4.0.0, you don't need both of them.
================
Comment at: lib/Frontend/InitHeaderSearch.cpp:404
}
+ if (!IsBaseFound && !LangOpts.CUDA)
+ Headers.getDiags().Report(SourceLocation(),
----------------
What is so special about CUDA? Is it OK to emit the warning for OpenCL, for instance?
================
Comment at: test/Frontend/warning-stdlibcxx-darwin.cpp:1-2
+// RUN: %clang -cc1 -triple arm64-apple-ios6.0.0 -isysroot %S/doesnotexist %s 2>&1 | FileCheck %s
+// CHECK: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead
----------------
Do you think there is a value in adding a test that does exactly what the warning suggests and verifies there are no warnings?
Repository:
rC Clang
https://reviews.llvm.org/D48297
More information about the cfe-commits
mailing list