[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] 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-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] D31406: [clang-tidy] Reuse FileID in getLocation

2017-03-30 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 93499. chh marked an inline comment as done. chh added a comment. Use getOrCreateFileID. https://reviews.llvm.org/D31406 Files: clang-tidy/ClangTidy.cpp Index: clang-tidy/ClangTidy.cpp === ---

[PATCH] D31406: [clang-tidy] Reuse FileID in getLocation

2017-03-30 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299119: [clang-tidy] Reuse FileID in getLocation (authored by chh). Changed prior to commit: https://reviews.llvm.org/D31406?vs=93499&id=93554#toc Repository: rL LLVM https://reviews.llvm.org/D31406

[PATCH] D31406: [clang-tidy] Reuse FileID in getLocation

2017-03-31 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh reopened this revision. chh added a comment. This revision is now accepted and ready to land. This was reverted due to one failed test case clang-tidy/llvm-include-order.cpp on Windows: Assertion failed: EndColNo <= map.getSourceLine().size() && "Invalid range!", file C:\Buildbot\Slave\llv

[PATCH] D31713: [Basic] getColumnNumber returns location of CR+LF on Windows

2017-04-05 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. When fixing a Clang-Tidy bug in https://reviews.llvm.org/D31406, http://bugs.llvm.org/show_bug.cgi?id=32402, reuse of FileID enabled the missing highlightRange function. Assertion in highlightRange failed because the end-of-range column number was 2 + the last column of

[PATCH] D31713: [Basic] getColumnNumber returns location of CR+LF on Windows

2017-04-06 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 94402. chh marked an inline comment as done. https://reviews.llvm.org/D31713 Files: lib/Basic/SourceManager.cpp Index: lib/Basic/SourceManager.cpp === --- lib/Basic/SourceManager.cpp +++ lib/Basi

[PATCH] D31713: [Basic] getColumnNumber returns location of CR+LF on Windows

2017-04-06 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299681: [Basic] getColumnNumber returns location of CR+LF on Windows (authored by chh). Changed prior to commit: https://reviews.llvm.org/D31713?vs=94402&id=94410#toc Repository: rL LLVM https://rev

[PATCH] D31406: [clang-tidy] Reuse FileID in getLocation

2017-04-06 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299700: [clang-tidy] Reuse FileID in getLocation (authored by chh). Repository: rL LLVM https://reviews.llvm.org/D31406 Files: clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp Index: clang-tools-e

[PATCH] D34633: [clang-tidy] Fix a bug in android-file-open-flag

2017-06-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh requested changes to this revision. chh added a comment. This revision now requires changes to proceed. Please update the subject line and summary. The new diff shows only the renaming of check name and file names. Were the other changes for format and macro lost or are they going to be in ano

[PATCH] D34633: [clang-tidy] Rename android-file-open-flag and fix a bug

2017-06-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. I think you also need to change docs/clang-tidy/checks/list.rst. https://reviews.llvm.org/D34633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-06-30 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh accepted this revision. chh added a comment. This revision is now accepted and ready to land. LGTM. If nobody needs this during the long weekend, it's better to submit after the long weekend. Repository: rL LLVM https://reviews.llvm.org/D34913 _

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-07-06 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. These warnings are triggered by -Wpadded -Wpacked or clang-tidy's clang-diagnostic-packed check. I agree that they should be ignored or suppressed in many cases. What I am not sure is the amount of real positive cases. I found it too tedious to suppress one warning per struct

[PATCH] D35225: [clang-tidy] add regression test to performance-unnecessary-value-param

2017-07-10 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. These tests should be added after https://bugs.llvm.org/show_bug.cgi?id=33734 is fixed. https://reviews.llvm.org/D35225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-10 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. Fix bug https://bugs.llvm.org/show_bug.cgi?id=33734 https://reviews.llvm.org/D35230 Files: lib/Frontend/TextDiagnostic.cpp Index: lib/Frontend/TextDiagnostic.cpp === --- lib/Frontend/TextDiagnostic.cp

[PATCH] D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-10 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. See https://reviews.llvm.org/D35225 for a test case. https://reviews.llvm.org/D35230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added inline comments. Comment at: lib/Frontend/TextDiagnostic.cpp:1109-1110 - } else { -FixItInsertionLine.clear(); -break; } alexfh wrote: > Did you figure out why the old code used to give up here? Why does your code > just con

[PATCH] D35225: [clang-tidy] add regression test to performance-unnecessary-value-param

2017-07-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 106064. chh marked 2 inline comments as done. https://reviews.llvm.org/D35225 Files: test/clang-tidy/Inputs/performance-unnecessary-value-param/header-fixed.h test/clang-tidy/Inputs/performance-unnecessary-value-param/header.h test/clang-tidy/performance-un

[PATCH] D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added inline comments. Comment at: lib/Frontend/TextDiagnostic.cpp:1109-1110 - } else { -FixItInsertionLine.clear(); -break; } chh wrote: > alexfh wrote: > > Did you figure out why the old code used to give up here? Why does your

[PATCH] D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-12 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307809: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35230?vs=105937&id=106240#toc Repository: rL

[PATCH] D35225: [clang-tidy] add regression test to performance-unnecessary-value-param

2017-07-12 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307810: [clang-tidy] add regression test to performance-unnecessary-value-param (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35225?vs=106064&id=106241#toc Repository: rL LLVM

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

2017-07-17 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. If most code can be shared in a common base class like CloexecCheck, maybe all 8 "Add a close-on-exec check" CLs can be combined into 1 or 2 CLs to consolidate all review efforts. I also prefer a separate check name for each function, so users can enable/disable each check.

[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()

[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] D33103: [clang-tidy] TwineLocalCheck: add param # checking

2017-05-11 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. LGTM. Leave approval to bkramer. https://reviews.llvm.org/D33103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33430: [clang-tidy] Do not dereference a null BaseType

2017-05-22 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. Herald added a subscriber: xazax.hun. Check BaseType before dereference. Simplified test case is derived from Android Open Source code. https://reviews.llvm.org/D33430 Files: clang-tidy/misc/ForwardingReferenceOverloadCheck.cpp test/clang-tidy/misc-forwarding-refe

[PATCH] D33430: [clang-tidy] Do not dereference a null BaseType

2017-05-23 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303645: [clang-tidy] Do not dereference a null BaseType (authored by chh). Changed prior to commit: https://reviews.llvm.org/D33430?vs=99842&id=99929#toc Repository: rL LLVM https://reviews.llvm.org

<    1   2