[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:442 + +const RecordDecl *RD = RT->getDecl()->getDefinition(); +for (const auto *I : RD->fields()) { a.sidorin wrote: > vlad.tsyrklevich wrote: > > a.si

r295156 - Add a definition for __STRUCT_PARM_ALIGN__ for elfv2 and 64-bit darwin platforms to match what other compilers produce.

2017-02-15 Thread Eric Christopher via cfe-commits
Author: echristo Date: Wed Feb 15 01:50:11 2017 New Revision: 295156 URL: http://llvm.org/viewvc/llvm-project?rev=295156&view=rev Log: Add a definition for __STRUCT_PARM_ALIGN__ for elfv2 and 64-bit darwin platforms to match what other compilers produce. Modified: cfe/trunk/lib/Basic/Targets

Re: r295156 - Add a definition for __STRUCT_PARM_ALIGN__ for elfv2 and 64-bit darwin platforms to match what other compilers produce.

2017-02-15 Thread Tim Shen via cfe-commits
On Wed, Feb 15, 2017, 00:01 Eric Christopher via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: echristo > Date: Wed Feb 15 01:50:11 2017 > New Revision: 295156 > > URL: http://llvm.org/viewvc/llvm-project?rev=295156&view=rev > Log: > Add a definition for __STRUCT_PARM_ALIGN__ for elfv

Re: r295156 - Add a definition for __STRUCT_PARM_ALIGN__ for elfv2 and 64-bit darwin platforms to match what other compilers produce.

2017-02-15 Thread Eric Christopher via cfe-commits
The PPC one should inherit from this. You're right I should have tested it though. Mostly ppc Darwin isn't well supported. On Wed, Feb 15, 2017, 12:06 AM Tim Shen wrote: > On Wed, Feb 15, 2017, 00:01 Eric Christopher via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > Author: echristo > D

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 88493. vlad.tsyrklevich added a comment. Remove an unnecessary call to `getBaseRegion()`, remove the logic to create a new SymbolDerived as it's currently unused, and add a comment to reflect that `getLCVSymbol()` is called in a PostStmt and a defau

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:502 +RegionBindingsRef B = getRegionBindings(S); +const MemRegion *MR = L.getRegion()->getBaseRegion(); +if (Optional V = B.getDefaultBinding(MR)) vlad.tsyrkl

[PATCH] D29910: [OpenMP] Specialize default schedule on a worksharing loop on the NVPTX device.

2017-02-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D29910#676777, @arpith-jacob wrote: > Hi Alexey, > > Thank you for reviewing this patch. > > > I don't like the idea of adding some kind of default scheduling, that is > > not defined in standard in Sema > > Actually, "default scheduling" is d

Re: r295114 - Improve diagnostic reporting when using __declspec without enabling __declspec as a keyword.

2017-02-15 Thread Mikael Holmén via cfe-commits
Hi, Saw now that it's already been fixed. Sorry for the spam :/ Regards, Mikael On 02/15/2017 07:39 AM, Mikael Holmén wrote: Hi Aaron, On 02/14/2017 11:47 PM, Aaron Ballman via cfe-commits wrote: Author: aaronballman Date: Tue Feb 14 16:47:20 2017 New Revision: 295114 URL: http://llvm.org/

[PATCH] D28862: [compiler-rt] [test] Use approximate comparison on float types

2017-02-15 Thread Michał Górny via Phabricator via cfe-commits
mgorny abandoned this revision. mgorny added a comment. I've opened http://bugs.llvm.org/show_bug.cgi?id=31964 to track this further. I don't really have time to look into it in more detail at the moment. Repository: rL LLVM https://reviews.llvm.org/D28862

r295163 - [XRAY][MIPS] Add -fxray-instrument for mips/mipsel/mips64/mips64el

2017-02-15 Thread Sagar Thakur via cfe-commits
Author: slthakur Date: Wed Feb 15 04:41:38 2017 New Revision: 295163 URL: http://llvm.org/viewvc/llvm-project?rev=295163&view=rev Log: [XRAY][MIPS] Add -fxray-instrument for mips/mipsel/mips64/mips64el Summary: Adds xray instrument option for mips/mipsel/mips64/mips64el. Reviewed by sdardis, dbe

[PATCH] D28278: [StaticAnalyzer] dont show wrong 'garbage value' warning when there is array index out of bounds

2017-02-15 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. I am not against that the error is shown as long as it's not misleading/wrong. To avoid misleading, in my humble opinion the error message should say "array index out of bounds". Repository: rL LLVM https://reviews.llvm.org/D28278

[PATCH] D28297: [StaticAnalyzer] Fix crash in CastToStructChecker

2017-02-15 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. In https://reviews.llvm.org/D28297#642523, @NoQ wrote: > Looks good. I assume the crash is in `getTypeInfo()`; do you have any idea > what are exact prerequisites for using this method? So that there were no > more crashes here. Yes. The crash happens during t

r295167 - Removed stale comment. NFC.

2017-02-15 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Wed Feb 15 05:34:11 2017 New Revision: 295167 URL: http://llvm.org/viewvc/llvm-project?rev=295167&view=rev Log: Removed stale comment. NFC. The case of extern inline functions in GNU89 mode is now handled in `canRedefineFunction`, which has appropriate comment. Modified:

[PATCH] D13289: [libc++] Provide additional templates for valarray transcendentals that satisfy the standard synopsis

2017-02-15 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath added a comment. I've raised PR31966 to poke this :) https://reviews.llvm.org/D13289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D23421: [Clang-tidy] CERT-DCL58-CPP (checker for std namespace modification)

2017-02-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 88506. xazax.hun marked 3 inline comments as done. xazax.hun retitled this revision from "[Clang-tidy] CERT-MSC53-CPP (checker for std namespace modification)" to "[Clang-tidy] CERT-DCL58-CPP (checker for std namespace modification)". xazax.hun edited the s

[PATCH] D29032: [mips] Define macros related to -mabicalls in the preprocessor

2017-02-15 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. @joerg ping? https://reviews.llvm.org/D29032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r295172 - Use dedicated method instead of copying conditions. NFC.

2017-02-15 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Wed Feb 15 06:30:35 2017 New Revision: 295172 URL: http://llvm.org/viewvc/llvm-project?rev=295172&view=rev Log: Use dedicated method instead of copying conditions. NFC. Modified: cfe/trunk/lib/AST/Decl.cpp Modified: cfe/trunk/lib/AST/Decl.cpp URL: http://llvm.org/vie

[PATCH] D29957: [clang-tidy] Ignore instantiated functions and static data members of classes in misc-definitions-in-headers.

2017-02-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D29957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LGTM. Please wait for Aaron as well. Repository: rL LLVM https://reviews.llvm.org/D28768 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-15 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer updated this revision to Diff 88515. bkramer marked 16 inline comments as done. bkramer added a comment. - Address review comments. https://reviews.llvm.org/D29886 Files: clangd/ASTManager.cpp clangd/ASTManager.h clangd/CMakeLists.txt clangd/ClangDMain.cpp clangd/DocumentStore

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-15 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added inline comments. Comment at: clangd/ASTManager.cpp:21 +using namespace clang; +using namespace clangd; + ioeric wrote: > Any reason not to wrap code in namespaces instead? I don't really have an opinion one way or the other, but this seems to be the

[PATCH] D29986: Fix crash when an incorrect redeclaration only differs in __unaligned type-qualifier

2017-02-15 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 created this revision. This patch fixes an assertion that is hit when a redeclaration with differing types only differs in the unaligned type-qualifier. https://reviews.llvm.org/D29986 Files: lib/AST/ASTContext.cpp test/Sema/unaligned-qualifier.c Index: test/Sema/unaligned-quali

[PATCH] D23421: [Clang-tidy] CERT-DCL58-CPP (checker for std namespace modification)

2017-02-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cert/DontModifyStdNamespaceCheck.cpp:28 + anyOf(hasName("std"), hasName("posix")), + has(decl(unless(cxxRecordDecl(isExplicitTemplateSpecialization()) + .bind("nmspc"), I t

[libcxxabi] r295175 - Fix couple of test failures when using the LIBCXXABI_SILENT_TERMINATE mode.

2017-02-15 Thread Asiri Rathnayake via cfe-commits
Author: asiri Date: Wed Feb 15 07:43:05 2017 New Revision: 295175 URL: http://llvm.org/viewvc/llvm-project?rev=295175&view=rev Log: Fix couple of test failures when using the LIBCXXABI_SILENT_TERMINATE mode. When libcxxabi is built in LIBCXXABI_SILENT_TERMINATE mode, libcxx test suite reports tw

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-15 Thread Wojciech Cierpucha via Phabricator via cfe-commits
cierpuchaw added inline comments. Comment at: clangd/DocumentStore.h:42 /// Delete a document from the store. - void removeDocument(StringRef Uri) { Docs.erase(Uri); } + void removeDocument(StringRef Uri) { Docs.erase(Uri); +for (const auto &Listener : Listeners) ---

[clang-tools-extra] r295176 - [clang-tidy] Don't warn about call to unresolved operator*

2017-02-15 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Feb 15 08:01:41 2017 New Revision: 295176 URL: http://llvm.org/viewvc/llvm-project?rev=295176&view=rev Log: [clang-tidy] Don't warn about call to unresolved operator* Summary: The misc-unconventional-assign-operator check had a false positive warning when the 'op

[PATCH] D29393: [clang-tidy] Don't warn about call to unresolved operator*

2017-02-15 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. malcolm.parsons marked 4 inline comments as done. Closed by commit rL295176: [clang-tidy] Don't warn about call to unresolved operator* (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D293

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. There's one small wording nit with the diagnostic, but once that's resolved, LGTM as well. Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:65 + + auto Diag = diag(Loc, "to avoid repeating the

[PATCH] D29757: [libcxx] Threading support: Externalize hardware_concurrency()

2017-02-15 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath added a comment. Ping? https://reviews.llvm.org/D29757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29967: Get class property selectors from property decl if it exists

2017-02-15 Thread David Herzka via Phabricator via cfe-commits
herzka updated this revision to Diff 88519. herzka edited the summary of this revision. herzka added a comment. Added full context. Sorry about that! This is my first contribution, and I don't know how I completely missed that line while going through the steps. https://reviews.llvm.org/D29967

[PATCH] D29957: [clang-tidy] Ignore instantiated functions and static data members of classes in misc-definitions-in-headers.

2017-02-15 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295178: [clang-tidy] Ignore instantiated functions and static data members of classes… (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D29957?vs=88413&id=88520#toc Repository:

[clang-tools-extra] r295178 - [clang-tidy] Ignore instantiated functions and static data members of classes in misc-definitions-in-headers.

2017-02-15 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Feb 15 08:10:50 2017 New Revision: 295178 URL: http://llvm.org/viewvc/llvm-project?rev=295178&view=rev Log: [clang-tidy] Ignore instantiated functions and static data members of classes in misc-definitions-in-headers. Reviewers: alexfh Reviewed By: alexfh Subscribers:

[PATCH] D29032: [mips] Define macros related to -mabicalls in the preprocessor

2017-02-15 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. No need to preserve the BSD behavior for NetBSD. https://reviews.llvm.org/D29032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29818: [libcxx] Threading support: Attempt to externalize system_clock::now() and steady_clock::now() implementations

2017-02-15 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath added a comment. Ping? https://reviews.llvm.org/D29818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-15 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer updated this revision to Diff 88522. bkramer added a comment. - Do not lock while running DocumentStore callbacks - Replace fake queue with a real queue (but it still has at most one element. https://reviews.llvm.org/D29886 Files: clangd/ASTManager.cpp clangd/ASTManager.h clangd/C

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-15 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clangd/ASTManager.h:67 + /// Setting Done to true will make the worker thread terminate. + std::atomic Done; +}; bkramer wrote: > klimek wrote: > > arphaman wrote: > > > It looks like `Done` is always accessed in a scop

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-15 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer updated this revision to Diff 88523. bkramer added a comment. - Inline the request struct again. https://reviews.llvm.org/D29886 Files: clangd/ASTManager.cpp clangd/ASTManager.h clangd/CMakeLists.txt clangd/ClangDMain.cpp clangd/DocumentStore.h test/clangd/diagnostics.test

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-15 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg Comment at: clangd/ASTManager.cpp:138-139 + // Currently we discard all pending requests and just enqueue the latest one. + while (!RequestQueue.empty()) +RequestQue

[PATCH] D28058: [OpenCL] Correct ndrange_t implementation

2017-02-15 Thread Dmitry Borisenkov via Phabricator via cfe-commits
dmitry updated this revision to Diff 88529. dmitry added a comment. Byval attribute was added for ndrange in enqueue kernel call. https://reviews.llvm.org/D28058 Files: include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/AST/Type.h include/clang/Serialization

[PATCH] D29884: [analyzer] Proper caching in CallDescription objects.

2017-02-15 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. Yep, seems that somebody has missed these issues :) I guess there's no way to test the operator case, because nobody made a CallDescription with an empty name for us (maybe we should even assert tha

[clang-tools-extra] r295180 - [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Feb 15 09:04:20 2017 New Revision: 295180 URL: http://llvm.org/viewvc/llvm-project?rev=295180&view=rev Log: [clangd] Wire up ASTUnit and publish diagnostics with it. Summary: This requires an accessible compilation database. The parsing is done asynchronously on a separate t

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295180: [clangd] Wire up ASTUnit and publish diagnostics with it. (authored by d0k). Changed prior to commit: https://reviews.llvm.org/D29886?vs=88523&id=88532#toc Repository: rL LLVM https://review

r295183 - Fix spelling mistake - paramater -> parameter. NFCI.

2017-02-15 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Feb 15 09:12:06 2017 New Revision: 295183 URL: http://llvm.org/viewvc/llvm-project?rev=295183&view=rev Log: Fix spelling mistake - paramater -> parameter. NFCI. Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp cfe/trunk/lib/CodeGen/CGCall.cpp cfe/trunk/lib/Sem

[PATCH] D28058: [OpenCL] Correct ndrange_t implementation

2017-02-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks! https://reviews.llvm.org/D28058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D28297: [StaticAnalyzer] Fix crash in CastToStructChecker

2017-02-15 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. I sometimes wish ASTContext methods just didn't crash :) Oh well, let's just see if more problems show up. Comment at: lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp:93

[clang-tools-extra] r295184 - [clangd] Add missing include.

2017-02-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Feb 15 09:19:13 2017 New Revision: 295184 URL: http://llvm.org/viewvc/llvm-project?rev=295184&view=rev Log: [clangd] Add missing include. Modified: clang-tools-extra/trunk/clangd/DocumentStore.h Modified: clang-tools-extra/trunk/clangd/DocumentStore.h URL: http://llvm.

r295186 - [analyzer] Proper caching in CallDescription objects.

2017-02-15 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Wed Feb 15 09:35:56 2017 New Revision: 295186 URL: http://llvm.org/viewvc/llvm-project?rev=295186&view=rev Log: [analyzer] Proper caching in CallDescription objects. During the review of D29567 it turned out the caching in CallDescription is not implemented properly. In case

[PATCH] D29884: [analyzer] Proper caching in CallDescription objects.

2017-02-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295186: [analyzer] Proper caching in CallDescription objects. (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D29884?vs=88166&id=88537#toc Repository: rL LLVM https://reviews.

[clang-tools-extra] r295187 - [clangd] Fix use after free.

2017-02-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Feb 15 09:56:14 2017 New Revision: 295187 URL: http://llvm.org/viewvc/llvm-project?rev=295187&view=rev Log: [clangd] Fix use after free. Modified: clang-tools-extra/trunk/clangd/ProtocolHandlers.cpp Modified: clang-tools-extra/trunk/clangd/ProtocolHandlers.cpp URL: htt

[PATCH] D23421: [Clang-tidy] CERT-DCL58-CPP (checker for std namespace modification)

2017-02-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 88541. xazax.hun added a comment. - Do not warn for function specializations within the std namespace. - Add a test case for swap. https://reviews.llvm.org/D23421 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/cert/CMakeLists.txt clang-tidy/ce

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-02-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/ThrowWithNoexceptCheck.cpp:54 +// FIXME use DiagnosticIDs::Level::Note +diag(NoExceptRange.getBegin(), "in a function declared no-throw here:", DiagnosticIDs::Note) +<< FixItHint::CreateRemoval(NoExceptRan

[PATCH] D29884: [analyzer] Proper caching in CallDescription objects.

2017-02-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D29884#677387, @NoQ wrote: > Yep, seems that somebody has missed these issues :) > > I guess there's no way to test the operator case, because nobody made a > CallDescription with an empty name for us (maybe we should even assert that). Th

[PATCH] D29884: [analyzer] Proper caching in CallDescription objects.

2017-02-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:73 + : II(nullptr), IsLookupDone(false), FuncName(FuncName), +RequiredArgs(RequiredArgs) {} Maybe `assert(FuncName.size() > 0)` here? Re

[PATCH] D29884: [analyzer] Proper caching in CallDescription objects.

2017-02-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:73 + : II(nullptr), IsLookupDone(false), FuncName(FuncName), +RequiredArgs(RequiredArgs) {} NoQ wrote: > Maybe `assert(FuncName.size

r295191 - [index] USR generation: use getTemplateArgs() instead of getTemplateInstantiationArgs()

2017-02-15 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Wed Feb 15 10:16:27 2017 New Revision: 295191 URL: http://llvm.org/viewvc/llvm-project?rev=295191&view=rev Log: [index] USR generation: use getTemplateArgs() instead of getTemplateInstantiationArgs() Otherwise we may end up creating a different USR for the definition of

[PATCH] D29884: [analyzer] Proper caching in CallDescription objects.

2017-02-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:73 + : II(nullptr), IsLookupDone(false), FuncName(FuncName), +RequiredArgs(RequiredArgs) {} xazax.hun wrote: > NoQ wrote: > > Maybe `asser

[clang-tools-extra] r295192 - [clang-tidy] Don't delay parsing of templates in test for misc-unconventional-assign-operator

2017-02-15 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Feb 15 10:32:55 2017 New Revision: 295192 URL: http://llvm.org/viewvc/llvm-project?rev=295192&view=rev Log: [clang-tidy] Don't delay parsing of templates in test for misc-unconventional-assign-operator Modified: clang-tools-extra/trunk/test/clang-tidy/misc-

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-15 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere updated this revision to Diff 88550. JDevlieghere added a comment. Fixed latest comment from @aaron.ballman before landing. Repository: rL LLVM https://reviews.llvm.org/D28768 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tid

[clang-tools-extra] r295193 - [clangd] Initialize the thread after the mutex.

2017-02-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Feb 15 10:34:58 2017 New Revision: 295193 URL: http://llvm.org/viewvc/llvm-project?rev=295193&view=rev Log: [clangd] Initialize the thread after the mutex. Otherwise locking the mutex yields a racy assertion failure on picky implementations. Modified: clang-tools-extra/

[clang-tools-extra] r295194 - [clangd] Synchronize logs access.

2017-02-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Feb 15 10:44:11 2017 New Revision: 295194 URL: http://llvm.org/viewvc/llvm-project?rev=295194&view=rev Log: [clangd] Synchronize logs access. I don't think that this is necessary for correctness, but makes tsan much more useful. Modified: clang-tools-extra/trunk/clangd/

[PATCH] D29599: Clang Changes for alloc_align

2017-02-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Ah, I see! Sorry for missing that. I don't see a reason why we cannot support that, but I wasn't really considering it. In general, this attribute is a compiler hint for some C standard library stuff in glibc. I've been playing with it a few hours now, and it seem

[clang-tools-extra] r295196 - [clangd] Silence GCC warning about falling off a fully covered switch.

2017-02-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Feb 15 10:58:44 2017 New Revision: 295196 URL: http://llvm.org/viewvc/llvm-project?rev=295196&view=rev Log: [clangd] Silence GCC warning about falling off a fully covered switch. Modified: clang-tools-extra/trunk/clangd/ASTManager.cpp Modified: clang-tools-extra/trunk/c

[clang-tools-extra] r295198 - [clangd] Fix another use after free that I missed because COW strings.

2017-02-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Feb 15 11:04:57 2017 New Revision: 295198 URL: http://llvm.org/viewvc/llvm-project?rev=295198&view=rev Log: [clangd] Fix another use after free that I missed because COW strings. Modified: clang-tools-extra/trunk/clangd/ProtocolHandlers.cpp Modified: clang-tools-extra/t

[clang-tools-extra] r295199 - [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-15 Thread Jonas Devlieghere via cfe-commits
Author: jdevlieghere Date: Wed Feb 15 11:06:06 2017 New Revision: 295199 URL: http://llvm.org/viewvc/llvm-project?rev=295199&view=rev Log: [clang-tidy] Add check 'modernize-return-braced-init-list' Summary: Replaces explicit calls to the constructor in a return with a braced initializer list. Thi

[PATCH] D29032: [mips] Define macros related to -mabicalls in the preprocessor

2017-02-15 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. Ok, I'll have `__mips_abicalls` unconditionally defined for everyone, The other two BSD's will have the traditional macro defined as well. https://reviews.llvm.org/D29032 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[libunwind] r295202 - Revert "[libunwind][CMake] Use libc++ headers when available"

2017-02-15 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Feb 15 11:15:41 2017 New Revision: 295202 URL: http://llvm.org/viewvc/llvm-project?rev=295202&view=rev Log: Revert "[libunwind][CMake] Use libc++ headers when available" This causing build failure on sanitizer bots because of the unused argument '-nostdinc++' during linki

[clang-tools-extra] r295205 - Fixed indentation issue in release notes

2017-02-15 Thread Jonas Devlieghere via cfe-commits
Author: jdevlieghere Date: Wed Feb 15 11:19:44 2017 New Revision: 295205 URL: http://llvm.org/viewvc/llvm-project?rev=295205&view=rev Log: Fixed indentation issue in release notes Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst

[clang-tools-extra] r295207 - [clang-tidy] Fix test modernize-return-braced-init-list

2017-02-15 Thread Jonas Devlieghere via cfe-commits
Author: jdevlieghere Date: Wed Feb 15 11:37:58 2017 New Revision: 295207 URL: http://llvm.org/viewvc/llvm-project?rev=295207&view=rev Log: [clang-tidy] Fix test modernize-return-braced-init-list Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-return-braced-init-list.cpp Modified

[PATCH] D29990: [clangd] Implement format on type

2017-02-15 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added inline comments. Comment at: clangd/ProtocolHandlers.cpp:117 + // starting from there. + StringRef Code = Store.getDocument(DOTFP->textDocument.uri); + size_t CursorPos = positionToOffset(Code, DOTFP->position); This should be a std::string in tr

[PATCH] D26654: [CMake] Add Fuchsia toolchain CMake cache files

2017-02-15 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 88575. Repository: rL LLVM https://reviews.llvm.org/D26654 Files: cmake/caches/Fuchsia-stage2.cmake cmake/caches/Fuchsia.cmake Index: cmake/caches/Fuchsia.cmake === --- /dev/null +++ cmake

[libcxx] r295214 - Merging r294431:

2017-02-15 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed Feb 15 12:40:52 2017 New Revision: 295214 URL: http://llvm.org/viewvc/llvm-project?rev=295214&view=rev Log: Merging r294431: r294431 | mgorny | 2017-02-08 01:57:32 -0800 (Wed, 08 Feb 2017) | 7 lines [t

Re: [libcxx] r294431 - [test] Fix hard_link_count test to account for fs with dir nlink==1

2017-02-15 Thread Hans Wennborg via cfe-commits
Michal requested this to be merged in PR31965, it seems fine to me, and Marshall OK'd it in an email to me. Merged in r295214. On Wed, Feb 8, 2017 at 1:57 AM, Michal Gorny via cfe-commits wrote: > Author: mgorny > Date: Wed Feb 8 03:57:32 2017 > New Revision: 294431 > > URL: http://llvm.org/view

[PATCH] D30000: Fix for pr31836 - pp_nonportable_path on absolute paths: broken delimiters

2017-02-15 Thread Taewook Oh via Phabricator via cfe-commits
twoh created this revision. This is a patch for PR31836. As the bug replaces the path separators in the included file name with the characters following them, the test script makes sure that there's no "Ccase-insensitive-include-pr31836.h" in the warning message. https://reviews.llvm.org/D300

[PATCH] D23421: [Clang-tidy] CERT-DCL58-CPP (checker for std namespace modification)

2017-02-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for working on this! https://reviews.llvm.org/D23421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D30000: Fix for pr31836 - pp_nonportable_path on absolute paths: broken delimiters

2017-02-15 Thread Eric Niebler via Phabricator via cfe-commits
eric_niebler added a subscriber: karies. eric_niebler added inline comments. Comment at: lib/Lex/PPDirectives.cpp:1983 + isLeadingSeparator = false; +else + Path.append(Component); What happens on Windows for an absolute path like "C:/he

[PATCH] D30002: [clang-tidy] Fix handling of methods with try-statement as a body in modernize-use-override

2017-02-15 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode created this revision. idlecode added a project: clang-tools-extra. Herald added a subscriber: JDevlieghere. Fix generated by modernize-use-override caused syntax error when method used try-statement as a body. `override` keyword was inserted after last declaration token which happened to

[PATCH] D29778: Declare lgamma library builtins as never being const

2017-02-15 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: include/clang/Basic/Builtins.def:1091 +LIBBUILTIN(lgammaf, "ff", "fn", "math.h", ALL_LANGUAGES) +LIBBUILTIN(lgammal, "LdLd", "fn", "math.h", ALL_LANGUAGES) Please add a comment explaining why this doesn't have an "e"

Re: r295149 - Fix assertion failure due to implicit special member lookup lacking a source location.

2017-02-15 Thread Hans Wennborg via cfe-commits
IIUC, this is a follow-up to r291955, which was merged to 4.0. Should this one be merged also? Cheers, Hans On Tue, Feb 14, 2017 at 8:18 PM, Richard Smith via cfe-commits wrote: > Author: rsmith > Date: Tue Feb 14 22:18:23 2017 > New Revision: 295149 > > URL: http://llvm.org/viewvc/llvm-project?

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-15 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
alekseyshl added a comment. http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/2437 is broken by this revision. Repository: rL LLVM https://reviews.llvm.org/D29886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

Re: r295150 - [Sema] Disallow returning a __block variable via a move.

2017-02-15 Thread Akira Hatanaka via cfe-commits
Hans, Can this be merged to 4.0 too? > On Feb 14, 2017, at 9:15 PM, Akira Hatanaka via cfe-commits > wrote: > > Author: ahatanak > Date: Tue Feb 14 23:15:28 2017 > New Revision: 295150 > > URL: http://llvm.org/viewvc/llvm-project?rev=295150&view=rev > Log: > [Sema] Disallow returning a __bloc

[PATCH] D30000: Fix for pr31836 - pp_nonportable_path on absolute paths: broken delimiters

2017-02-15 Thread Taewook Oh via Phabricator via cfe-commits
twoh updated this revision to Diff 88584. twoh added a comment. Make it explicit that the test doesn't support windows. @eric_niebler, my original intention was avoiding use of platform-dependent path separator, but now made it explicit that the test is not for windows, it should be okay to use

Re: r295150 - [Sema] Disallow returning a __block variable via a move.

2017-02-15 Thread Hans Wennborg via cfe-commits
+Richard for risk/reward analysis. r274291 was also in 3.9, so this isn't strictly speaking a regression. On Wed, Feb 15, 2017 at 11:43 AM, Akira Hatanaka wrote: > Hans, > > Can this be merged to 4.0 too? > >> On Feb 14, 2017, at 9:15 PM, Akira Hatanaka via cfe-commits >> wrote: >> >> Author:

r295224 - PR24440: Do not silently discard a fold-expression appearing as the operand of a cast-expression.

2017-02-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 15 13:57:10 2017 New Revision: 295224 URL: http://llvm.org/viewvc/llvm-project?rev=295224&view=rev Log: PR24440: Do not silently discard a fold-expression appearing as the operand of a cast-expression. Modified: cfe/trunk/lib/Parse/ParseExpr.cpp cfe/trunk/lib

Re: r295149 - Fix assertion failure due to implicit special member lookup lacking a source location.

2017-02-15 Thread Richard Smith via cfe-commits
On 15 February 2017 at 11:39, Hans Wennborg wrote: > IIUC, this is a follow-up to r291955, which was merged to 4.0. Should > this one be merged also? > Yes, please. > Cheers, > Hans > > On Tue, Feb 14, 2017 at 8:18 PM, Richard Smith via cfe-commits > wrote: > > Author: rsmith > > Date: Tue Fe

Re: r295224 - PR24440: Do not silently discard a fold-expression appearing as the operand of a cast-expression.

2017-02-15 Thread Richard Smith via cfe-commits
Hans, this would be a good candidate for Clang 4. The bug in question is not a regression, but it is an accepts-invalid / wrong-code bug. On 15 February 2017 at 11:57, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Wed Feb 15 13:57:10 2017 > New Revisi

Re: r295150 - [Sema] Disallow returning a __block variable via a move.

2017-02-15 Thread Richard Smith via cfe-commits
On 15 February 2017 at 11:50, Hans Wennborg wrote: > +Richard for risk/reward analysis. > This is an extremely safe change, and fixes what amounts to a subtle miscompile. I think we should take it. > r274291 was also in 3.9, so this isn't strictly speaking a regression. > > On Wed, Feb 15, 201

Re: r295149 - Fix assertion failure due to implicit special member lookup lacking a source location.

2017-02-15 Thread Hans Wennborg via cfe-commits
On Wed, Feb 15, 2017 at 12:14 PM, Richard Smith wrote: > On 15 February 2017 at 11:39, Hans Wennborg wrote: >> >> IIUC, this is a follow-up to r291955, which was merged to 4.0. Should >> this one be merged also? > > > Yes, please. r295233. > >> >> Cheers, >> Hans >> >> On Tue, Feb 14, 2017 at 8

Re: r295150 - [Sema] Disallow returning a __block variable via a move.

2017-02-15 Thread Hans Wennborg via cfe-commits
On Wed, Feb 15, 2017 at 12:17 PM, Richard Smith wrote: > On 15 February 2017 at 11:50, Hans Wennborg wrote: >> >> +Richard for risk/reward analysis. > > > This is an extremely safe change, and fixes what amounts to a subtle > miscompile. I think we should take it. Very good; merged in r295234.

Patch for Bug 30413, including test case

2017-02-15 Thread Lobron, David via cfe-commits
Hi All, I am re-submitting my patch for Bug 30413, this time with a test case included as well (ivar-type-encoding.m). The test case file should be added to clang/test/CodeGenObjC. The test verifies that correct metadata is emitted by clang for an object-valued instance variable. I've verifi

[PATCH] D29599: Clang Changes for alloc_align

2017-02-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 88602. erichkeane added a comment. I was able to get the templated versions working in response to the discussion with Akira. Note the added test file which shows off all of the combos I could think of. It required a little bit of surgery inside the Sem

[PATCH] D30000: Fix for pr31836 - pp_nonportable_path on absolute paths: broken delimiters

2017-02-15 Thread Eric Niebler via Phabricator via cfe-commits
eric_niebler added a comment. My question was more about whether the code is correct for absolute paths on Windows, not about whether this particular test would pass or fail. Have you tested an incorrectly-cased absolute path on a Windows machine? https://reviews.llvm.org/D3 ___

[PATCH] D24812: Lit C++11 Compatibility Patch #11

2017-02-15 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: test/CodeGenCXX/static-init.cpp:14 +// CHECK98: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global %"struct.test4::HasVTable" zeroinitializer, comdat, align 8 +// CHECK11: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global { i8*

[PATCH] D28297: [StaticAnalyzer] Fix crash in CastToStructChecker

2017-02-15 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Please, make sure future reviews go through cfg-dev list. See http://llvm.org/docs/Phabricator.html. Repository: rL LLVM https://reviews.llvm.org/D28297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D28278: [StaticAnalyzer] dont show wrong 'garbage value' warning when there is array index out of bounds

2017-02-15 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Does the code you added detects array out of bounds cases without false positives? Is it an option to just have this checkers produce a more precise error message in the specific case. A lot of work will probably need to be done to implement a proper array out of bou

r295245 - Fix the static build.

2017-02-15 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Wed Feb 15 16:19:04 2017 New Revision: 295245 URL: http://llvm.org/viewvc/llvm-project?rev=295245&view=rev Log: Fix the static build. Modified: cfe/trunk/tools/c-index-test/CMakeLists.txt Modified: cfe/trunk/tools/c-index-test/CMakeLists.txt URL: http://llvm.org/viewvc/

r295252 - [Modules] Consider enable_if attrs in isSameEntity.

2017-02-15 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Feb 15 16:43:27 2017 New Revision: 295252 URL: http://llvm.org/viewvc/llvm-project?rev=295252&view=rev Log: [Modules] Consider enable_if attrs in isSameEntity. Two functions that differ only in their enable_if attributes are considered overloads, so we should check for thos

[PATCH] D30009: Add support for '#pragma clang attribute'

2017-02-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch adds support for the `#pragma clang attribute` directive that was proposed recently at http://lists.llvm.org/pipermail/cfe-dev/2017-February/052689.html. Initially it supports the `annotate`, `require_constant_initialization` and `objc_subclassing_res

[PATCH] D29967: Get class property selectors from property decl if it exists

2017-02-15 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. Please add a test for this. Comment at: lib/Sema/SemaExprObjC.cpp:1989 + Selector SetterSel; + if (ObjCPropertyDecl *PD = IFace->FindPropertyDeclaration( +

[PATCH] D26654: [CMake] Add Fuchsia toolchain CMake cache files

2017-02-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Thanks for all your work on these! Repository: rL LLVM https://reviews.llvm.org/D26654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24812: Lit C++11 Compatibility Patch #11

2017-02-15 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge updated this revision to Diff 88617. tigerleapgorge added a comment. Changed "CHECK11" to "CHECK11-NEXT". https://reviews.llvm.org/D24812 Files: test/CodeGenCXX/mangle-unnamed.cpp test/CodeGenCXX/static-init.cpp test/CodeGenCXX/volatile-1.cpp test/CodeGenCXX/volatile.cpp

  1   2   >