Skip to content

Instantly share code, notes, and snippets.

@jollychang
Created October 13, 2015 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jollychang/4dfcd09a15a96bb691b8 to your computer and use it in GitHub Desktop.
Save jollychang/4dfcd09a15a96bb691b8 to your computer and use it in GitHub Desktop.
compile-fcp.sh
[jollychang@jollychangs-MBP infer]$ ./compile-fcp.sh
+++ dirname ./compile-fcp.sh
++ cd .
++ pwd
+ INFER_ROOT=/Users/jollychang/works/infer
+ PLUGIN_DIR=/Users/jollychang/works/infer/facebook-clang-plugins
+ CLANG_EXEC=/Users/jollychang/works/infer/facebook-clang-plugins/clang/bin/clang
+ '[' '!' -f /Users/jollychang/works/infer/facebook-clang-plugins/clang/bin/clang ']'
+ pushd /Users/jollychang/works/infer/facebook-clang-plugins
~/works/infer/facebook-clang-plugins ~/works/infer
++ uname
+ platform=Darwin
+ '[' Darwin == Linux ']'
+ make clean
make -C analyzer clean
make -C libtooling/atdlib clean
make -C libtooling clean
rm -rf xcode *~
+ make -C clang-ocaml clean
python ../libtooling/atdlib/extract_atd_from_cpp.py ../libtooling/build/ASTExporter.h.p | python ../libtooling/atdlib/normalize_names_in_atd.py > build/ast_inline.atd.p
clang -cc1 -E -traditional-cpp -w -P -main-file-name - -o - build/ast_inline.atd.p > build/ast_inline.atd
atdcat -i build/ast_inline.atd > build/clang_ast.atd
atdgen -t -o build/clang_ast build/clang_ast.atd
atdgen -j -o build/clang_ast build/clang_ast.atd
atdgen -v -o build/clang_ast build/clang_ast.atd
ocamldep -I build clang_ast_converter.ml clang_ast_main.ml clang_ast_main_test.ml clang_ast_named_decl_printer.ml clang_ast_proj_test.ml clang_ast_types.ml clang_ast_visit.ml clang_ast_yojson_validator.ml process.ml process_test.ml utils.ml utils_test.ml yojson_utils.ml yojson_utils_test.ml process.mli utils.mli yojson_utils.mli build/clang_ast_t.mli build/clang_ast_t.ml build/clang_ast_j.mli build/clang_ast_j.ml build/clang_ast_v.mli build/clang_ast_v.ml | sed -e 's/\([a-zA-Z0-9_]*\.cm.\)/build\/\1/g' | sed -e 's/build\/build\//build\//g' > .depend
rm -rf tests/*.out build
+ make
make -C analyzer all
clang++ -I/opt/boxen/homebrew/include -I./clang/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-uninitialized -Wno-missing-field-initializers -Wno-vla-extension -Wno-c99-extensions -O3 -DNDEBUG -I../clang/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-uninitialized -Wno-missing-field-initializers -Wno-vla-extension -Wno-c99-extensions -O3 -DNDEBUG -c PluginMain.cpp -o build/PluginMain.o
In file included from PluginMain.cpp:11:
In file included from ../clang/include/clang/StaticAnalyzer/Core/Checker.h:17:
In file included from ../clang/include/clang/Analysis/ProgramPoint.h:18:
In file included from ../clang/include/clang/Analysis/AnalysisContext.h:18:
In file included from ../clang/include/clang/AST/Decl.h:17:
In file included from ../clang/include/clang/AST/APValue.h:17:
In file included from ../clang/include/clang/Basic/LLVM.h:25:
../clang/include/llvm/ADT/None.h:22:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class NoneType { None };
^
In file included from PluginMain.cpp:11:
In file included from ../clang/include/clang/StaticAnalyzer/Core/Checker.h:17:
In file included from ../clang/include/clang/Analysis/ProgramPoint.h:18:
In file included from ../clang/include/clang/Analysis/AnalysisContext.h:18:
In file included from ../clang/include/clang/AST/Decl.h:17:
In file included from ../clang/include/clang/AST/APValue.h:18:
In file included from ../clang/include/llvm/ADT/APFloat.h:20:
In file included from ../clang/include/llvm/ADT/APInt.h:19:
In file included from ../clang/include/llvm/ADT/ArrayRef.h:14:
In file included from ../clang/include/llvm/ADT/SmallVector.h:18:
../clang/include/llvm/Support/AlignOf.h:53:10: error: unknown type name 'constexpr'
static constexpr unsigned Alignment =
^
../clang/include/llvm/Support/AlignOf.h:53:20: error: expected member name or ';' after declaration specifiers
static constexpr unsigned Alignment =
~~~~~~~~~~~~~~~~ ^
../clang/include/llvm/Support/AlignOf.h:59:42: error: use of undeclared identifier 'Alignment'
enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 };
^
../clang/include/llvm/Support/AlignOf.h:60:42: error: use of undeclared identifier 'Alignment'
enum { Alignment_GreaterEqual_4Bytes = Alignment >= 4 ? 1 : 0 };
^
../clang/include/llvm/Support/AlignOf.h:61:42: error: use of undeclared identifier 'Alignment'
enum { Alignment_GreaterEqual_8Bytes = Alignment >= 8 ? 1 : 0 };
^
../clang/include/llvm/Support/AlignOf.h:62:43: error: use of undeclared identifier 'Alignment'
enum { Alignment_GreaterEqual_16Bytes = Alignment >= 16 ? 1 : 0 };
^
../clang/include/llvm/Support/AlignOf.h:64:39: error: use of undeclared identifier 'Alignment'
enum { Alignment_LessEqual_2Bytes = Alignment <= 2 ? 1 : 0 };
^
../clang/include/llvm/Support/AlignOf.h:65:39: error: use of undeclared identifier 'Alignment'
enum { Alignment_LessEqual_4Bytes = Alignment <= 4 ? 1 : 0 };
^
../clang/include/llvm/Support/AlignOf.h:66:39: error: use of undeclared identifier 'Alignment'
enum { Alignment_LessEqual_8Bytes = Alignment <= 8 ? 1 : 0 };
^
../clang/include/llvm/Support/AlignOf.h:67:40: error: use of undeclared identifier 'Alignment'
enum { Alignment_LessEqual_16Bytes = Alignment <= 16 ? 1 : 0 };
^
../clang/include/llvm/Support/AlignOf.h:71:23: error: unknown type name 'constexpr'
template <typename T> constexpr unsigned AlignOf<T>::Alignment;
^
../clang/include/llvm/Support/AlignOf.h:71:33: error: expected unqualified-id
template <typename T> constexpr unsigned AlignOf<T>::Alignment;
^
In file included from PluginMain.cpp:11:
In file included from ../clang/include/clang/StaticAnalyzer/Core/Checker.h:17:
In file included from ../clang/include/clang/Analysis/ProgramPoint.h:18:
In file included from ../clang/include/clang/Analysis/AnalysisContext.h:18:
In file included from ../clang/include/clang/AST/Decl.h:17:
In file included from ../clang/include/clang/AST/APValue.h:18:
In file included from ../clang/include/llvm/ADT/APFloat.h:20:
In file included from ../clang/include/llvm/ADT/APInt.h:19:
In file included from ../clang/include/llvm/ADT/ArrayRef.h:14:
../clang/include/llvm/ADT/SmallVector.h:229:20: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
void push_back(T &&Elt) {
^
../clang/include/llvm/ADT/SmallVector.h:349:45: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
SmallVectorImpl(const SmallVectorImpl&) = delete;
^
../clang/include/llvm/ADT/SmallVector.h:438:20: error: no type named 'initializer_list' in namespace 'std'
void append(std::initializer_list<T> IL) {
~~~~~^
../clang/include/llvm/ADT/SmallVector.h:438:36: error: expected ')'
void append(std::initializer_list<T> IL) {
^
../clang/include/llvm/ADT/SmallVector.h:438:14: note: to match this '('
void append(std::initializer_list<T> IL) {
^
../clang/include/llvm/ADT/SmallVector.h:450:20: error: no type named 'initializer_list' in namespace 'std'
void assign(std::initializer_list<T> IL) {
~~~~~^
../clang/include/llvm/ADT/SmallVector.h:450:36: error: expected ')'
void assign(std::initializer_list<T> IL) {
^
../clang/include/llvm/ADT/SmallVector.h:450:14: note: to match this '('
void assign(std::initializer_list<T> IL) {
^
../clang/include/llvm/ADT/SmallVector.h:481:33: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
iterator insert(iterator I, T &&Elt) {
^
../clang/include/llvm/ADT/SmallVector.h:648:32: error: no type named 'initializer_list' in namespace 'std'
void insert(iterator I, std::initializer_list<T> IL) {
~~~~~^
../clang/include/llvm/ADT/SmallVector.h:648:48: error: expected ')'
void insert(iterator I, std::initializer_list<T> IL) {
^
../clang/include/llvm/ADT/SmallVector.h:648:14: note: to match this '('
void insert(iterator I, std::initializer_list<T> IL) {
^
../clang/include/llvm/ADT/SmallVector.h:652:21: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... ArgTypes> void emplace_back(ArgTypes &&... Args) {
^
../clang/include/llvm/ADT/SmallVector.h:652:62: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template <typename... ArgTypes> void emplace_back(ArgTypes &&... Args) {
^
../clang/include/llvm/ADT/SmallVector.h:661:46: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
SmallVectorImpl &operator=(SmallVectorImpl &&RHS);
^
../clang/include/llvm/ADT/SmallVector.h:383:12: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (auto I = this->end(), E = this->begin() + N; I != E; ++I)
^
../clang/include/llvm/ADT/SmallVector.h:439:12: error: use of undeclared identifier 'IL'
append(IL.begin(), IL.end());
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
8 warnings and 20 errors generated.
make[1]: *** [build/PluginMain.o] Error 1
make: *** [all] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment