Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
79b36285
Commit
79b36285
authored
12 years ago
by
Alexey Samsonov
Browse files
Options
Downloads
Patches
Plain Diff
[Sanitizer] Make lint checking a standalone script in sanitizer_common
llvm-svn: 162982
parent
de827cb4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler-rt/lib/sanitizer_common/scripts/check_lint.sh
+65
-0
65 additions, 0 deletions
compiler-rt/lib/sanitizer_common/scripts/check_lint.sh
with
65 additions
and
0 deletions
compiler-rt/lib/sanitizer_common/scripts/check_lint.sh
0 → 100755
+
65
−
0
View file @
79b36285
#!/bin/bash
set
-e
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
)
"
# Guess path to LLVM_CHECKOUT if not provided
if
[
"
${
LLVM_CHECKOUT
}
"
==
""
]
;
then
LLVM_CHECKOUT
=
"
${
SCRIPT_DIR
}
/../../../../../"
echo
"LLVM Checkout:
${
LLVM_CHECKOUT
}
"
fi
# Cpplint setup
cd
${
SCRIPT_DIR
}
if
[
!
-d
cpplint
]
;
then
svn co
-r82
http://google-styleguide.googlecode.com/svn/trunk/cpplint cpplint
fi
CPPLINT
=
${
SCRIPT_DIR
}
/cpplint/cpplint.py
# Filters
# TODO: remove some of these filters
ASAN_RTL_LINT_FILTER
=
-readability
/casting,-readability/check,-build/include,-build/header_guard,-build/class,-legal/copyright,-build/namespaces
ASAN_TEST_LINT_FILTER
=
-readability
/casting,-build/include,-legal/copyright,-whitespace/newline,-runtime/sizeof,-runtime/int,-runtime/printf,-build/header_guard
TSAN_RTL_LINT_FILTER
=
-legal
/copyright,-build/include,-readability/casting,-build/header_guard,-build/namespaces
TSAN_TEST_LINT_FILTER
=
${
TSAN_RTL_LINT_FILTER
}
,-runtime/threadsafe_fn,-runtime/int
cd
${
LLVM_CHECKOUT
}
# LLVM Instrumentation
LLVM_INSTRUMENTATION
=
lib/Transforms/Instrumentation
LLVM_LINT_FILTER
=
-,+whitespace
${
CPPLINT
}
--filter
=
${
LLVM_LINT_FILTER
}
${
LLVM_INSTRUMENTATION
}
/AddressSanitizer.cpp
\
${
LLVM_INSTRUMENTATION
}
/ThreadSanitizer.cpp
\
${
LLVM_INSTRUMENTATION
}
/BlackList.
*
COMPILER_RT
=
projects/compiler-rt
# Headers
SANITIZER_INCLUDES
=
${
COMPILER_RT
}
/include/sanitizer
${
CPPLINT
}
--filter
=
${
TSAN_RTL_LINT_FILTER
}
${
SANITIZER_INCLUDES
}
/
*
.h
# Sanitizer_common
COMMON_RTL
=
${
COMPILER_RT
}
/lib/sanitizer_common
${
CPPLINT
}
--filter
=
${
ASAN_RTL_LINT_FILTER
}
${
COMMON_RTL
}
/
*
.
{
cc,h
}
${
CPPLINT
}
--filter
=
${
TSAN_RTL_LINT_FILTER
}
${
COMMON_RTL
}
/tests/
*
.cc
#Interception
INTERCEPTION
=
${
COMPILER_RT
}
/lib/interception
${
CPPLINT
}
--filter
=
${
ASAN_RTL_LINT_FILTER
}
${
INTERCEPTION
}
/
*
.
{
cc,h
}
# ASan
ASAN_RTL
=
${
COMPILER_RT
}
/lib/asan
${
CPPLINT
}
--filter
=
${
ASAN_RTL_LINT_FILTER
}
${
ASAN_RTL
}
/
*
.
{
cc,h
}
${
CPPLINT
}
--filter
=
${
ASAN_TEST_LINT_FILTER
}
${
ASAN_RTL
}
/tests/
*
.
{
cc,h
}
\
${
ASAN_RTL
}
/output_tests/
*
.cc
${
CPPLINT
}
--filter
=
${
ASAN_TEST_LINT_FILTER
}
${
ASAN_RTL
}
/lit_tests/
*
.cc
\
${
ASAN_RTL
}
/lit_tests/Linux/
*
.cc
\
${
ASAN_RTL
}
/lit_tests/SharedLibs/
*
.cc
# TSan
TSAN_RTL
=
${
COMPILER_RT
}
/lib/tsan
${
CPPLINT
}
--filter
=
${
TSAN_RTL_LINT_FILTER
}
${
TSAN_RTL
}
/rtl/
*
.
{
cc,h
}
${
CPPLINT
}
--filter
=
${
TSAN_TEST_LINT_FILTER
}
${
TSAN_RTL
}
/rtl_tests/
*
.
{
cc,h
}
\
${
TSAN_RTL
}
/unit_tests/
*
.cc
\
${
TSAN_RTL
}
/output_tests/
*
.cc
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment