[PATCH] D66045: Improve detection of same value in comparisons

2019-08-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: test/SemaCXX/self-comparison.cpp:87 +}; +} // namespace member_tests rtrieu wrote: > jfb wrote: > > rtrieu wrote: > > > rtrieu wrote: > > > > jfb wrote: > > > > > The test only has `==`. Do other operators trigger? > > > >

[PATCH] D66068: cmake: Make building clang-shlib optional

2019-08-13 Thread Jan Vesely via Phabricator via cfe-commits
jvesely added a comment. In D66068#1627706 , @beanz wrote: > I want to dissect this a bit. > > In D66068#1627451 , @E5ten wrote: > > > I am in favour of adding a user-facing option to disable generating this > >

r368796 - Remove unreachable blocks before splitting a coroutine.

2019-08-13 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Aug 13 20:54:13 2019 New Revision: 368796 URL: http://llvm.org/viewvc/llvm-project?rev=368796=rev Log: Remove unreachable blocks before splitting a coroutine. The suspend-crossing algorithm is not correct in the presence of uses that cannot be reached on some successor

[PATCH] D66044: Extend -Wtautological-overlap-compare to accept negative values and integer conversions

2019-08-13 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu marked an inline comment as done. rtrieu added a comment. In D66044#1626008 , @NoQ wrote: > Looks great, thanks! I'd appreciate direct CFG tests for the part that > changes the CFG (cf. `test/Analysis/cfg.cpp`), but i don't insist. Let's make >

[PATCH] D66044: Extend -Wtautological-overlap-compare to accept negative values and integer conversions

2019-08-13 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu updated this revision to Diff 215021. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66044/new/ https://reviews.llvm.org/D66044 Files: lib/Analysis/CFG.cpp lib/Analysis/ReachableCode.cpp test/Analysis/cfg.cpp test/Sema/warn-overlap.c test/Sema/warn-unreachable.c

[PATCH] D66100: Add __has_builtin support for builtin function-like type traits.

2019-08-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368785: Add __has_builtin support for builtin function-like type traits. (authored by rsmith, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

r368785 - Add __has_builtin support for builtin function-like type traits.

2019-08-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 13 19:30:11 2019 New Revision: 368785 URL: http://llvm.org/viewvc/llvm-project?rev=368785=rev Log: Add __has_builtin support for builtin function-like type traits. Summary: Previously __has_builtin(__builtin_*) would return false for __builtin_*s that we modeled as

[PATCH] D65182: [analyzer] Add fix-it hint support.

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 215011. NoQ added a comment. Rebase! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65182/new/ https://reviews.llvm.org/D65182 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td

[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 215007. NoQ added a comment. Make the checkers independent and extract modeling into a dependency. This means that you can potentially enable the non-pure-virtual call checker without enabling the pure virtual call checker. This doesn't contradict backwards

Re: r368739 - Don't use std::errc

2019-08-13 Thread Alexey Bataev via cfe-commits
Sorry, forgot to change the description. Been busy switching to the newer version of the compiler. Best regards, Alexey Bataev 13 авг. 2019 г., в 21:32, Nico Weber mailto:tha...@chromium.org>> написал(а): From the review: This is for gcc 4.8 compat, not for the other reasons mentioned in the

[PATCH] D66143: Don't use std::errc

2019-08-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. FWIW it looks like 4.8 support is going away in days, not weeks, see D66188 . Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66143/new/ https://reviews.llvm.org/D66143

[PATCH] D66045: Improve detection of same value in comparisons

2019-08-13 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu marked an inline comment as done. rtrieu added inline comments. Comment at: test/SemaCXX/self-comparison.cpp:87 +}; +} // namespace member_tests jfb wrote: > rtrieu wrote: > > rtrieu wrote: > > > jfb wrote: > > > > The test only has `==`. Do other

Re: r368739 - Don't use std::errc

2019-08-13 Thread Nico Weber via cfe-commits
>From the review: This is for gcc 4.8 compat, not for the other reasons mentioned in the CL description. On Tue, Aug 13, 2019 at 3:31 PM Alexey Bataev via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: abataev > Date: Tue Aug 13 12:32:36 2019 > New Revision: 368739 > > URL:

[PATCH] D66045: Improve detection of same value in comparisons

2019-08-13 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu updated this revision to Diff 215002. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66045/new/ https://reviews.llvm.org/D66045 Files: include/clang/AST/Expr.h lib/AST/Expr.cpp lib/Analysis/CFG.cpp lib/Sema/SemaExpr.cpp test/Analysis/array-struct-region.cpp

[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 215000. NoQ added a comment. I'll merge D65180 into this patch because it's otherwise too painful to update. Like, D65180 untangles bug types and controls enabledness by initializing bug

[PATCH] D65180: [analyzer] VirtualCallChecker: Improve warning messages.

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ abandoned this revision. NoQ added a comment. Merged into D64274 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65180/new/ https://reviews.llvm.org/D65180 ___ cfe-commits mailing list

[PATCH] D66192: [analyzer] Don't delete TaintConfig copy constructor

2019-08-13 Thread Alex Langford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368779: [analyzer] Dont delete TaintConfig copy constructor (authored by xiaobai, committed by ). Herald added a project: LLVM. Changed prior to commit:

[PATCH] D66192: [analyzer] Don't delete TaintConfig copy constructor

2019-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. This really shouldn't matter much. Go for it! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66192/new/ https://reviews.llvm.org/D66192

r368778 - [ORC] Fix clang-interpreter example code broken by r368707.

2019-08-13 Thread Douglas Yung via cfe-commits
Author: dyung Date: Tue Aug 13 18:03:35 2019 New Revision: 368778 URL: http://llvm.org/viewvc/llvm-project?rev=368778=rev Log: [ORC] Fix clang-interpreter example code broken by r368707. Modified: cfe/trunk/examples/clang-interpreter/main.cpp Modified:

[PATCH] D66192: [analyzer] Don't delete TaintConfig copy constructor

2019-08-13 Thread Alex Langford via Phabricator via cfe-commits
xiaobai created this revision. xiaobai added reviewers: compnerd, Szelethus, boga95, NoQ, alexshap. Herald added subscribers: Charusso, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. Explicitly deleting the copy constructor

[PATCH] D65287: [analyzer][CFG] Don't track the condition of asserts

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Wish granted! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65287/new/ https://reviews.llvm.org/D65287 ___ cfe-commits mailing list

[PATCH] D64270: [analyzer][NFC] Prepare visitors for different tracking kinds

2019-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368777: [analyzer][NFC] Prepare visitors for different tracking kinds (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D65287: [analyzer][CFG] Don't track the condition of asserts

2019-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. If you have no major objections, could you please accept formally? :) And I'll promise to draw CFG graphs all day tomorrow as an exercise after reading the order of operator evaluation rules >.< CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65287/new/

r368777 - [analyzer][NFC] Prepare visitors for different tracking kinds

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 17:48:57 2019 New Revision: 368777 URL: http://llvm.org/viewvc/llvm-project?rev=368777=rev Log: [analyzer][NFC] Prepare visitors for different tracking kinds When we're tracking a variable that is responsible for a null pointer dereference or some other

[PATCH] D66131: [analyzer] Don't track the condition of foreach loops

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Do it! 8) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66131/new/ https://reviews.llvm.org/D66131 ___

[PATCH] D65287: [analyzer][CFG] Don't track the condition of asserts

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1750 + // [B1] -> [B2] -> [B3] -> [sink] + // assert(A && B || C);\ \ \ + // ---> [go on with the

[PATCH] D27165: Add format_dynamic_key_arg attribute to improve "-Wformat" warnings for functions that load the formatting string dynamically based on a key value

