[PATCH] D107323: [clang-tidy] Add skip-headers; use skipLocation and setTraversalScope

2021-08-18 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 367331. chh added a comment. fix windows test failure CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107323/new/ https://reviews.llvm.org/D107323 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-extra/clang-tidy/ClangTidyCheck.h clang

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, LocationFilter

2021-08-18 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 367330. chh added a comment. fix windows test failure CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98709/new/ https://reviews.llvm.org/D98709 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-extra/clang-tidy/ClangTidyCheck.h clang-t

[PATCH] D107323: [clang-tidy] Add skip-headers; use skipLocation and setTraversalScope

2021-08-17 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 367120. chh edited the summary of this revision. chh added a comment. Factor out LocationFilter; improve more tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107323/new/ https://reviews.llvm.org/D107323 Files: clang-tools-extra/clang-tidy/ClangT

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, LocationFilter

2021-08-17 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 367117. chh retitled this revision from "[clang-tidy] New feature --skip-headers, part 1, LocFilter" to "[clang-tidy] New feature --skip-headers, part 1, LocationFilter". chh edited the summary of this revision. chh added a comment. Factor out LocationFilter; im

[PATCH] D107323: [clang-tidy] Add skip-headers; use skipLocation and setTraversalScope

2021-08-02 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. Herald added subscribers: kbarton, xazax.hun, nemanjai. chh requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. [clang-tidy] Add skip-headers; use skipLocation and setTraversalScope - This depends on http

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, LocFilter

2021-07-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. This is enhanced implementation over D98710 , to handle the new found failed test cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98709/new/ https://reviews.llvm.org/D98709 ___ cfe-c

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1, setTraversalScope

2021-07-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 362704. chh added a comment. sync to the latest source; apply clang-format; add new skip-headers-4.cpp test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp c

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, LocFilter

2021-07-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 362702. chh added a comment. sync to the latest source; apply clang-format; add new skip-headers-4.cpp test; skip modernize-use-nullptr warnings in header files in UseNullptrCheck.cpp CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98709/new/ https://revi

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, LocFilter

2021-07-27 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 362262. chh added a comment. apply clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98709/new/ https://reviews.llvm.org/D98709 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-extra/clang-tidy/ClangTidyCheck.cpp clang-tools

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1, setTraversalScope

2021-07-27 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 362239. chh edited the summary of this revision. chh added a comment. Add new test cases into misc-unused-using-decls.cpp. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: clang-tools-extra/clang-tidy/Cl

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, LocFilter

2021-07-27 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 362216. chh edited the summary of this revision. chh added a comment. - Use clang-format layout in ClangTidy.cpp and ClangTidyModule.h. - Fix misc-unused-using-decls false-positive warning from --skip-headers. - UnusedUsingDeclsCheck is now registered as an AllF

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1, setTraversalScope

2021-07-26 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 361871. chh added a comment. add skip-headers-3.cpp test to show that checking only Decl locations is not enough to skip some warnings in header files CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: cl

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, LocFilter

2021-07-26 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 361870. chh added a comment. add skip-headers-3.cpp test to show that checking only Decl locations is not enough to skip some warnings in header files CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98709/new/ https://reviews.llvm.org/D98709 Files: cl

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, LocFilter

2021-07-23 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 361295. chh retitled this revision from "[clang-tidy] New feature --skip-headers, part 1, skip Decls" to "[clang-tidy] New feature --skip-headers, part 1, LocFilter". chh edited the summary of this revision. chh added a comment. Add an AllFileFinder for checks th

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1, setTraversalScope

2021-07-22 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Some Android developers and legacy code care less about clang-tidy warnings. Newer developers spend a lot of time to get lint-free new code. So Android source tree has a lot of clang-tidy flags like header-filter, checks, and warnings-as-errors to select checks for different m

[PATCH] D106516: to run test only

2021-07-21 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 360688. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106516/new/ https://reviews.llvm.org/D106516 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang/include/clang/ASTMatchers/ASTMatchFinder.h clang/include/clang/Frontend/MultiplexConsumer.h

[PATCH] D106516: to run test only

2021-07-21 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. chh requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. DO NOT SUBMIT. Only to run tests. https://reviews.llvm.org/D106516 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp Index: clang-tools-extra/

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1, setTraversalScope

2021-07-21 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 360651. chh edited the summary of this revision. chh added a comment. Add one more skip-headers-2.cpp test, which shows desired check at a top-level Decl but not at nested Decl. Checking locations of only top-level Decls will miss the opportunity to skip nested

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, skip Decls

2021-07-21 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 360649. chh edited the summary of this revision. chh added a comment. Add one more skip-headers-2.cpp test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98709/new/ https://reviews.llvm.org/D98709 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp c

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1, setTraversalScope

2021-07-20 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 360339. chh edited the summary of this revision. chh added a comment. Add bugprone-forward-declaration-namespace-header.cpp test to show that MatchFinder-based checks can also depend on header Decls. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/ne

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, skip Decls

2021-07-20 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 360336. chh edited the summary of this revision. chh added a comment. Add bugprone-forward-declaration-namespace-header.cpp test; fix some coding style warnings. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98709/new/ https://reviews.llvm.org/D98709

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1, setTraversalScope

2021-07-19 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Sam, The latest tested change contained one of your suggestions: using setTraversalScope for all consumers in the ClangTidyASTConsumer::HandleTranslationUnit It is good to pass all existing tests, although not a proof of correctness yet. The failed libarcher.* tests ha

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1, setTraversalScope

2021-07-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 359532. chh retitled this revision from "[clang-tidy] New feature --skip-headers, part 1, (tested as default)" to "[clang-tidy] New feature --skip-headers, part 1, setTraversalScope". chh edited the summary of this revision. chh added a comment. --skip-headers i

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, skip Decls

2021-07-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 359531. chh retitled this revision from "[clang-tidy] New feature --skip-headers, (tested as default)" to "[clang-tidy] New feature --skip-headers, part 1, skip Decls". chh edited the summary of this revision. chh added a comment. --skip-headers is set to false

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1, (tested as default)

2021-07-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 359506. chh retitled this revision from "[clang-tidy] New feature --skip-headers, part 1" to "[clang-tidy] New feature --skip-headers, part 1, (tested as default)". chh edited the summary of this revision. chh added a comment. to test skip-headers as default, do

[PATCH] D98709: [clang-tidy] New feature --skip-headers, (tested as default)

2021-07-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 359461. chh edited the summary of this revision. chh added a comment. only coding style changes in clang-tidy files, to match other alternative implementation CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98709/new/ https://reviews.llvm.org/D98709 Fil

[PATCH] D98709: [clang-tidy] New feature --skip-headers, (tested as default)

2021-07-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 359271. chh retitled this revision from "[clang-tidy] Add --skip-headers, part 1" to "[clang-tidy] New feature --skip-headers, (tested as default)". chh edited the summary of this revision. chh added a comment. sync with latest source, update more tests to test s

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1

