Clang rejects using decl in third_party/android_platform/bionic/tools/relocation_packer/src/debug.h |
||
Issue descriptionRichard changed clang, and it rejects this code as invalid now: https://cs.corp.google.com/aosp-marshmallow/bionic/tools/relocation_packer/src/debug.h FAILED: clang_x64/obj/third_party/android_platform/android_lib_relocation_packer/debug.o ... In file included from ../../third_party/android_platform/bionic/tools/relocation_packer/src/debug.cc:5: ../../third_party/android_platform/bionic/tools/relocation_packer/src/debug.h:84:20: error: using declaration cannot refer to class member using LogSeverity::INFO; ~~~~~~~~~~~~~^ ../../third_party/android_platform/bionic/tools/relocation_packer/src/debug.h:85:20: error: using declaration cannot refer to class member using LogSeverity::WARNING; ~~~~~~~~~~~~~^ ../../third_party/android_platform/bionic/tools/relocation_packer/src/debug.h:86:20: error: using declaration cannot refer to class member using LogSeverity::ERROR; ~~~~~~~~~~~~~^ ../../third_party/android_platform/bionic/tools/relocation_packer/src/debug.h:87:20: error: using declaration cannot refer to class member using LogSeverity::FATAL; ~~~~~~~~~~~~~^ 4 errors generated. This turned our Android ASan TOT bot red: https://build.chromium.org/p/chromium.fyi/builders/ClangToTAndroidASan/builds/3093/ We should fix this upstream because the Android people will want to roll clang at some point too.
,
May 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4fbaaecb9433f9503946be68d0ecef63a1b4a164 commit 4fbaaecb9433f9503946be68d0ecef63a1b4a164 Author: rnk <rnk@chromium.org> Date: Thu May 05 21:57:09 2016 Fix invalid using decl in bionic relocation_packer The code was essentially doing 'using Logger::INFO' in the global namespace to make its 'LOG(INFO)' macros work. Unfortunately, C++ does not allow you to use using decls on classes like this unless you are in a derived class. GCC does not accept this code, and Clang was recently updated (LLVM r268594) to reject it as well. This should fix the Chromium Android ASan build with TOT Clang: https://build.chromium.org/p/chromium.fyi/builders/ClangToTAndroidASan/ I'll send this patch along to AOSP after fixing it here. R=thakis@chromium.org,sgurun@chromium.org BUG= 609543 Review-Url: https://codereview.chromium.org/1953863002 Cr-Commit-Position: refs/heads/master@{#391920} [modify] https://crrev.com/4fbaaecb9433f9503946be68d0ecef63a1b4a164/third_party/android_platform/README.chromium [modify] https://crrev.com/4fbaaecb9433f9503946be68d0ecef63a1b4a164/third_party/android_platform/bionic/tools/relocation_packer/src/debug.h
,
May 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0e51f7ced0481ce1d31933c64519d0842a52b5c9 commit 0e51f7ced0481ce1d31933c64519d0842a52b5c9 Author: rnk <rnk@chromium.org> Date: Thu May 05 22:18:55 2016 Revert of Fix invalid using decl in bionic relocation_packer (patchset #1 id:1 of https://codereview.chromium.org/1953863002/ ) Reason for revert: Broke Android builds due to missing namespace qualifier Original issue's description: > Fix invalid using decl in bionic relocation_packer > > The code was essentially doing 'using Logger::INFO' in the global > namespace to make its 'LOG(INFO)' macros work. Unfortunately, C++ does > not allow you to use using decls on classes like this unless you are in > a derived class. GCC does not accept this code, and Clang was recently > updated (LLVM r268594) to reject it as well. > > This should fix the Chromium Android ASan build with TOT Clang: > https://build.chromium.org/p/chromium.fyi/builders/ClangToTAndroidASan/ > > I'll send this patch along to AOSP after fixing it here. > > R=thakis@chromium.org,sgurun@chromium.org > BUG= 609543 > > Committed: https://crrev.com/4fbaaecb9433f9503946be68d0ecef63a1b4a164 > Cr-Commit-Position: refs/heads/master@{#391920} TBR=sgurun@chromium.org,thakis@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 609543 Review-Url: https://codereview.chromium.org/1959513002 Cr-Commit-Position: refs/heads/master@{#391923} [modify] https://crrev.com/0e51f7ced0481ce1d31933c64519d0842a52b5c9/third_party/android_platform/README.chromium [modify] https://crrev.com/0e51f7ced0481ce1d31933c64519d0842a52b5c9/third_party/android_platform/bionic/tools/relocation_packer/src/debug.h
,
May 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5762af8ad13e62957493c3e4314a234ee57a4200 commit 5762af8ad13e62957493c3e4314a234ee57a4200 Author: rnk <rnk@chromium.org> Date: Thu May 05 23:44:34 2016 Re-land "Fix invalid using decl in bionic relocation_packer" This time with more namespace qualification. Tested manually by building clang_x64/android_relocation_packer locally, as the Android trybot analyze step does not think it needs to run for this change. Original description: > The code was essentially doing 'using Logger::INFO' in the global > namespace to make its 'LOG(INFO)' macros work. Unfortunately, C++ does > not allow you to use using decls on classes like this unless you are in > a derived class. GCC does not accept this code, and Clang was recently > updated (LLVM r268594) to reject it as well. > > This should fix the Chromium Android ASan build with TOT Clang: > https://build.chromium.org/p/chromium.fyi/builders/ClangToTAndroidASan/ TBR=thakis@chromium.org,sgurun@chromium.org BUG= 609543 Review-Url: https://codereview.chromium.org/1952353005 Cr-Commit-Position: refs/heads/master@{#391952} [modify] https://crrev.com/5762af8ad13e62957493c3e4314a234ee57a4200/third_party/android_platform/README.chromium [modify] https://crrev.com/5762af8ad13e62957493c3e4314a234ee57a4200/third_party/android_platform/bionic/tools/relocation_packer/src/debug.h
,
Aug 10 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by r...@chromium.org
, May 5 2016