Commit 538187f9 authored by Christian Dietrich's avatar Christian Dietrich
Browse files

plugin: ignore EmptyDecl

Too fool ccache, we add a spurious semi-colon in the global space. To
avoid warnings, which could slow down compilation, we have to suppress
the warnings and ignore the empty declaration in the visitor. The
warnings are only visible with -pedantic, which is no problem for the
data we have gathered so far.
parent 7074454f
......@@ -83,6 +83,7 @@ public:
bool VisitTranslationUnitDecl(const TranslationUnitDecl *Unit);
bool VisitVarDecl(const VarDecl *D);
/// Not interesting
bool VisitEmptyDecl(const EmptyDecl *) { return true; }
bool VisitTypedefDecl(const TypedefDecl *) { return true; }
bool VisitRecordDecl(const RecordDecl *D) { return true; }
......
#!/usr/bin/env bash
exec ${CCACHE} ${LLVM_C_COMPILER} "$@"
exec ${CCACHE} ${LLVM_C_COMPILER} "$@" -Wno-extra-semi
......@@ -5,8 +5,9 @@
if [[ ( " $@" =~ .*" -c".* ) && ( "$@" =~ .*" -o".* ) && ! ( "$@" =~ .*"/dev/null".* ) ]]; then
${LLVM_C_COMPILER} -fplugin=${PROJECT_BINARY_DIR}/src/libclang-hash.so \
-Xclang -plugin-arg-clang-hash -Xclang -stop-if-same-hash \
"$@"
-Xclang -plugin-arg-clang-hash -Xclang -stop-if-same-hash \
"$@" -Wno-extra-semi
else
${LLVM_C_COMPILER} "$@"
${LLVM_C_COMPILER} "$@" -Wno-extra-semi
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment