[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-11 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad added a comment. @Anastasia Could you, please, merge the patch if it's OK with you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r348834 - Reland r348741 "[Sema] Further improvements to to static_assert diagnostics."

2018-12-11 Thread Clement Courbet via cfe-commits
Author: courbet Date: Tue Dec 11 00:39:11 2018 New Revision: 348834 URL: http://llvm.org/viewvc/llvm-project?rev=348834&view=rev Log: Reland r348741 "[Sema] Further improvements to to static_assert diagnostics." Fix a dangling reference to temporary, never return nullptr. Modified: cfe/trunk

[PATCH] D55428: [Docs] Expand -fstack-protector and -fstack-protector-all info

2018-12-11 Thread Carey Williams via Phabricator via cfe-commits
carwil updated this revision to Diff 177668. carwil added a comment. Make thopre's suggested changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55428/new/ https://reviews.llvm.org/D55428 Files: include/clang/Driver/Options.td Index: include/clang/Driver/Options.td =

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. A few more ideas for enhancements. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:41 + //bool foo(A*) + // then they may not care about the return value, because of passing data + // via the arguments however functions with no arguments

[PATCH] D55337: NFC: Move dumpDeclRef to NodeDumper

2018-12-11 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 177670. steveire added a comment. Rebase Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55337/new/ https://reviews.llvm.org/D55337 Files: include/clang/AST/TextNodeDumper.h lib/AST/ASTDumper.cpp lib/AST/TextNodeDumper.

[libunwind] r348836 - [SEH] Zero-initialize EXCEPTION_RECORD and UNWIND_HISTORY_TABLE before calling RtlUnwindEx

2018-12-11 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Tue Dec 11 01:53:11 2018 New Revision: 348836 URL: http://llvm.org/viewvc/llvm-project?rev=348836&view=rev Log: [SEH] Zero-initialize EXCEPTION_RECORD and UNWIND_HISTORY_TABLE before calling RtlUnwindEx This fixes PR39935. Modified: libunwind/trunk/src/Unwind-seh.cpp

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:65 +void UseNodiscardCheck::registerMatchers(MatchFinder *Finder) { + // If we are using C++17 attributes we are going to need c++17 + if (NoDiscardMacro == "[[nodiscard]]") { ---

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:3929 +static TypeSourceInfo * +GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, + TypeSourceInfo *TInfo, From the `state` you can use `getDeclara

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-11 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael marked an inline comment as done. mikael added inline comments. Comment at: test/SemaOpenCLCXX/address-space-templates.cl:7 T f1(); // expected-error{{function type may not be qualified with an address space}} - void f2(T); // expected-error{{parameter may not be

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177679. MyDeveloperDay marked 10 inline comments as done. MyDeveloperDay added a comment. Resolving some (not all yet) review comments, and looking for help on template parameter exclusion - add additional template argument tests - add additional clan

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I wanted to leave a comment regarding running the [[nodiscard]] checker over all of clang... as requested by @JonasToth, @lebedev.ri and @Szelethus I'm not 100% sure how to present the results, but let me pick out a few high/low lights... My efforts are somewha

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-11 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael marked an inline comment as done. mikael added inline comments. Comment at: lib/Sema/SemaType.cpp:5169 +TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S, + const DeclContext *DC) { // Determine the type of the

[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-11 Thread Clement Courbet via Phabricator via cfe-commits
courbet created this revision. courbet added reviewers: aaron.ballman, Quuxplusone. Herald added a subscriber: cfe-commits. Handles expressions such as: - `std::is_const()` - `std::is_const()()`; - `std::is_same(decltype(U()), V>::value`; Repository: rC Clang https://reviews.llvm.org/D2

[PATCH] D47196: [Time-report ](2): Recursive timers in Clang

2018-12-11 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev added a comment. In D47196#1324540 , @Trass3r wrote: > Is this still in progress? AFAIK, this is abandoned by author now. I'm working on other implementation which is similar but with another angle of view. The implementation projected

[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-11 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 177681. courbet added a comment. cosmetics Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2/new/ https://reviews.llvm.org/D2 Files: lib/Sema/SemaTemplate.cpp test/SemaCXX/static-assert.cpp Index: test/SemaCXX/sta

[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2018-12-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. See PR39949 as well, as it seems to trigger the same or a similar problem. @ioeric and @klimek maybe could give an opinion, too? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54309/new/ https://reviews.llvm.org/D54309 __

[clang-tools-extra] r348840 - [clang-tidy] NFC Consolidate test absl::Time implementation

2018-12-11 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Tue Dec 11 04:42:17 2018 New Revision: 348840 URL: http://llvm.org/viewvc/llvm-project?rev=348840&view=rev Log: [clang-tidy] NFC Consolidate test absl::Time implementation Summary: Several tests re-implement these same prototypes (differently), so we can put them in a com

[clang-tools-extra] r348842 - Use the standard Duration factory matcher

2018-12-11 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Tue Dec 11 04:45:51 2018 New Revision: 348842 URL: http://llvm.org/viewvc/llvm-project?rev=348842&view=rev Log: Use the standard Duration factory matcher Summary: A new check came in over the weekend; it should use our existing infrastructure for matching `absl::Duration`

[PATCH] D55541: Use the standard Duration factory matcher

2018-12-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D55541#1326868 , @lebedev.ri wrote: > In D55541#1326867 , @JonasToth wrote: > > > Please remember to upload your patches with full context (i can highly > > recommend using `arc`, see

[PATCH] D55428: [Docs] Expand -fstack-protector and -fstack-protector-all info

2018-12-11 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre added inline comments. Comment at: include/clang/Driver/Options.td:1636 def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group, HelpText<"Force the usage of stack protectors for all functions">; def fstack_protector_strong : Flag<["-"], "fstack-protecto

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:2425 CallExpr(const ASTContext &C, StmtClass SC, unsigned NumPreArgs, - unsigned NumArgs, EmptyShell Empty); + unsigned NumArgs, bool UsesADL, EmptyShell Empty); There

[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2018-12-11 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D54309#1326852 , @JonasToth wrote: > See PR39949 as well, as it seems to trigger the same or a similar problem. > @ioeric and @klimek maybe could give an opinion, too? Sounds like we might not correctly set the parent map for

[PATCH] D55544: Warning: objc-encodings-larger-than=

2018-12-11 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. It would probably be a good idea to have a similar check on properties, as property encoding strings contain the type encoding (plus extra stuff). I wonder if we also want an option in code generation to replace very long type encodings (or encodings of specifically an

Re: r348276 - [AST][NFC] Make ArrayTypeTraitExpr non polymorphic

2018-12-11 Thread Mikael Holmén via cfe-commits
Hi Bruno, I've no idea if this is really related to your change, but with this commit, the following starts crashing: clang-tidy -allow-enabling-analyzer-alpha-checkers -checks='-*,clang-analyzer-*' ./reduced.c -- It seems like it recurses forever for some reason, and then we run out of stack

r348848 - [analyzer] Fix a minor typo.

2018-12-11 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Tue Dec 11 06:40:48 2018 New Revision: 348848 URL: http://llvm.org/viewvc/llvm-project?rev=348848&view=rev Log: [analyzer] Fix a minor typo. Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h Modified: cfe/trunk/include/clang/StaticAnalyzer/Co

[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-11 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3089 + else +OS << "("; + for (CXXTemporaryObjectExpr::arg_iterator Arg = Node->arg_begin(), It might be more maintainer-proof to write this as std::pair Braces; i

[libunwind] r348852 - [cmake] Rename append_if to avoid collision with LLVM

2018-12-11 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Tue Dec 11 07:30:04 2018 New Revision: 348852 URL: http://llvm.org/viewvc/llvm-project?rev=348852&view=rev Log: [cmake] Rename append_if to avoid collision with LLVM Rename the 'append_if' macro used in libunwind to 'unwind_append_if'. Otherwise, when used in a combined LLVM+

[PATCH] D55476: [libunwind] [cmake] Rename append_if to avoid collision with LLVM

2018-12-11 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348852: [cmake] Rename append_if to avoid collision with LLVM (authored by mgorny, committed by ). Herald added subscribers: llvm-commits, christof. Changed prior to commit: https://reviews.llvm.org/D55

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 12 inline comments as done. EricWF added a comment. Address more review comments. Update incoming. Comment at: include/clang/AST/Expr.h:2425 CallExpr(const ASTContext &C, StmtClass SC, unsigned NumPreArgs, - unsigned NumArgs, EmptyShell Empty); +

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 177705. EricWF marked an inline comment as done. EricWF added a comment. Update with fixes for review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55534/new/ https://reviews.llvm.org/D55534 Files: include/clang/AST/Expr.h include/clan

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-11 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 177708. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55413/new/ https://reviews.llvm.org/D55413 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/constant-expression-cxx1y.cpp Index: clang/test/SemaCXX/constan

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: lib/AST/Expr.cpp:1267 : Expr(SC, Empty), NumArgs(NumArgs) { + CallExprBits.UsesADL = false; CallExprBits.NumPreArgs = NumPreArgs; It do not really matter but there is not point initializing this bit here. C

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:1260 +/// Matches call expressions which were resolved using ADL. +/// Don't forget to regenerate the documentation and update Registry.cpp to add clang-query support. C

[PATCH] D42682: [clang-tidy] Add io-functions-misused checker

2018-12-11 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii updated this revision to Diff 177713. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D42682/new/ https://reviews.llvm.org/D42682 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/IoFun

r348858 - Revert "[PowerPC] Make no-PIC default to match GCC - CLANG"

2018-12-11 Thread Stefan Pintilie via cfe-commits
Author: stefanp Date: Tue Dec 11 07:47:57 2018 New Revision: 348858 URL: http://llvm.org/viewvc/llvm-project?rev=348858&view=rev Log: Revert "[PowerPC] Make no-PIC default to match GCC - CLANG" This reverts commit rL348299. Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp cfe/trunk/test

[PATCH] D42682: [clang-tidy] Add io-functions-misused checker

2018-12-11 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii marked 3 inline comments as done. hgabii added inline comments. Comment at: clang-tidy/bugprone/IoFunctionsCheck.cpp:32 +has(cxxMemberCallExpr( +on(hasType(namedDecl(hasAnyName("istream", +callee(cxxMethodDecl(has

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-11 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:3427 -if (!SubobjType->isIntegerType() || !RHS.isInt()) { +if (!SubobjType->isIntegerType() || !RHS.isInt() && !RHS.isFloat()) { // We don't support compound assignment on integer-cast-t

Re: r348858 - Revert "[PowerPC] Make no-PIC default to match GCC - CLANG"

2018-12-11 Thread Aaron Ballman via cfe-commits
On Tue, Dec 11, 2018 at 10:50 AM Stefan Pintilie via cfe-commits wrote: > > Author: stefanp > Date: Tue Dec 11 07:47:57 2018 > New Revision: 348858 > > URL: http://llvm.org/viewvc/llvm-project?rev=348858&view=rev > Log: > Revert "[PowerPC] Make no-PIC default to match GCC - CLANG" > > This reverts

[PATCH] D53023: Prototype OpenCL BIFs using Tablegen

2018-12-11 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added a comment. This looks quite useful, thanks for taking time to do it! I can help verifying some of the tablegen'd builtins with internal tests too, if you decide to pursue this further. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53023/new/ https://reviews.llvm.org/D5302

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-11 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Thanks! I don't have commit access, so I would appreciate it if you could commit the change. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 ___ cfe-commits mailing list cf

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 177716. EricWF added a comment. More tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55534/new/ https://reviews.llvm.org/D55534 Files: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h include/clang/AST/Stmt.h include/clang/ASTMatche

[PATCH] D54592: [analyzer][CStringChecker] evaluate explicit_bzero

2018-12-11 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. ping just want to put it behind :-) thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54592/new/ https://reviews.llvm.org/D54592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-11 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 177719. cpplearner added a comment. Added parentheses. Restored the original tests and add more tests to the end of this function. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55413/new/ https://reviews.llvm.org/D55413

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-11 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner marked an inline comment as done. cpplearner added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx1y.cpp:343 if (a != 7) return false; -a *= 3; if (a != 21) return false; riccibruno wrote: > Why remove `a *= 3` ins

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 177720. EricWF marked 2 inline comments as done. EricWF added a comment. Register matcher and regenerate docs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55534/new/ https://reviews.llvm.org/D55534 Files: docs/LibASTMatchersReference.html incl

r348860 - Adding tests for -ast-dump; NFC.

2018-12-11 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Dec 11 08:34:59 2018 New Revision: 348860 URL: http://llvm.org/viewvc/llvm-project?rev=348860&view=rev Log: Adding tests for -ast-dump; NFC. This adds tests for expressions in C++. Added: cfe/trunk/test/AST/ast-dump-expr.cpp Added: cfe/trunk/test/AST/ast-dump-

[PATCH] D55066: [ASan] Minor documentation fix: clarify static linking limitation.

2018-12-11 Thread Max Moroz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348863: [ASan] Minor documentation fix: clarify static linking limitation. (authored by Dor1s, committed by ). Changed prior to commit: https://reviews.llvm.org/D55066?vs=176712&id=177724#toc Repositor

Re: r348276 - [AST][NFC] Make ArrayTypeTraitExpr non polymorphic

2018-12-11 Thread Bruno Ricci via cfe-commits
Hi Mikael, I can indeed reproduce this with gcc 5.5.0 when doing a Release build with assertions. I cannot reproduce this with gcc 6.5.0 (also with a Release build with assertions), nor can I reproduce this with clang 7 (also with a Release build with assertions). I tried to instrument StringRefC

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added a comment. A few more minor nits. Comment at: docs/LibASTMatchersReference.html:2579-2581 +y(x); Matches +NS::y(x); Doesn't match +y(42); Doesn't match. This is not your bug to fix,

r348863 - [ASan] Minor documentation fix: clarify static linking limitation.

2018-12-11 Thread Max Moroz via cfe-commits
Author: dor1s Date: Tue Dec 11 08:47:12 2018 New Revision: 348863 URL: http://llvm.org/viewvc/llvm-project?rev=348863&view=rev Log: [ASan] Minor documentation fix: clarify static linking limitation. Summary: ASan does not support statically linked binaries, but ASan runtime itself can be statical

r348864 - Pass PartialOverloading argument to the correct corresponding parameter

2018-12-11 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Dec 11 08:53:25 2018 New Revision: 348864 URL: http://llvm.org/viewvc/llvm-project?rev=348864&view=rev Log: Pass PartialOverloading argument to the correct corresponding parameter Modified: cfe/trunk/lib/Sema/SemaOverload.cpp cfe/trunk/test/CodeCompletion/function

r348865 - Reuse code from CGDebugInfo::getOrCreateFile() when creating the file

2018-12-11 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Tue Dec 11 08:58:43 2018 New Revision: 348865 URL: http://llvm.org/viewvc/llvm-project?rev=348865&view=rev Log: Reuse code from CGDebugInfo::getOrCreateFile() when creating the file for the DICompileUnit. This addresses post-commit feedback for D55085. Without this patch, a m

r348866 - Remove CGDebugInfo::getOrCreateFile() and use TheCU->getFile() directly.

2018-12-11 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Tue Dec 11 08:58:46 2018 New Revision: 348866 URL: http://llvm.org/viewvc/llvm-project?rev=348866&view=rev Log: Remove CGDebugInfo::getOrCreateFile() and use TheCU->getFile() directly. Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp cfe/trunk/lib/CodeGen/CGDebugInfo.h

Re: r348858 - Revert "[PowerPC] Make no-PIC default to match GCC - CLANG"

2018-12-11 Thread Stefan Pintilie via cfe-commits
Hi Aaron, Sorry about giving so little info. The commit was reverted because it broke two test cases on an internal buildbot. The reason this was reverted so late was because this failure was buried underneath another set of failures on that same buildbot which initially hid the problem. I'm

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 3 inline comments as done. EricWF added a comment. Address more inline comments. Comment at: docs/LibASTMatchersReference.html:2579-2581 +y(x); Matches +NS::y(x); Doesn't match +y(42); Doesn't match. aaron.ballman wrote: > This is not

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: docs/LibASTMatchersReference.html:2579-2581 +y(x); Matches +NS::y(x); Doesn't match +y(42); Doesn't match. EricWF wrote: > aaron.ballman wrote: > > This is not your bug to fix, but it seems the document

[PATCH] D55561: Stop stripping comments from AST matcher example code

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: JonasToth, klimek. The AST matcher documentation dumping script was being a bit over-zealous about stripping comment markers, which ended up causing comments in example code to stop being comments. This patch fixes that by only

[PATCH] D55544: Warning: objc-encodings-larger-than=

2018-12-11 Thread Dave MacLachlan via Phabricator via cfe-commits
dmaclach updated this revision to Diff 177732. dmaclach added a comment. Added some spacing around early exit as requested by theraven. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55544/new/ https://reviews.llvm.org/D55544 Files: docs/ReleaseNotes.rst incl

[PATCH] D55562: Atomics: support min/max orthogonally

2018-12-11 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover created this revision. t.p.northover added reviewers: delena, yaxunl. Herald added subscribers: jfb, mcrosier. We seem to have been gradually growing support for atomic min/max operations (exposing longstanding IR atomicrmw instructions). But until now there have been gaps in the e

[PATCH] D55544: Warning: objc-encodings-larger-than=

2018-12-11 Thread Dave MacLachlan via Phabricator via cfe-commits
dmaclach added a comment. In D55544#1326956 , @theraven wrote: > It would probably be a good idea to have a similar check on properties, as > property encoding strings contain the type encoding (plus extra stuff). Properties are already picked up based

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: lib/AST/Expr.cpp:1267 : Expr(SC, Empty), NumArgs(NumArgs) { + CallExprBits.UsesADL = false; CallExprBits.NumPreArgs = NumPreArgs; I believe that msan can cope with bit level operations just fine. What I am af

Re: r348858 - Revert "[PowerPC] Make no-PIC default to match GCC - CLANG"

2018-12-11 Thread Aaron Ballman via cfe-commits
On Tue, Dec 11, 2018 at 12:07 PM Stefan Pintilie wrote: > > Hi Aaron, > > Sorry about giving so little info. No worries! > The commit was reverted because it broke two test cases on an internal > buildbot. The reason this was reverted so late was because this failure was > buried underneath an

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Sema/Sema.h:2758 bool AllowExplicit = false, +bool IsADLCandidate = false, ConversionSequenceList EarlyConversions = None); --

[PATCH] D55226: [Fix][StaticAnalyzer] Bug 39792 - False positive on strcpy targeting struct member

2018-12-11 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh added a comment. Hello! I'm pinging since it's been a week. If someone can commit this patch on my behalf, that would be great. Thank you :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55226/new/ https://reviews.llvm.org/D55226 _

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: lib/AST/Expr.cpp:1267 : Expr(SC, Empty), NumArgs(NumArgs) { + CallExprBits.UsesADL = false; CallExprBits.NumPreArgs = NumPreArgs; riccibruno wrote: > I believe that msan can cope with bit level operations jus

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-12-11 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Here's the test case that we have https://reviews.llvm.org/P8123 gcc seems to accept it at O0 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54355/new/ https://reviews.llvm.org/D54355

[PATCH] D54592: [analyzer][CStringChecker] evaluate explicit_bzero

2018-12-11 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. Looks good, thanks! Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2216 + // In this case we just return. + if (StateZeroSize && !StateNonZeroSize) { +C.addTransi

[PATCH] D54923: [Modules] Remove non-determinism while serializing DECL_CONTEXT_LEXICAL and DECL_RECORD

2018-12-11 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54923/new/ https://reviews.llvm.org/D54923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D55482: [clang-tidy] Improve google-objc-function-naming diagnostics 📙

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/google/FunctionNamingCheck.cpp:113 + const bool IsGlobal = MatchedDecl->getStorageClass() != SC_Static; diag(MatchedDecl->getLocation(), Drop the top-level `const` qualifier, please.

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-12-11 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. @joerg Yeah, we saw the commit explaining why the original fwd declaration patch was reverted. However, from what I can see, we only have three ways to fix the cyclic dependency between glibc and Clang's internal module: 1. We say that we don't support including mm_ma

[PATCH] D55562: Atomics: support min/max orthogonally

2018-12-11 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. What does it do with floating-point inputs? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55562/new/ https://reviews.llvm.org/D55562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-12-11 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D54355#1327237 , @craig.topper wrote: > Here's the test case that we have https://reviews.llvm.org/P8123 gcc seems > to accept it at O0 Smaller test case: extern unsigned long long __sdt_unsp; void foo() { __a

r348884 - [analyzer][CStringChecker] evaluate explicit_bzero

2018-12-11 Thread David Carlier via cfe-commits
Author: devnexen Date: Tue Dec 11 10:57:07 2018 New Revision: 348884 URL: http://llvm.org/viewvc/llvm-project?rev=348884&view=rev Log: [analyzer][CStringChecker] evaluate explicit_bzero - explicit_bzero has limited scope/usage only for security/crypto purposes but is non-optimisable version of

[PATCH] D54592: [analyzer][CStringChecker] evaluate explicit_bzero

2018-12-11 Thread David CARLIER via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348884: [analyzer][CStringChecker] evaluate explicit_bzero (authored by devnexen, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D54592?vs=177

[PATCH] D55544: Warning: objc-encodings-larger-than=

2018-12-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for working on this! Could you please post a patch with full context (git diff -U)? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55544/new/ https://reviews.llvm.org/D55544 ___ c

[PATCH] D55544: Warning: objc-encodings-larger-than=

2018-12-11 Thread Dave MacLachlan via Phabricator via cfe-commits
dmaclach updated this revision to Diff 177744. dmaclach marked an inline comment as done. dmaclach added a comment. Full Diffs as requested. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55544/new/ https://reviews.llvm.org/D55544 Files: docs/ReleaseNotes.rst

[PATCH] D55544: Warning: objc-encodings-larger-than=

2018-12-11 Thread Dave MacLachlan via Phabricator via cfe-commits
dmaclach updated this revision to Diff 177746. dmaclach added a comment. Updated to fix Stephane's good catch of Objective C vs Objective-C Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55544/new/ https://reviews.llvm.org/D55544 Files: docs/ReleaseNotes.rst

[PATCH] D55561: Stop stripping comments from AST matcher example code

2018-12-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55561/new/ https://reviews.llvm.org/D55561 ___ cfe-commits mailing list cfe-com

[PATCH] D55488: Add utility for dumping a label with child nodes

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/AST/ASTDumper.cpp:89 void dumpDecl(const Decl *D); -void dumpStmt(const Stmt *S); +void dumpStmt(const Stmt *S, const std::string &label = {}); steveire wrote: > aaron.ballman wrote: > > Label >

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in r348889, thank you for the patch! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 ___ cfe-commits mailing list cfe-co

r348889 - Emit -Wformat properly for bit-field promotions.

2018-12-11 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Dec 11 11:18:01 2018 New Revision: 348889 URL: http://llvm.org/viewvc/llvm-project?rev=348889&view=rev Log: Emit -Wformat properly for bit-field promotions. Only explicitly look through integer and floating-point promotion where the result type is actually a promot

Re: r348889 - Emit -Wformat properly for bit-field promotions.

2018-12-11 Thread Aaron Ballman via cfe-commits
On Tue, Dec 11, 2018 at 2:21 PM Aaron Ballman via cfe-commits wrote: > > Author: aaronballman > Date: Tue Dec 11 11:18:01 2018 > New Revision: 348889 > > URL: http://llvm.org/viewvc/llvm-project?rev=348889&view=rev > Log: > Emit -Wformat properly for bit-field promotions. > > Only explicitly look

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-11 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: test/clang-tidy/abseil-duration-subtraction.cpp:12 + // CHECK-FIXES: absl::ToDoubleSeconds(d - absl::Seconds(1)) + x = absl::ToDoubleSeconds(d) - absl::ToDoubleSeconds(d1); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtract

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-11 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 177749. hwright marked 6 inline comments as done. hwright added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55245/new/ https://reviews.llvm.org/D55245 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeList

r348891 - Stop stripping comments from AST matcher example code.

2018-12-11 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Dec 11 11:30:49 2018 New Revision: 348891 URL: http://llvm.org/viewvc/llvm-project?rev=348891&view=rev Log: Stop stripping comments from AST matcher example code. The AST matcher documentation dumping script was being a bit over-zealous about stripping comment mark

[PATCH] D55561: Stop stripping comments from AST matcher example code

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r348891. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55561/new/ https://reviews.llvm.org/D55561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 13 inline comments as done. EricWF added inline comments. Comment at: include/clang/Sema/Sema.h:2758 bool AllowExplicit = false, +bool IsADLCandidate = false, ConversionSequenceLis

[PATCH] D55566: [analyzer] LiveVariables: Fix a zombie expression problem, add testing infrastructure.

2018-12-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, george.karpenkov, szepet, rnkovacs, Szelethus. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, baloghadamsoftware. For the first time in years, there seems to be a bug in our "

r348892 - Revert r348889; it fails some tests.

2018-12-11 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Dec 11 11:42:04 2018 New Revision: 348892 URL: http://llvm.org/viewvc/llvm-project?rev=348892&view=rev Log: Revert r348889; it fails some tests. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/40784 Removed: cfe/trunk/test/Se

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman reopened this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I had to revert the commit as the changes caused some test failures. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/40784/steps/test/logs/stdi

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 177752. EricWF marked 3 inline comments as done. EricWF added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55534/new/ https://reviews.llvm.org/D55534 Files: docs/LibASTMatchersReference.html include/clang/AST

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added a comment. I think this is good to go. Any more comments? Comment at: include/clang/Sema/Sema.h:2758 bool AllowExplicit = false, +bool IsADLCandidate = false,

[PATCH] D55566: [analyzer] LiveVariables: Fix a zombie expression problem, add testing infrastructure.

2018-12-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 177753. NoQ added a comment. Add documentation, fix checker help message. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55566/new/ https://reviews.llvm.org/D55566 Files: docs/analyzer/DebugChecks.rst include/clang/Analysis/Analyses/LiveVariables.h

[PATCH] D55447: [Sema] Fix Modified Type in address_space AttributedType

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/tools/libclang/CXType.cpp:132 + if (!(TU->ParsingOptions & CXTranslationUnit_IncludeAttributedTypes) && + ATT->getAttrKind() != attr::AddressSpace) { return MakeCXType(ATT->getModifiedType(), TU); -

[PATCH] D55410: [clang-tidy] check for flagging using declarations in headers

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: docs/clang-tidy/checks/abseil-alias-free-headers.rst:13 +The style guide http://google.github.io/styleguide/cppguide.html#Aliases discusses this +issue in more detail Eugene.Zelenko wrote: > Naysh wrote: > > Euge

[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker

2018-12-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, i think i get it. `Cached` is a reference. Changing `Memoization` will invalidate references because `DenseMap` doesn't provide the respective guarantee. Here's how the code should have looked: ~ 77 Optional Cached = Memoization[C]; ~ 78 if (!Cached) {

[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker

2018-12-11 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @NoQ thanks, interesting! But I thought the underlying map is not actually modified while the reference is alive? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54921/new/ https://reviews.llvm.org/D54921 __

[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker

2018-12-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I think that it is modified, at least, when `Memoization[C]` is evaluated. The object needs to be created and put into the map in order to obtain a reference to it. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54921/new/ https://reviews.ll

[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker

2018-12-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. That is, it is modified within the recursive call. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54921/new/ https://reviews.llvm.org/D54921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1204 + VariadicUnsignedArgument<"PayloadIndices">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [Undocumented]; jdoerfert wrote: > aaron.ballman wrote:

  1   2   >