2019-08-13 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. One minor request (which will be dead code in your patch), but otherwise LGTM. Comment at: clang/include/clang/Basic/IdentifierTable.h:754 + /// If this selector is the

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-13 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders marked an inline comment as done. dsanders added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp:26 void addCheckFactories(ClangTidyCheckFactories ) override { +using readability::NamespaceCommentCheck; +

[PATCH] D64287: [analyzer] Track the right hand side of the last store regardless of its value

2019-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Szelethus marked 2 inline comments as done. Closed by commit rG0df9c8c57802: [analyzer] Track the right hand side of the last store regardless of its value (authored by Szelethus). Changed prior to commit:

r368773 - [analyzer] Track the right hand side of the last store regardless of its value

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 16:48:10 2019 New Revision: 368773 URL: http://llvm.org/viewvc/llvm-project?rev=368773=rev Log: [analyzer] Track the right hand side of the last store regardless of its value Summary: The following code snippet taken from D64271#1572188 has an issue: namely,

[PATCH] D27165: Add format_dynamic_key_arg attribute to improve "-Wformat" warnings for functions that load the formatting string dynamically based on a key value

2019-08-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 214977. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D27165/new/ https://reviews.llvm.org/D27165 Files: clang/include/clang/AST/FormatString.h

[PATCH] D66176: Fix Driver/modules.cpp test to work when build directory name contains '.s'

2019-08-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. Taking a step back and thinking about this, the compile command uses "-S", but explicitly specifies the output file to be "%t/module.pcm.o" (even though it is generating an assembly file instead of an object file), could we change the test to just check for "-o

[PATCH] D65349: [analyzer] Be more careful with destructors of non-regions.

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 214972. NoQ marked 2 inline comments as done. NoQ added a comment. Fxd! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65349/new/ https://reviews.llvm.org/D65349 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h

[PATCH] D64232: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

2019-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Szelethus marked 5 inline comments as done. Closed by commit rL368771: [analyzer] Prune calls to functions with linear CFGs that return a non-zero… (authored by Szelethus, committed by ). Herald added a project: LLVM.

r368771 - [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 16:22:33 2019 New Revision: 368771 URL: http://llvm.org/viewvc/llvm-project?rev=368771=rev Log: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value During the evaluation of D62883, I noticed a bunch of totally

[PATCH] D66186: Fix warning on printf('%hd', [char])

2019-08-13 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 214966. Nathan-Huckleberry added a comment. - Add comment in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files: clang/lib/AST/FormatString.cpp

[PATCH] D66094: [CodeGen] Emit destructor calls for non-trivial C structs returned by function calls and loaded from volatile objects

2019-08-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGCall.h:372 + REQUIRES_DESTRUCTION = 0x4, }; Does `llvm::Value*` actually guarantee three bits? Presumably on 64-bit platforms, but we do support 32-bit hosts. Fortunately, I don't

Re: r367940 - [Sema] Add -Wpointer-compare

2019-08-13 Thread David Blaikie via cfe-commits
This seems a bit narrow - could it be generalized to all cases of '\0' as a null pointer? On Mon, Aug 5, 2019 at 3:14 PM George Burgess IV via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: gbiv > Date: Mon Aug 5 15:15:40 2019 > New Revision: 367940 > > URL:

[PATCH] D66186: Fix warning on printf('%hd', [char])

2019-08-13 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Nathan-Huckleberry added a reviewer: rsmith. Nathan-Huckleberry added a subscriber: nickdesaulniers. Link: https://bugs.llvm.org/show_bug.cgi?id=41467 Repository: rG LLVM Github

[PATCH] D66043: Add to -Wparentheses case of bitwise-and ("&") and bitwise-or ("|") verses conditional operator ("?:")

2019-08-13 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu marked an inline comment as done. rtrieu added inline comments. Comment at: test/Sema/parentheses.c:148 + + (void)(x | b ? 1 : 2); // expected-warning {{operator '?:' has lower precedence than '|'}} expected-note 2{{place parentheses}} + (void)(x & b ? 1 : 2); //

[PATCH] D65344: [analyzer] exploded-graph-rewriter: NFC: Replace explorers with trimmers.

2019-08-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368767: [analyzer] exploded-graph-rewriter: NFC: Refactor explorers into trimmers. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D65427: [analyzer] exploded-graph-rewriter: Implement Store pointers.

2019-08-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368769: [analyzer] exploded-graph-rewriter: Implement displaying Store pointers. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D65345: [analyzer] exploded-graph-rewriter: Implement manual graph trimming.

2019-08-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368768: [analyzer] exploded-graph-rewriter: Implement manual graph trimming. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D65250: [analyzer] exploded-graph-rewriter: Improve user-friendliness.

2019-08-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368766: [analyzer] exploded-graph-rewriter: Open the converted graph immediately. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D66176: Fix Driver/modules.cpp test to work when build directory name contains '.s'

2019-08-13 Thread Tom Stellard via Phabricator via cfe-commits
tstellar updated this revision to Diff 214960. tstellar added a comment. Another attempt to fix this that depends less on the build directory. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66176/new/ https://reviews.llvm.org/D66176 Files:

r368767 - [analyzer] exploded-graph-rewriter: NFC: Refactor explorers into trimmers.

2019-08-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Aug 13 16:04:50 2019 New Revision: 368767 URL: http://llvm.org/viewvc/llvm-project?rev=368767=rev Log: [analyzer] exploded-graph-rewriter: NFC: Refactor explorers into trimmers. Explorers aren't the right abstraction. For the purposes of displaying svg files we don't

r368769 - [analyzer] exploded-graph-rewriter: Implement displaying Store pointers.

2019-08-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Aug 13 16:04:56 2019 New Revision: 368769 URL: http://llvm.org/viewvc/llvm-project?rev=368769=rev Log: [analyzer] exploded-graph-rewriter: Implement displaying Store pointers. They're useful when trying to understand what's going on inside your LazyCompoundValues.

r368766 - [analyzer] exploded-graph-rewriter: Open the converted graph immediately.

2019-08-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Aug 13 16:04:47 2019 New Revision: 368766 URL: http://llvm.org/viewvc/llvm-project?rev=368766=rev Log: [analyzer] exploded-graph-rewriter: Open the converted graph immediately. Change the default behavior: the tool no longer dumps the rewritten .dot file to stdout,

r368765 - [analyzer] Disable the checker-plugins test on Darwin.

2019-08-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Aug 13 16:04:44 2019 New Revision: 368765 URL: http://llvm.org/viewvc/llvm-project?rev=368765=rev Log: [analyzer] Disable the checker-plugins test on Darwin. Fixes a buildbot. Modified: cfe/trunk/test/Analysis/checker-plugins.c Modified:

r368768 - [analyzer] exploded-graph-rewriter: Implement manual graph trimming.

2019-08-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Aug 13 16:04:53 2019 New Revision: 368768 URL: http://llvm.org/viewvc/llvm-project?rev=368768=rev Log: [analyzer] exploded-graph-rewriter: Implement manual graph trimming. When -trim-egraph is unavailable (say, when you're debugging a crash on a real-world code that

[PATCH] D65250: [analyzer] exploded-graph-rewriter: Improve user-friendliness.

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked 2 inline comments as done. NoQ added inline comments. Comment at: clang/utils/analyzer/exploded-graph-rewriter.py:846 +print(' $ dot -Tsvg input.dot -o output.svg') +print() +write_temp_file('.dot', self.output())

[PATCH] D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value()

2019-08-13 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 214954. mgehre marked an inline comment as done. mgehre added a comment. Add tests for rvalue-ref overloads Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66164/new/ https://reviews.llvm.org/D66164 Files:

[PATCH] D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value()

2019-08-13 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked 3 inline comments as done. mgehre added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6583 .Cases("end", "rend", "cend", "crend", true) -.Cases("c_str", "data", "get", true) +.Cases("c_str", "data", "get", "value", true)

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, the patch doesn't pass its own test for me, could you double-check? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65453/new/ https://reviews.llvm.org/D65453 ___ cfe-commits

[PATCH] D66176: Fix Driver/modules.cpp test to work when build directory name contains '.s'

2019-08-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. It's probably a pathological case, but wouldn't this still fail if the build directory contained ".s" followed by a space in the name? Something like "build-foo.s bar"? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

r368762 - [clang][DirectoryWatcher] Fix Windows stub after LLVM change

2019-08-13 Thread Jan Korous via cfe-commits
Author: jkorous Date: Tue Aug 13 15:39:50 2019 New Revision: 368762 URL: http://llvm.org/viewvc/llvm-project?rev=368762=rev Log: [clang][DirectoryWatcher] Fix Windows stub after LLVM change r367979 changed DirectoryWatcher::Create to return an llvm::Expected. Adjust the Windows stub accordingly.

r368761 - [clang] DirectoryWatcher for Windows stubs (to fix build break).

2019-08-13 Thread Jan Korous via cfe-commits
Author: jkorous Date: Tue Aug 13 15:39:26 2019 New Revision: 368761 URL: http://llvm.org/viewvc/llvm-project?rev=368761=rev Log: [clang] DirectoryWatcher for Windows stubs (to fix build break). This is just a code skeleton for DirectoryWatcher-windows.cpp so the build on Windows stops breaking.

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-13 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre created this revision. mgehre added a reviewer: gribozavr. Herald added a subscriber: Szelethus. Herald added a project: clang. This fixes inference of gsl::Pointer on std::set::iterator with libstdc++ (the typedef for iterator on the template is a DependentNameType - we can only put the

[PATCH] D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value()

2019-08-13 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 214950. mgehre marked 2 inline comments as done. mgehre added a comment. Fix commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66164/new/ https://reviews.llvm.org/D66164 Files: clang/lib/Sema/SemaInit.cpp

[PATCH] D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value()

2019-08-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/test/Sema/warn-lifetime-analysis-nocfg.cpp:172 T *(); + T (); +}; mgehre wrote: > xazax.hun wrote: > > I actually was a bit lazy when I added these tests. Both `value` and > > `operator*` is overloaded on

[PATCH] D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value()

2019-08-13 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked an inline comment as done. mgehre added inline comments. Comment at: clang/test/Sema/warn-lifetime-analysis-nocfg.cpp:172 T *(); + T (); +}; xazax.hun wrote: > I actually was a bit lazy when I added these tests. Both `value` and > `operator*`

