diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-15 19:00:30 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-15 19:00:30 +0000 |
commit | 241109b52c26585ba262e95f7f07fda23307cc27 (patch) | |
tree | d9864bdf4b32568849f8fbef978936b1ab4bf47a /tools | |
parent | 0822d88ca6c5451ab3553cca1a603ebfc575dc40 (diff) | |
download | chromium_src-241109b52c26585ba262e95f7f07fda23307cc27.zip chromium_src-241109b52c26585ba262e95f7f07fda23307cc27.tar.gz chromium_src-241109b52c26585ba262e95f7f07fda23307cc27.tar.bz2 |
roll clang 140930:142072
Also add a --run-tests parameter to update.sh
The plugin change is required due to http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20111010/047769.html
BUG=none
TEST=none
TBR=hans
Review URL: http://codereview.chromium.org/8247005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105679 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r-- | tools/clang/plugins/ChromeClassTester.cpp | 2 | ||||
-rw-r--r-- | tools/clang/plugins/tests/virtual_methods.h | 13 | ||||
-rwxr-xr-x | tools/clang/scripts/update.sh | 12 |
3 files changed, 25 insertions, 2 deletions
diff --git a/tools/clang/plugins/ChromeClassTester.cpp b/tools/clang/plugins/ChromeClassTester.cpp index 3bcbf58..f7b9e02 100644 --- a/tools/clang/plugins/ChromeClassTester.cpp +++ b/tools/clang/plugins/ChromeClassTester.cpp @@ -177,7 +177,7 @@ std::string ChromeClassTester::GetNamespaceImpl(const DeclContext* context, if (decl->isAnonymousNamespace()) OS << "<anonymous namespace>"; else - OS << decl; + OS << *decl; return GetNamespaceImpl(context->getParent(), OS.str()); } diff --git a/tools/clang/plugins/tests/virtual_methods.h b/tools/clang/plugins/tests/virtual_methods.h index cb1846e..d256f07 100644 --- a/tools/clang/plugins/tests/virtual_methods.h +++ b/tools/clang/plugins/tests/virtual_methods.h @@ -23,4 +23,17 @@ class WarnOnMissingVirtual : public VirtualMethodsInHeaders { void MethodHasNoArguments(); }; +// Don't complain about things in a 'testing' namespace. +namespace testing { +struct TestStruct {}; +} // namespace testing + +class VirtualMethodsInHeadersTesting : public VirtualMethodsInHeaders { + public: + // Don't complain about no virtual testing methods. + void MethodHasNoArguments(); + private: + testing::TestStruct tester_; +}; + #endif // VIRTUAL_METHODS_H_ diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh index b14d8a8..5ae8b2a 100755 --- a/tools/clang/scripts/update.sh +++ b/tools/clang/scripts/update.sh @@ -27,6 +27,7 @@ OS="$(uname -s)" # Parse command line options. force_local_build= mac_only= +run_tests= while [[ $# > 0 ]]; do case $1 in --force-local-build) @@ -35,10 +36,14 @@ while [[ $# > 0 ]]; do --mac-only) mac_only=yes ;; + --run-tests) + run_tests=yes + ;; --help) - echo "usage: $0 [--force-local-build] [--mac-only] " + echo "usage: $0 [--force-local-build] [--mac-only] [--run-tests] " echo "--force-local-build: Don't try to download prebuilt binaries." echo "--mac-only: Do nothing on non-Mac systems." + echo "--run-tests: Run tests after building. Only for local builds." exit 1 ;; esac @@ -208,5 +213,10 @@ mkdir -p "${PLUGIN_BUILD_DIR}" cp "${PLUGIN_SRC_DIR}/Makefile" "${PLUGIN_BUILD_DIR}" make -j"${NUM_JOBS}" -C "${PLUGIN_BUILD_DIR}" +if [[ -n "$run_tests" ]]; then + # Run a few tests. + "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" +fi + # After everything is done, log success for this revision. echo "${CLANG_REVISION}" > "${STAMP_FILE}" |