2021-07-12 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Sam, the revision summary is updated. Could you review it again? The new summary would clarify a few points: - This --skip-headers is a new feature, not just a transparent run-time saving. It should be used carefully with header-filter and system-headers, and similarly han

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-07-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidy.cpp:310 +struct DeclFilter { + DeclFilter(ClangTidyContext &Ctx, SourceManager &SM) + : Context(Ctx), Sources(SM) { sammccall wrote: > Ctx is ultimately unused, just take the rege

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-07-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 357824. chh marked 7 inline comments as done. chh added a comment. sync up latest clang/llvm source; more format/style changes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: clang-tools-extra/clang-tid

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-07-05 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 356589. chh edited the summary of this revision. chh added a comment. No more change to or derivation from MatchFinder, but override two member functions in MultiplexConsumer. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llv

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-07-02 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 356321. chh added a comment. fix clang-format coding style issue CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-extra/clang-tidy/ClangTidyDiagno

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-07-02 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 356319. chh marked an inline comment as done. chh added a comment. fix clang-format name style issue CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-to

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-07-02 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh marked an inline comment as done and an inline comment as not done. chh added a comment. Last build tests were green. Let's see if the new updated diff still passes all the tests. Looks like all choices have some risk/overhead in future maintenance and we need to pick one with the least cos

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-07-02 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 356307. chh marked an inline comment as done. chh edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-extra/clang-

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-07-01 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 355827. chh added a comment. with clang-format suggested change CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-extra/clang-tidy/ClangTidyDiagnos

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-06-30 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. I reproduced the ClangdTests::TargetDeclTest.Concept failure locally without this change, using llvm git commit 0c400e8953 . Will wait for upstream fix of the failed tests. CHANGES SINCE LAST ACTION ht

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-06-30 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 355699. chh edited the summary of this revision. chh added a comment. Move almost all changes to MatchFinder into ClangTidy.cpp. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: clang-tools-extra/clang-t

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-06-27 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidy.cpp:431 +bool DeclFilter::skipLocation(SourceLocation Location) { + // do not skip non-file locations + if (!Location.isValid()) sammccall wrote: > this comment didn't match the next

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-06-27 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 354737. chh marked 7 inline comments as done. chh added a comment. update some comments and sync again with the latest clang/llvm source CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: clang-tools-extra

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-06-19 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:31 + +struct DeclFilter : public OptionsDeclFilter { + DeclFilter(ClangTidyContext &Ctx, SourceManager &SM) sammccall wrote: > The layering in clang-tidy is... not particularly

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-06-19 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 353224. chh marked an inline comment as done. chh edited the summary of this revision. chh added a comment. Sync up; moved DeclFilter to ClangTidy.cpp. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: cl

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1 (use setTraversalScope)

2021-06-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Friendly ping reviewers. Now this change can pass all clang-tidy tests. Please feel free to comment and/or add other reviewers. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710

[PATCH] D98618: [clang-tidy] Add --skip-headers, part 1 (with TopLevelDecl bit)

2021-06-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Please review https://reviews.llvm.org/D98710, which uses get/setTraversalScope instead of adding a TopLevelDecl bit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98618/new/ https://reviews.llvm.org/D98618 ___ cfe-commi

[PATCH] D98709: [clang-tidy] Add --skip-headers, part 1

2021-06-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 351617. chh retitled this revision from "clang-tidy skip-headers; Alt#1; fewer changes" to "[clang-tidy] Add --skip-headers, part 1". chh edited the summary of this revision. chh added a comment. Herald added subscribers: cfe-commits, xazax.hun. sync with latest

[PATCH] D98710: [clang-tidy] Add --skip-headers, part 1

2021-06-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 351616. chh retitled this revision from "WIP; clang-tidy skip-headers; Alt#2; need more changes" to "[clang-tidy] Add --skip-headers, part 1". chh edited the summary of this revision. chh added a comment. Herald added subscribers: cfe-commits, xazax.hun. sync wit

[PATCH] D98618: [clang-tidy] Add --skip-headers, part 1

2021-06-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 351615. chh added a comment. Herald added a subscriber: cfe-commits. sync with latest clang/llvm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98618/new/ https://reviews.llvm.org/D98618 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-

[PATCH] D45454: Add llvm_gcov_flush to be called outside a shared library

2018-06-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCRT336019: [profile] Add llvm_gcov_flush to be called outside a shared library (authored by chh, committed by ). Herald added a subscriber: Sanitizers. Repository: rCRT Compiler Runtime https://reviews.

[PATCH] D45454: Add llvm_gcov_flush to be called outside a shared library

2018-06-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 153576. chh marked an inline comment as done. https://reviews.llvm.org/D45454 Files: lib/profile/GCDAProfiling.c test/profile/Inputs/instrprof-dlopen-dlclose-main.c Index: test/profile/Inputs/instrprof-dlopen-dlclose-main.c =

[PATCH] D45454: Add llvm_gcov_flush to be called outside a shared library

2018-06-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added inline comments. Comment at: test/profile/Inputs/instrprof-dlopen-dlclose-main.c:20 + void (*gcov_flush)() = (void (*)())dlsym(f1_handle, "__gcov_flush"); + if (gcov_flush != NULL) { +fprintf(stderr, "__gcov_flush should not be visible in func.shared'\n"); ---

[PATCH] D45454: Add llvm_gcov_flush to be called outside a shared library

2018-06-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 153573. chh added a comment. check dlerror() where it shouldn't be NULL https://reviews.llvm.org/D45454 Files: lib/profile/GCDAProfiling.c test/profile/Inputs/instrprof-dlopen-dlclose-main.c Index: test/profile/Inputs/instrprof-dlopen-dlclose-main.c =

[PATCH] D45454: Add llvm_gcov_flush to be called outside a shared library

2018-06-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 153569. chh marked an inline comment as done. chh added a comment. Added calls to dlerror() before other dl* functions. https://reviews.llvm.org/D45454 Files: lib/profile/GCDAProfiling.c test/profile/Inputs/instrprof-dlopen-dlclose-main.c Index: test/prof

[PATCH] D45454: Add llvm_gcov_flush to be called outside a shared library

2018-06-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Marco, latest patch does not change __gcov_flush, which is also hidden in libgcov. Android coverage test programs have depended on an earlier compiler-rt that did not hide __gcov_flush. If that's the only use case broken by recent change of compiler-rt, which hide __gcov_fl

[PATCH] D45454: Add llvm_gcov_flush to be called outside a shared library

2018-06-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 153532. chh retitled this revision from "Make __gcov_flush visible outside a shared library" to "Add llvm_gcov_flush to be called outside a shared library". chh edited the summary of this revision. chh added a comment. Now keep __gcov_flush hidden as libgcov; add

[PATCH] D45454: Make __gcov_flush visible outside a shared library

2018-06-26 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 152957. chh edited the summary of this revision. https://reviews.llvm.org/D45454 Files: lib/profile/GCDAProfiling.c test/profile/Inputs/instrprof-dlopen-dlclose-main.c Index: test/profile/Inputs/instrprof-dlopen-dlclose-main.c ==

[PATCH] D45454: Make __gcov_flush visible outside a shared library

2018-06-25 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. In https://reviews.llvm.org/D45454#1142197, @marco-c wrote: > In https://reviews.llvm.org/D45454#1070884, @belleyb wrote: > > > @chh I had a chance to try out your proposed changes. It's not causing us > > any trouble. In fact, `__gcov_flush()` is not even used at all (at le

[PATCH] D34440: [Clang] Expand response files before loading compilation database

2018-04-30 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Herald added a subscriber: llvm-commits. FYI, Android NDK has another use case in https://github.com/android-ndk/ndk/issues/680. It would be nice to have clang-tidy recognize the response file. Repository: rL LLVM https://reviews.llvm.org/D34440 __

[PATCH] D43689: [analyzer] Disable constructor inlining when lifetime extension through fields occurs.

2018-04-18 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. This change caused an assertion failure in ExprEngineCXX.cpp: https://bugs.llvm.org/show_bug.cgi?id=37166 Repository: rC Clang https://reviews.llvm.org/D43689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D45454: Make __gcov_flush visible outside a shared library

2018-04-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Yes, calling `__gcov_flush` within .so files are different, but it's a revert of https://reviews.llvm.org/D38124. I think https://bugs.llvm.org/show_bug.cgi?id=27224 can be fixed by hiding only llvm_gcda_* functions, without any change to `__gcov_flush`. (1) Before https://r

[PATCH] D45454: Make __gcov_flush visible outside a shared library

2018-04-10 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. If we use the unit test case, call `__gcov_flush` from the main function, and dump static variables in GCDAProfiling.c, we can see that `__gcov_flush` is resolved to the same copy for func.shared, func2.shared, and main. However, when `__gcov_flush` is called from main and fro

[PATCH] D45454: Make __gcov_flush visible outside a shared library

2018-04-09 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. chh added reviewers: sylvestre.ledru, davidxl, rnk, void. __gcov_flush is not called from other functions in GCDAProfiling.c, but have been used by Android, which needs an interface function to flush profile data of multiple .so files. See https://bugs.llvm.org/show_bug

[PATCH] D43965: [Driver] Pass -f[no-]emulated-tls and set up ExplicitEmulatedTLS

2018-03-01 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326499: [Driver] Pass -f[no-]emulated-tls and set up ExplicitEmulatedTLS (authored by chh, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D439

[PATCH] D43965: [Driver] Pass -f[no-]emulated-tls and set up ExplicitEmulatedTLS

2018-03-01 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Martin, thanks for finding this problem. Please review/accept my new change if it passes your tests. After this and https://reviews.llvm.org/D42999, the default emulated TLS mode should only be decided in llvm/trunk/include/llvm/ADT/Triple.h hasDefaultEmulatedTLS(). https:/

[PATCH] D43965: [Driver] Pass -f[no-]emulated-tls and set up ExplicitEmulatedTLS

2018-03-01 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 136601. chh retitled this revision from "[CodeGen] Force the backend to follow clang's EmulatedTLS flag" to "[Driver] Pass -f[no-]emulated-tls and set up ExplicitEmulatedTLS". chh edited the summary of this revision. chh added a reviewer: srhines. https://review

[PATCH] D43965: [CodeGen] Force the backend to follow clang's EmulatedTLS flag

2018-03-01 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh commandeered this revision. chh edited reviewers, added: mstorsjo; removed: chh. chh added a comment. I will upload a different fix soon. We should set ExplicitEmulatedTLS only when -f[no-]emulated-tls flag is found at command line. Any front-end should only pass the flag and let backend deci

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-26 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314264: [clang-format] Adjust space around &/&& of structured bindings (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35743?vs=116201&id=116744#toc Repository: rL LLVM https:/

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-25 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. ping. https://reviews.llvm.org/D35743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-21 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 116201. chh marked 2 inline comments as done. chh edited the summary of this revision. https://reviews.llvm.org/D35743 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp ===

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-20 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 116092. chh edited the summary of this revision. https://reviews.llvm.org/D35743 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp === -

[PATCH] D37132: [clang-format] Add support for C++17 structured bindings.

2017-09-18 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Please review https://reviews.llvm.org/D35743. I uploaded there a new diff that should fix the spaces around & and && tokens. Thanks. https://reviews.llvm.org/D37132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-18 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 115741. https://reviews.llvm.org/D35743 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp === --- unittests/Format/FormatTest.cpp +++ u

[PATCH] D37132: [clang-format] Add support for C++17 structured bindings.

2017-09-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Thanks for this change. Could you take a look of https://reviews.llvm.org/D35743 too? This outputs a space before and after "&" or "&&", like this "auto & [...", "auto && [..." Could we remove one of the space to a format like the following? "auto& [...", "auto&& [..

[PATCH] D35743: [clang-format] Handle Structured binding declaration in C++17

2017-09-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. ping. https://reviews.llvm.org/D35743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35367: [clang-tidy] Add a close-on-exec check on epoll_create() in Android module.

2017-08-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added inline comments. Comment at: clang-tidy/android/CloexecEpollCreateCheck.cpp:27-31 + replaceFunc(Result, /*WarningMsg=*/ + "prefer epoll_create() to epoll_create1() " + "because epoll_create1() allows " + "EPOLL_CLOEXEC", /*FixMsg=

[PATCH] D35367: [clang-tidy] Add a close-on-exec check on epoll_create() in Android module.

2017-08-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311029: [clang-tidy] Add a close-on-exec check on epoll_create() in Android module. (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35367?vs=110751&id=111386#toc Repository: rL

[PATCH] D35365: [clang-tidy] Add a close-on-exec check on epoll_create1() in Android module.

2017-08-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311028: [clang-tidy] Add a close-on-exec check on epoll_create1() in Android module. (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35365?vs=110752&id=111385#toc Repository: rL

[PATCH] D35363: [clang-tidy] Add a close-on-exec check on accept4() in Android module.

2017-08-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311027: [clang-tidy] Add a close-on-exec check on accept4() in Android module. (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35363?vs=110755&id=111383#toc Repository: rL LLVM

[PATCH] D35362: [clang-tidy] Add a close-on-exec check on accept() in Android module.

2017-08-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311024: [clang-tidy] Add a close-on-exec check on accept() in Android module. (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35362?vs=111377&id=111378#toc Repository: rL LLVM

[PATCH] D35362: [clang-tidy] Add a close-on-exec check on accept() in Android module.

2017-08-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 111377. https://reviews.llvm.org/D35362 Files: clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/CloexecAcceptCheck.cpp clang-tidy/android/CloexecAcceptCheck.h docs/ReleaseNotes.rst docs/clang-tidy/checks/an

[PATCH] D35362: [clang-tidy] Add a close-on-exec check on accept() in Android module.

2017-08-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh commandeered this revision. chh added a reviewer: yawanng. chh added inline comments. Comment at: clang-tidy/android/CloexecAcceptCheck.cpp:42 + "prefer accept4() to accept() because accept4() allows SOCK_CLOEXEC", + /*FixMsg=*/ReplacementText); +}

[PATCH] D36761: [clang-tidy] Use CloexecCheck as base class.

2017-08-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311020: [clang-tidy] Use CloexecCheck as base class. (authored by chh). Changed prior to commit: https://reviews.llvm.org/D36761?vs=111372&id=111373#toc Repository: rL LLVM https://reviews.llvm.org/

[PATCH] D36761: [clang-tidy] Use CloexecCheck as base class.

2017-08-16 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 111372. chh marked 3 inline comments as done. https://reviews.llvm.org/D36761 Files: clang-tidy/android/CloexecCheck.cpp clang-tidy/android/CloexecCheck.h clang-tidy/android/CloexecCreatCheck.cpp clang-tidy/android/CloexecCreatCheck.h clang-tidy/android

[PATCH] D36761: [clang-tidy] Use CloexecCheck as base class.

2017-08-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 111243. chh edited the summary of this revision. https://reviews.llvm.org/D36761 Files: clang-tidy/android/CloexecCheck.cpp clang-tidy/android/CloexecCheck.h clang-tidy/android/CloexecCreatCheck.cpp clang-tidy/android/CloexecCreatCheck.h clang-tidy/andr

[PATCH] D36755: [clang-tidy] Use CloexecCheck as base class of CloexecCreatCheck.

2017-08-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh abandoned this revision. chh added a comment. Included in https://reviews.llvm.org/D36761. https://reviews.llvm.org/D36755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36756: [clang-tidy] Use CloexecCheck as base class of CloexecSocketCheck.

2017-08-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh abandoned this revision. chh added a comment. Included in https://reviews.llvm.org/D36761. https://reviews.llvm.org/D36756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36759: [clang-tidy] Use CloexecCheck as base class of CloexecFopenCheck.

2017-08-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh abandoned this revision. chh added a comment. Included in https://reviews.llvm.org/D36761. https://reviews.llvm.org/D36759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36759: [clang-tidy] Use CloexecCheck as base class of CloexecFopenCheck.

2017-08-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Okay, 3 changes are combined into https://reviews.llvm.org/D36761. https://reviews.llvm.org/D36759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36761: [clang-tidy] Use CloexecCheck as base class.

2017-08-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. Simplify registerMatchers and check functions in CloexecCreatCheck, CloexecSocketCheck, and CloexecFopenCheck. https://reviews.llvm.org/D36761 Files: clang-tidy/android/CloexecCreatCheck.cpp clang-tidy/android/CloexecCreatCheck.h clang-tidy/android/CloexecFopenC

[PATCH] D36759: [clang-tidy] Use CloexecCheck as base class of CloexecFopenCheck.

2017-08-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Eugene, do you mean combining this one, https://reviews.llvm.org/D36756, and https://reviews.llvm.org/D36755 into one? I don't mind either way. https://reviews.llvm.org/D36759 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D36759: [clang-tidy] Use CloexecCheck as base class of CloexecFopenCheck.

2017-08-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. Simplify registerMatchers and check functions in CloexecFopenCheck. https://reviews.llvm.org/D36759 Files: clang-tidy/android/CloexecFopenCheck.cpp clang-tidy/android/CloexecFopenCheck.h Index: clang-tidy/android/CloexecFopenCheck.h =

[PATCH] D36756: [clang-tidy] Use CloexecCheck as base class of CloexecSocketCheck.

2017-08-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. Simplify registerMatchers and check functions in CloexecSocketCheck. https://reviews.llvm.org/D36756 Files: clang-tidy/android/CloexecSocketCheck.cpp clang-tidy/android/CloexecSocketCheck.h Index: clang-tidy/android/CloexecSocketCheck.h =

[PATCH] D36755: [clang-tidy] Use CloexecCheck as base class of CloexecCreatCheck.

2017-08-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. Simplify registerMatchers and check functions in CloexecCreatCheck. https://reviews.llvm.org/D36755 Files: clang-tidy/android/CloexecCreatCheck.cpp clang-tidy/android/CloexecCreatCheck.h Index: clang-tidy/android/CloexecCreatCheck.h =

[PATCH] D35743: [clang-format] Handle Structured binding declaration in C++17

2017-08-14 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Daniel, Manuel, I will take over this CL since Yan has finished his internship at Google., Yan's latest patch to tryToParseLambda looks acceptable to me. I think it should take care of new kw_auto in additional to kw_new, ke_delete, etc. Could you suggest if there is any be

[PATCH] D35368: [clang-tidy] Add a close-on-exec check on inotify_init1() in Android module.

2017-08-14 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310863: [clang-tidy] Add a close-on-exec check on inotify_init1() in Android module. (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35368?vs=110750&id=111033#toc Repository: rL

[PATCH] D35370: [clang-tidy] Add a close-on-exec check on inotify_init() in Android module.

2017-08-14 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310861: [clang-tidy] Add a close-on-exec check on inotify_init() in Android module. (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35370?vs=110749&id=111028#toc Repository: rL

[PATCH] D35364: [clang-tidy] Add a close-on-exec check on dup() in Android module.

2017-08-14 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310858: [clang-tidy] Add a close-on-exec check on dup() in Android module. (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35364?vs=110753&id=111021#toc Repository: rL LLVM htt

[PATCH] D34114: [clang] Change the condition of unnecessary packed warning

2017-07-28 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. LGTM. rsmith, srhines, akyrtzi, rtrieu, do you have any comment? https://reviews.llvm.org/D34114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34114: [clang] Change the condition of unnecessary packed warning

2017-07-28 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added inline comments. Comment at: lib/AST/RecordLayoutBuilder.cpp:1887 +// greater than the one after packing. +if (Packed && UnpackedAlignment <= Alignment) Diag(D->getLocation(), diag::warn_unnecessary_packed) chh wrote: > With this change,

[PATCH] D34114: [clang] Change the condition of unnecessary packed warning

2017-07-27 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added inline comments. Comment at: lib/AST/RecordLayoutBuilder.cpp:1887 +// greater than the one after packing. +if (Packed && UnpackedAlignment <= Alignment) Diag(D->getLocation(), diag::warn_unnecessary_packed) With this change, UnpackedSize

[PATCH] D34114: [clang] Change the condition of unnecessary packed warning

2017-07-26 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added inline comments. Comment at: lib/AST/RecordLayoutBuilder.cpp:1888 -if (Packed && UnpackedAlignment > CharUnits::One() && -getSize() == UnpackedSize) Diag(D->getLocation(), diag::warn_unnecessary_packed) Why not keeping the (getSize()

  1   2   >