[PATCH] D66173: [Codegen] Updated test for D66158

2019-08-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. In D66173#1628079 , @xbolva00 wrote: > hm.. memset? When I say memset, here and in the other review, I mean memmove. In D66173#1628088

[PATCH] D66151: [clang-doc] Fix bitcode writer

2019-08-13 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett accepted this revision. juliehockett added a comment. This revision is now accepted and ready to land. One comment then LGTM Comment at: clang-tools-extra/clang-doc/Serialize.cpp:507 Reference{ParentUSR, Parent->getNameAsString(), InfoType::IT_record}; -

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-13 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added inline comments. Comment at: llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp:1922 + const bool Thumb = Opcode == ARM::tBL_PUSHLR; + MachineOperand ReturnAddr = MI.getOperand(0); + assert(ReturnAddr.getReg() ==

[PATCH] D66176: Fix Driver/modules.cpp test to work when build directory name contains '.s'

2019-08-13 Thread Tom Stellard via Phabricator via cfe-commits
tstellar created this revision. tstellar added reviewers: dyung, rsmith, hansw. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D66176 Files: clang/test/Driver/modules.cpp Index: clang/test/Driver/modules.cpp

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-13 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 214945. jcai19 marked an inline comment as done. jcai19 added a comment. Updates based on comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files:

[PATCH] D66173: [Codegen] Updated test for D66158

2019-08-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 214940. xbolva00 added a comment. Explicit memcpy CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66173/new/ https://reviews.llvm.org/D66173 Files: test/CodeGen/struct-copy.c Index: test/CodeGen/struct-copy.c

[PATCH] D66173: [Codegen] Updated test for D66158

2019-08-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. hm.. memset? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66173/new/ https://reviews.llvm.org/D66173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value()

2019-08-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6583 .Cases("end", "rend", "cend", "crend", true) -.Cases("c_str", "data", "get", true) +.Cases("c_str", "data", "get", "value", true) // Map and set types.

[PATCH] D65578: [analyzer][NFC] Make sure that the BugReport is not modified during the construction of non-visitor pieces

2019-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368755: [analyzer][NFC] Make sure that the BugReport is not modified during the… (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

r368755 - [analyzer][NFC] Make sure that the BugReport is not modified during the construction of non-visitor pieces

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 15:03:08 2019 New Revision: 368755 URL: http://llvm.org/viewvc/llvm-project?rev=368755=rev Log: [analyzer][NFC] Make sure that the BugReport is not modified during the construction of non-visitor pieces I feel this is kinda important, because in a followup

r368754 - Add a missing header comment, NFC

2019-08-13 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Aug 13 15:01:39 2019 New Revision: 368754 URL: http://llvm.org/viewvc/llvm-project?rev=368754=rev Log: Add a missing header comment, NFC Modified: cfe/trunk/lib/AST/FormatStringParsing.h Modified: cfe/trunk/lib/AST/FormatStringParsing.h URL:

[PATCH] D66058: [NFC][clang] Move much of the argument handling code from Driver::BuildActions to Driver::handleArguments.

2019-08-13 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Ugh, this is still not the most structured handling of the arguments. But, yeah, this seems like it should be equivalent. Fine by me if @aaron.ballman has no more comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66058/new/

[PATCH] D66156: Removed dead code from clang/tools/libclang/CXIndexDataConsumer.{cpp,h}

2019-08-13 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a reviewer: akyrtzi. jkorous added a subscriber: akyrtzi. jkorous added a comment. LGTM but let's wait for @akyrtzi to confirm. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66156/new/ https://reviews.llvm.org/D66156

[PATCH] D66173: [Codegen] Updated test for D66158

2019-08-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Might not be the best test given that this should arguably be a memset not a memcpy. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66173/new/ https://reviews.llvm.org/D66173 ___

[PATCH] D27165: Add format_dynamic_key_arg attribute to improve "-Wformat" warnings for functions that load the formatting string dynamically based on a key value

2019-08-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I agree with just special-casing this for now. Comment at: clang/lib/Sema/SemaChecking.cpp:6800 +MD->getSelector() == +S.NSAPIObj->getLocalizedStringForKeySelector()) { + IgnoreStringsWithoutSpecifiers = true;

[PATCH] D66042: [analyzer] Analysis: "Disable" core checkers

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I'm convinced, let's keep everything as is but turn this into an `-analyzer-config` flag. We generally wanted to reduce the number of frontend flags because they are more taxing on backwards compatibility, so it makes perfect sense. CHANGES SINCE LAST ACTION

[PATCH] D63978: Clang Interface Stubs merger plumbing for Driver

2019-08-13 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Tests? Comment at: clang/lib/Driver/Driver.cpp:3420 + // Add a link action if necessary. + if (!MergerInputs.empty()) { This isn't really a link action ... Comment at: clang/lib/Driver/Driver.cpp:3423 +

r368752 - [analyzer][NFC] Refactoring BugReporter.cpp P6.: Completely get rid of interestingness propagation

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 14:48:17 2019 New Revision: 368752 URL: http://llvm.org/viewvc/llvm-project?rev=368752=rev Log: [analyzer][NFC] Refactoring BugReporter.cpp P6.: Completely get rid of interestingness propagation Apparently this does literally nothing. When you think about

[PATCH] D65487: [analyzer][NFC] Refactoring BugReporter.cpp P6.: Completely get rid of interestingness propagation

2019-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368752: [analyzer][NFC] Refactoring BugReporter.cpp P6.: Completely get rid of… (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D66173: [Codegen] Updated test for D66158

2019-08-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D66173 Files: test/CodeGen/struct-copy.c Index: test/CodeGen/struct-copy.c

[PATCH] D66168: [WebAssembly] Make clang emit correct va_arg code for structs

2019-08-13 Thread Guanzhong Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368750: [WebAssembly] Make clang emit correct va_arg code for structs (authored by quantum, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D27165: Add format_dynamic_key_arg attribute to improve "-Wformat" warnings for functions that load the formatting string dynamically based on a key value

2019-08-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 214925. erik.pilkington added a comment. Special case localizedStringForKey instead of using an attribute. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D27165/new/ https://reviews.llvm.org/D27165 Files:

[PATCH] D63978: Clang Interface Stubs merger plumbing for Driver

2019-08-13 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 214924. plotfi edited the summary of this revision. plotfi added a comment. Herald added a subscriber: mgorny. Updated. Much better cleaner implementation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D27165: Add format_dynamic_key_arg attribute to improve "-Wformat" warnings for functions that load the formatting string dynamically based on a key value

2019-08-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington commandeered this revision. erik.pilkington added a reviewer: arphaman. erik.pilkington added a comment. Herald added subscribers: dexonsmith, jkorous. Herald added a project: LLVM. Stealing this (with Alex's permission). I think it makes more sense to add a special case for the

[PATCH] D66042: [analyzer] Analysis: "Disable" core checkers

2019-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D66042#1627842 , @Charusso wrote: > Any analyzer config flag is equally accessible to anyone as the driver flags > as they are both flags. The only difference is the config flags are more code > to implement, and a lot more

r368750 - [WebAssembly] Make clang emit correct va_arg code for structs

2019-08-13 Thread Guanzhong Chen via cfe-commits
Author: quantum Date: Tue Aug 13 14:41:11 2019 New Revision: 368750 URL: http://llvm.org/viewvc/llvm-project?rev=368750=rev Log: [WebAssembly] Make clang emit correct va_arg code for structs Summary: In the WebAssembly backend, when lowering variadic function calls, non-single member aggregate

[PATCH] D64564: Loop pragma parsing. NFC.

2019-08-13 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Sorry, should have done my std::string, StringRef, and Twine homework a lot better! Thanks for your help and suggestions, will fix this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64564/new/ https://reviews.llvm.org/D64564

[PATCH] D66151: [clang-doc] Fix bitcode writer

2019-08-13 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 214923. DiegoAstiazaran edited the summary of this revision. DiegoAstiazaran added a comment. Default value of AccessSpecifier attributes is now AS_public. Multiple tests modified. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66151/new/

[PATCH] D65776: [Clang] Pragma vectorize_predicate implies vectorize

2019-08-13 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Thanks for your help! And I will wait a few days. After this, I will look at that PR, will have a look at diagnostics, and then at the LLVM side of things. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65776/new/ https://reviews.llvm.org/D65776

[PATCH] D66121: Debug Info: Nest Objective-C property function decls inside their container.

2019-08-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.h:406 + CGBuilderTy , + const ObjCContainerDecl *CD = nullptr); aprantl wrote: > rjmccall wrote: > > aprantl wrote: > > > rjmccall wrote:

[PATCH] D66042: [analyzer] Analysis: "Disable" core checkers

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D66042#1627842 , @Charusso wrote: > @Szelethus, here is a really cool example: > https://clang.llvm.org/docs/ClangCommandLineReference.html. These are driver flags. They are indeed well-documented and user-facing. Frontend

r368748 - Remove the extra `;`.

2019-08-13 Thread Michael Liao via cfe-commits
Author: hliao Date: Tue Aug 13 14:26:42 2019 New Revision: 368748 URL: http://llvm.org/viewvc/llvm-project?rev=368748=rev Log: Remove the extra `;`. Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h Modified:

[PATCH] D66168: [WebAssembly] Make clang emit correct va_arg code for structs

2019-08-13 Thread Derek Schuff via Phabricator via cfe-commits
dschuff accepted this revision. dschuff added a comment. This revision is now accepted and ready to land. LGTM. Nice that we had a test which tested the wrong thing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66168/new/

[PATCH] D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value()

2019-08-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LG! But let's wait for Dmitri :) Comment at: clang/test/Sema/warn-lifetime-analysis-nocfg.cpp:172 T *(); + T (); +};

[PATCH] D66168: [WebAssembly] Make clang emit correct va_arg code for structs

2019-08-13 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum created this revision. quantum added reviewers: tlively, sbc100, kripken, aheejin. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, dschuff. Herald added a project: clang. In the WebAssembly backend, when lowering variadic function calls, non-single member aggregate type

[PATCH] D66014: [analyzer] Avoid unnecessary enum range check on LValueToRValue casts

2019-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. LGTM, thanks! Do you need someone to commit this on your behalf? Also, could you please make the comments capitalized, terminated, and fitting in 80 columns? Comment at:

[PATCH] D66164: [LifetimeAnalysis] Support std::stack::top() and std::optional::value()

2019-08-13 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre created this revision. mgehre added a reviewer: gribozavr. Herald added a project: clang. Diagnose dangling pointers that come from std::stack::top() and std::optional::value(). Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D66164 Files: clang/lib/Sema/SemaInit.cpp

[PATCH] D66042: [analyzer] Analysis: "Disable" core checkers

2019-08-13 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Any analyzer config flag is equally accessible to anyone as the driver flags as they are both flags. The only difference is the config flags are more code to implement, and a lot more difficult to use. @NoQ, why the hell would we pick another type of flag which makes

[PATCH] D66042: [analyzer] Analysis: "Disable" core checkers

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D66042#162 , @Szelethus wrote: > Yup. We will be able to present the drastic improvement made on LLVM > analyses, while giving us some breathing room to polish a long-term solution. > I suspect `-analyzer-config

  1   2   3   >