[PATCH] D31706: [clang-format] Handle NSString literals by merging tokens.

2017-04-10 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Thanks for cleaning this up. https://reviews.llvm.org/D31706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxx] r299909 - Fix a C++03 failure

2017-04-10 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Apr 10 20:54:48 2017 New Revision: 299909 URL: http://llvm.org/viewvc/llvm-project?rev=299909=rev Log: Fix a C++03 failure Modified: libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp Modified:

[PATCH] D31542: [clang-tidy] Extend readability-container-size-empty to add comparisons to newly-constructed objects

2017-04-10 Thread Josh Zimmerman via Phabricator via cfe-commits
joshz added a comment. Hey there, reviewers. Any chance you can take a look at this change? Thanks! :-) Repository: rL LLVM https://reviews.llvm.org/D31542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxx] r299907 - Remove some trigraphs that GCC was complaining about

2017-04-10 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Apr 10 19:18:28 2017 New Revision: 299907 URL: http://llvm.org/viewvc/llvm-project?rev=299907=rev Log: Remove some trigraphs that GCC was complaining about Modified: libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp Modified:

r299902 - docs: Use the term "whole-program devirtualization" instead of "virtual function call optimization".

2017-04-10 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Mon Apr 10 18:54:28 2017 New Revision: 299902 URL: http://llvm.org/viewvc/llvm-project?rev=299902=rev Log: docs: Use the term "whole-program devirtualization" instead of "virtual function call optimization". The former term is probably more familiar to users. Also add

[libcxx] r299901 - Fix PR#32605: common_type is not SFINAE-friendly

2017-04-10 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Apr 10 18:47:47 2017 New Revision: 299901 URL: http://llvm.org/viewvc/llvm-project?rev=299901=rev Log: Fix PR#32605: common_type is not SFINAE-friendly Modified: libcxx/trunk/include/type_traits

r299899 - Reland "[IR] Make AttributeSetNode public, avoid temporary AttributeList copies"

2017-04-10 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Apr 10 18:31:05 2017 New Revision: 299899 URL: http://llvm.org/viewvc/llvm-project?rev=299899=rev Log: Reland "[IR] Make AttributeSetNode public, avoid temporary AttributeList copies" This re-lands r299875. I introduced a bug in Clang code responsible for replacing K, no

[libcxx] r299894 - Fix PR#32606: std::decay mishandles abominable function types

2017-04-10 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Apr 10 17:51:07 2017 New Revision: 299894 URL: http://llvm.org/viewvc/llvm-project?rev=299894=rev Log: Fix PR#32606: std::decay mishandles abominable function types Modified: libcxx/trunk/include/type_traits

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-10 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a subscriber: mclow.lists. hfinkel added a comment. I'm happy with this now. @EricWF , @mclow.lists , thoughts? https://reviews.llvm.org/D31561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31044: Update for alloca construction changes

2017-04-10 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r299889 https://reviews.llvm.org/D31044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r299889 - Update for AllocaInst construction changes

2017-04-10 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Mon Apr 10 17:28:02 2017 New Revision: 299889 URL: http://llvm.org/viewvc/llvm-project?rev=299889=rev Log: Update for AllocaInst construction changes Modified: cfe/trunk/lib/CodeGen/CGCall.cpp cfe/trunk/lib/CodeGen/CGExpr.cpp Modified:

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-04-10 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. There are a few small nits I've mentioned, but otherwise LGTM. Comment at: clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp:34-35 + + const auto first =

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith marked 2 inline comments as done. dexonsmith added a comment. Marking Hal's comments as "Done". Thanks for the review. https://reviews.llvm.org/D31561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 94750. dexonsmith added a comment. Responding to Hal's comments. https://reviews.llvm.org/D31561 Files: libcxx/include/math.h libcxx/test/std/numerics/c.math/cmath.pass.cpp Index: libcxx/test/std/numerics/c.math/cmath.pass.cpp

[PATCH] D31167: Use FPContractModeKind universally

2017-04-10 Thread Adam Nemet via Phabricator via cfe-commits
anemet added inline comments. Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220 +/// \brief FP_CONTRACT mode (on/off/fast). +ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP contraction type") LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-04-10 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM with the overloaded operator check removed. https://reviews.llvm.org/D29877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-04-10 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/Sema.cpp:473 if (const FunctionDecl *FD = dyn_cast(D)) { +// If this is a function template and neither of its specs is used, warn. +if (FunctionTemplateDecl *Template = FD->getDescribedFunctionTemplate())

[PATCH] D31627: [coroutines] Skip over passthrough operator co_await

2017-04-10 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. gentle ping https://reviews.llvm.org/D31627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31586: [coroutines] Replace all coro.frame builtins with an SSA value of coro.begin

2017-04-10 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. gentle ping https://reviews.llvm.org/D31586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31590: [coroutines] Add support for deallocation elision

2017-04-10 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. Gentle ping https://reviews.llvm.org/D31590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31608: [coroutines] Add emission of initial and final suspends

2017-04-10 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. Pretty please. Gentle ping. https://reviews.llvm.org/D31608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31584: [coroutines] Add support for allocation elision

2017-04-10 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. Gentle ping https://reviews.llvm.org/D31584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31757: [clang-tidy] Add a clang-tidy check for possible inefficient vector operations

2017-04-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:22 +void InefficientVectorOperationCheck::registerMatchers(MatchFinder *Finder) { + const auto VectorDecl = cxxRecordDecl(hasName("std::vector")); + const auto

[PATCH] D31757: [clang-tidy] Add a clang-tidy check for possible inefficient vector operations

2017-04-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 94734. hokein marked 7 inline comments as done. hokein added a comment. Address review comments. https://reviews.llvm.org/D31757 Files: clang-tidy/performance/CMakeLists.txt clang-tidy/performance/InefficientVectorOperationCheck.cpp

[PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2017-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. There appears to be two reviews out for this same functionality. You should probably close one of the reviews (but still address the comments from it). https://reviews.llvm.org/D22045 ___ cfe-commits mailing list

[PATCH] D31043: Update for lifetime intrinsic signature change

2017-04-10 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r299877 https://reviews.llvm.org/D31043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r299877 - Update for lifetime intrinsic signature change

2017-04-10 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Mon Apr 10 15:18:45 2017 New Revision: 299877 URL: http://llvm.org/viewvc/llvm-project?rev=299877=rev Log: Update for lifetime intrinsic signature change Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp cfe/trunk/test/CodeGen/cleanup-destslot-simple.c

[PATCH] D31167: Use FPContractModeKind universally

2017-04-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: cfe/trunk/lib/Frontend/CompilerInvocation.cpp:1638 Opts.LaxVectorConversions = 0; -Opts.DefaultFPContract = 1; +Opts.setDefaultFPContractMode(LangOptions::FPC_On); Opts.NativeHalfType = 1; hfinkel

[PATCH] D31167: Use FPContractModeKind universally

2017-04-10 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: cfe/trunk/lib/Frontend/CompilerInvocation.cpp:1638 Opts.LaxVectorConversions = 0; -Opts.DefaultFPContract = 1; +Opts.setDefaultFPContractMode(LangOptions::FPC_On); Opts.NativeHalfType = 1; yaxunl

[PATCH] D31860: Add more examples to clang tidy checkers

2017-04-10 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. Thanks! LG with a couple of nits. Comment at: docs/clang-tidy/checks/misc-inefficient-algorithm.rst:25 + std::set s; + auto c = count(s.begin(), s.end(), 43); +

[PATCH] D31853: [clangd] Implement item kind for completion results

2017-04-10 Thread Stanislav Ionascu via Phabricator via cfe-commits
stanionascu added a comment. In https://reviews.llvm.org/D31853#722219, @krasimir wrote: > Looks good! However it would be easier for reviewers if you could please use > arc: http://llvm.org/docs/Phabricator.html#id2 > This makes it easy since I only have to do `arc patch D31853` in order to

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-10 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz updated this revision to Diff 94721. kparzysz added a comment. Cleaned the code up, added testcases. Repository: rL LLVM https://reviews.llvm.org/D31885 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.h test/CodeGen/union-tbaa1.c test/CodeGenCXX/union-tbaa2.cpp

[PATCH] D31853: [clangd] Implement item kind for completion results

2017-04-10 Thread Stanislav Ionascu via Phabricator via cfe-commits
stanionascu updated this revision to Diff 94720. stanionascu added a comment. One more try updating the revision on fresh git+svn clone. https://reviews.llvm.org/D31853 Files: clangd/ASTManager.cpp clangd/Protocol.cpp test/clangd/completion.test Index: test/clangd/completion.test

[PATCH] D31167: Use FPContractModeKind universally

2017-04-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: cfe/trunk/lib/Frontend/CompilerInvocation.cpp:1638 Opts.LaxVectorConversions = 0; -Opts.DefaultFPContract = 1; +Opts.setDefaultFPContractMode(LangOptions::FPC_On); Opts.NativeHalfType = 1; hfinkel

[PATCH] D31167: Use FPContractModeKind universally

2017-04-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220 +/// \brief FP_CONTRACT mode (on/off/fast). +ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP contraction type") LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field

[PATCH] D31167: Use FPContractModeKind universally

2017-04-10 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: cfe/trunk/lib/Frontend/CompilerInvocation.cpp:1638 Opts.LaxVectorConversions = 0; -Opts.DefaultFPContract = 1; +Opts.setDefaultFPContractMode(LangOptions::FPC_On); Opts.NativeHalfType = 1; Looks like

r299868 - [OPENMP] Fix for PR32333: Crash in call of outlined Function.

2017-04-10 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Apr 10 14:16:45 2017 New Revision: 299868 URL: http://llvm.org/viewvc/llvm-project?rev=299868=rev Log: [OPENMP] Fix for PR32333: Crash in call of outlined Function. If the type of the captured variable is a pointer(s) to variably modified type, this type was not

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-10 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: libcxx/include/math.h:354 inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::value, bool>::type signbit(_A1 __lcpp_x) _NOEXCEPT

[PATCH] D31167: Use FPContractModeKind universally

2017-04-10 Thread Adam Nemet via Phabricator via cfe-commits
anemet added inline comments. Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220 +/// \brief FP_CONTRACT mode (on/off/fast). +ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP contraction type") LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field

[PATCH] D31853: [clangd] Implement item kind for completion results

2017-04-10 Thread Stanislav Ionascu via Phabricator via cfe-commits
stanionascu updated this revision to Diff 94716. stanionascu added a comment. recreated from svn checkout https://reviews.llvm.org/D31853 Files: clangd/ASTManager.cpp clangd/Protocol.cpp test/clangd/completion.test Index: test/clangd/completion.test

[PATCH] D31840: [analyzer] Fix crash on access to property

2017-04-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 94713. alexshap added a comment. 1. update the patch following NoQ@ suggestion 2. rerun the tests: make check-all - they are green Repository: rL LLVM https://reviews.llvm.org/D31840 Files: lib/StaticAnalyzer/Core/CallEvent.cpp

[PATCH] D31839: make -Winteger-overflow find overflows in function arguments

2017-04-10 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Is it possible to fix ObjCMessageExpr too while you are in here? I think clang should issue a warning when compiling the following code: @protocol NSObject @end @interface NSObject @end @interface C1 : NSObject - (void)foo:(int)i; @end

[PATCH] D30489: [analyzer] catch out of bounds for VLA

2017-04-10 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 94509. danielmarjamaki added a comment. This is just work in progress!! With these changes Clang static analyzer will detect overflow in this sample code: void foo(int X) { char *Data = new char[X]; Data[X] = 0; // <- error delete[]

[PATCH] D31408: Add more examples to clang-format configuration

2017-04-10 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Daniel, is that ok with you? https://reviews.llvm.org/D31408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26794: [OpenCL] Blocks are allowed to capture arrays in OpenCL 2.0 and higher.

2017-04-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:13645 // Blocks are not allowed to capture arrays. + if (!S.getLangOpts().OpenCL && CaptureType->isArrayType()) { I think the comment should be updated. Comment at:

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-04-10 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked 6 inline comments as done. xazax.hun added inline comments. Comment at: test/Analysis/Inputs/externalFnMap.txt:1 +_Z7h_chaini@x86_64 xtu-chain.cpp.ast +_ZN4chns4chf2Ei@x86_64 xtu-chain.cpp.ast NoQ wrote: > These tests use a pre-made external

[PATCH] D31673: Allow casting C pointers declared using extern "C" to ObjC pointer types

2017-04-10 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. Thanks, LGTM. https://reviews.llvm.org/D31673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-04-10 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 94709. xazax.hun edited the summary of this revision. xazax.hun added a comment. - Fixed some memory leaks. - Removed some unrelated style changes. - Simplifications to the python scripts. - Removed debug prints. https://reviews.llvm.org/D30691 Files:

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-04-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: include/clang/Basic/AddressSpaces.h:32 + // QualType represents private address space in OpenCL source code. + Default = 0, + Anastasia wrote: > yaxunl wrote: > > Anastasia

[PATCH] D31760: [lsan] Enable LSan on arm Linux, clang part

2017-04-10 Thread Evgeniy Stepanov via Phabricator via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D31760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31760: [lsan] Enable LSan on arm Linux, clang part

2017-04-10 Thread Maxim Ostapenko via Phabricator via cfe-commits
m.ostapenko updated this revision to Diff 94708. m.ostapenko added a project: Sanitizers. m.ostapenko added a comment. Add armeb and thumbeb for completeness. Just curious, does anyone use sanitizers in these targets? I see no public buildbots for armeb and thumbeb. Anyway, not a big deal of

[PATCH] D31886: [analyzer] Simplify values in binary operations more aggressively

2017-04-10 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. This is a very welcome addition. I hope the performance will be still good :) Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1023 + +SVal VisitSymIntExpr(const SymIntExpr *S) { + SValBuilder =

[PATCH] D31840: [analyzer] Fix crash on access to property

2017-04-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. This defensive check looks reasonable regardless of how well we model unions (we don't). Thanks for the patch! Comment at: lib/StaticAnalyzer/Core/CallEvent.cpp:706 + } Values.push_back(IvarLVal); return; I believe

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-04-10 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Yep, I am also a fan of "and","or" and "not". The other tokens doesn't make it more readable imho https://reviews.llvm.org/D31308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-04-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yeah, of course, ideally sticking this into scan-build, one way or another, would be great. I understand that it'd require quite a bit of communication with Laszlo. Otherwise we're just duplicating a whole lot of things. Thanks for digging into this, guys. Really.

[PATCH] D31746: Remove ASTUnits for closed documents and cache CompilationDatabase per directory in clangd.

2017-04-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299843: [clangd] Remove ASTUnits for closed documents and cache CompilationDatabase per… (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D31746?vs=94664=94665#toc Repository:

[PATCH] D31746: Remove ASTUnits for closed documents and cache CompilationDatabase per directory in clangd.

2017-04-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! https://reviews.llvm.org/D31746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31886: [analyzer] Simplify values in binary operations more aggressively

2017-04-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. SValBuilder tries to constant-fold symbols in the left-hand side of the symbolic expression whenever it fails to evaluate the expression directly. However, it only constant-folds them when they are atomic expressions, not when they are complicated expressions

[PATCH] D31673: Allow casting C pointers declared using extern "C" to ObjC pointer types

2017-04-10 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 94686. ahatanak marked an inline comment as done. https://reviews.llvm.org/D31673 Files: lib/Sema/SemaExprObjC.cpp test/SemaObjCXX/arc-bridged-cast.mm Index: test/SemaObjCXX/arc-bridged-cast.mm

[PATCH] D30435: [clang-import-test] Lookup inside entities

2017-04-10 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. Looks excellent now. Thank you Sean! Repository: rL LLVM https://reviews.llvm.org/D30435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31673: Allow casting C pointers declared using extern "C" to ObjC pointer types

2017-04-10 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExprObjC.cpp:3358 var && - var->getStorageClass() == SC_Extern && + !var->isThisDeclarationADefinition() && var->getType().isConstQualified()) { rjmccall wrote: >

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-10 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz created this revision. The TBAA information for union members may be wrong, and in the current form TBAA cannot represent them correctly. This is a follow-up to this thread from llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2017-April/111859.html Repository: rL LLVM

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-04-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. One more obvious observation regarding scan-build: because you are already reading a compilation database, the whole tool is essentially usable in combination with the current scan-build-py (which can create compilation databases). So it's already quite usable, but you're

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-04-10 Thread Mads Ravn via Phabricator via cfe-commits
madsravn added a comment. In https://reviews.llvm.org/D30158#702778, @jroelofs wrote: > In https://reviews.llvm.org/D30158#702760, @madsravn wrote: > > > In https://reviews.llvm.org/D30158#699342, @jroelofs wrote: > > > > > In https://reviews.llvm.org/D30158#699132, @madsravn wrote: > > > > > >

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-10 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:1019 +/// optimizations). +static bool isUnionAccess(const Expr *E) { + switch (E->getStmtClass()) { I'm not sure if this is a complete list of different ways to get a union member.

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-04-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/AddressSpaces.h:32 + // QualType represents private address space in OpenCL source code. + Default = 0, + yaxunl wrote: > Anastasia wrote: > > The alloca AS is not taken from the target AS map

[PATCH] D31853: [clangd] Implement item kind for completion results

2017-04-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir requested changes to this revision. krasimir added a comment. This revision now requires changes to proceed. Looks good! However it would be easier for reviewers if you could please use arc: http://llvm.org/docs/Phabricator.html#id2 This makes it easy since I only have to do `arc patch

[PATCH] D31697: Check for null before using TUScope

2017-04-10 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. For some context, the backtrace when this happens is: include-what-you-use.exe!clang::Scope::getEntity() Line 313C++ include-what-you-use.exe!clang::Sema::PushOnScopeChains(clang::NamedDecl * D=0x07ed05b0, clang::Scope * S=0x, bool

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-04-10 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich marked 2 inline comments as done. vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:494 + SymbolManager = C.getSymbolManager(); + return SM.getDerivedSymbol(Sym, LCV.getRegion()); } NoQ

[PATCH] D31868: [analyzer] Check NULL pointer dereference issue for memset function

2017-04-10 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai created this revision. Hi LLVM developers, As Anna mentioned: > One idea is to check that we do not pass a pointer that is known to be NULL > to functions that are known to dereference pointers such as memcpy. There is > a checker that determines if a null pointer could be

[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2017-04-10 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added inline comments. Comment at: clang/tools/CMakeLists.txt:35 +# if include-what-you-use is cloned for building in-tree, add it here. +if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include-what-you-use") + add_clang_subdirectory(include-what-you-use) beanz

[PATCH] D31766: [Clang][X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation

2017-04-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D31766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27251: [PPC] some bugs mainly about sign problem fixed in altivec.h

2017-04-10 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. @Zeson are you working on an update to this or is this to be abandoned? https://reviews.llvm.org/D27251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31856: Headers: Make the type of SIZE_MAX the same as size_t

2017-04-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. size_t is usually defined as unsigned long, but on 64-bit platforms, stdint.h currently defines SIZE_MAX using "ull" (unsigned long long). Although this is the same width, it doesn't necessarily have the same alignment or calling convention. It also triggers

[PATCH] D31862: docs/clang-tidy/tools/dump_check_docs.py: Remove deprecated script

2017-04-10 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. This has been used to create the doc from the code comments. Now, this is very out of sync. https://reviews.llvm.org/D31862 Files: docs/clang-tidy/tools/dump_check_docs.py Index: docs/clang-tidy/tools/dump_check_docs.py

[PATCH] D31860: Add more examples to clang tidy checkers

2017-04-10 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. sylvestre.ledru added a project: clang-tools-extra. https://reviews.llvm.org/D31860 Files: docs/clang-tidy/checks/llvm-namespace-comment.rst docs/clang-tidy/checks/llvm-twine-local.rst docs/clang-tidy/checks/misc-inefficient-algorithm.rst

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Ping. https://reviews.llvm.org/D31561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30954: Modules: Simulate diagnostic settings for implicit modules

2017-04-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Thanks for the review! Somehow I missed it until now (I think I must have an "ignore rsmith" filter set up), but I should find a chance to rebase and commit tomorrow or Monday. https://reviews.llvm.org/D30954 ___

[PATCH] D31853: [clangd] Implement item kind for completion results

2017-04-10 Thread Stanislav Ionascu via Phabricator via cfe-commits
stanionascu created this revision. stanionascu added a project: clang-tools-extra. The patch implements the conversion method from CXCursorKind to clangd::CompletionItemKind. https://reviews.llvm.org/D31853 Files: clangd/ASTManager.cpp clangd/Protocol.cpp test/clangd/completion.test

[PATCH] D31830: Emit invariant.group.barrier when using union field

2017-04-10 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. We need to emit barrier if the union field is CXXRecordDecl because it might have vptrs. The testcode was wrongly devirtualized. It also proves that having different groups for different dynamic types is not sufficient. https://reviews.llvm.org/D31830 Files:

[PATCH] D31839: make -Winteger-overflow find overflows in function arguments

2017-04-10 Thread Nick Lewycky via Phabricator via cfe-commits
nlewycky created this revision. When checkingForOverflow(), look through call arguments (and the callee itself if calculated). Make the statement visitor go through ObjCBoxedExpr by default because it has a single subexpr node. Don't do that when looking for a pointer object, stop because the

[PATCH] D31756: [cmake] Support Gentoo install for z3

2017-04-10 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299813: [cmake] Support Gentoo install for z3 (authored by mgorny). Changed prior to commit: https://reviews.llvm.org/D31756?vs=94354=94594#toc Repository: rL LLVM https://reviews.llvm.org/D31756

[PATCH] D31869: Register isStaticStorageClass matcher

2017-04-10 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; I don't think this needs a test case. https://reviews.llvm.org/D31869 ___ cfe-commits mailing list

[PATCH] D31840: [analyzer] Fix crash on access to property

2017-04-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. alexshap created this object with visibility "All Users". Preliminary context about unions: at the moment for unions the static analyzer creates default bindings (as a compoundVal). If a union has only one field x which is initialized to zero this is handled as

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2017-04-10 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/Sema/SemaExpr.cpp:10024 + // FIXME: The check for C++ here is for GCC compatibility. GCC rejects the + //usage of logical operators with vectors in C. This check could be + //notionally dropped.

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-04-10 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h:46 -} // end GR namespace +bool isExprResultConformsComparisonRule(CheckerContext , +BinaryOperatorKind CompRule,

[PATCH] D31760: [lsan] Enable LSan on arm Linux, clang part

2017-04-10 Thread Evgeniy Stepanov via Phabricator via cfe-commits
eugenis added a comment. I think it should also include armeb and thumbeb for completeness. Repository: rL LLVM https://reviews.llvm.org/D31760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31805: [clang-tidy] Mention "add the check to release note" in add_new_check.py.

2017-04-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I don't know how hard it'll be to implement, but will be great to add - New ` `_ check Please add short description here. into "Improvements to clang-tidy" section. Ideally according to alphabetic order.

[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2017-04-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/tools/.gitignore:12 +#==# +# The include-what-you-use project, for when building in-tree. +include-what-you-use rnk wrote: > LLVM doesn't

[PATCH] D31167: Use FPContractModeKind universally

2017-04-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220 +/// \brief FP_CONTRACT mode (on/off/fast). +ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP contraction type") LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field

[PATCH] D31736: Implement _interlockedbittestandset as a builtin

2017-04-10 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299782: Implement _interlockedbittestandset as a builtin (authored by hans). Changed prior to commit: https://reviews.llvm.org/D31736?vs=94433=94539#toc Repository: rL LLVM

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8254 "%0 cannot be used as the type of a kernel parameter">; +def err_opencl_implicit_function_decl : Error< + "implicit declaration of function %0 is invalid in OpenCL">;

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 94537. https://reviews.llvm.org/D31745 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/clang-builtin-version.cl test/SemaOpenCL/to_addr_builtin.cl Index: test/SemaOpenCL/to_addr_builtin.cl

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

2017-04-10 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. This LGTM, but you should give @rsmith some time to review before committing in case he catches something I've missed. Repository: rL LLVM https://reviews.llvm.org/D30009

[PATCH] D27181: [ASTImporter] Support for importing UsingDecl and UsingShadowDecl

2017-04-10 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/AST/ASTImporter.cpp:4305 + DeclarationNameInfo NameInfo(Name, Importer.Import(D->getNameInfo().getLoc())); + ImportDeclarationNameLoc(D->getNameInfo(), NameInfo); + spyffe wrote: > I've seen this pattern

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-10 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz updated this revision to Diff 94699. kparzysz added a comment. Do not stop the check for unions at the first MemberExpr (unless it's a union). Repository: rL LLVM https://reviews.llvm.org/D31885 Files: lib/CodeGen/CGExpr.cpp Index: lib/CodeGen/CGExpr.cpp

[PATCH] D31706: [clang-format] Handle NSString literals by merging tokens.

2017-04-10 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Friendly ping. https://reviews.llvm.org/D31706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31869: Register isStaticStorageClass matcher

2017-04-10 Thread Dave Lee via Phabricator via cfe-commits
kastiglione created this revision. Herald added a subscriber: klimek. I noticed I couldn't `isStaticStorageClass()` from `clang-query`. This change fixed that. https://reviews.llvm.org/D31869 Files: lib/ASTMatchers/Dynamic/Registry.cpp Index: lib/ASTMatchers/Dynamic/Registry.cpp

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/clang-builtin-version.cl:32 + work_group_reserve_write_pipe(tmp, tmp); // expected-error{{implicit declaration of function 'work_group_reserve_write_pipe' is invalid in OpenCL}} + // expected-note@-1{{did you mean

[PATCH] D31856: Headers: Make the type of SIZE_MAX the same as size_t

2017-04-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 94675. dexonsmith added a comment. Updated clang/test/Preprocessor/stdint.c, which I missed in the original patch. https://reviews.llvm.org/D31856 Files: clang/lib/Headers/stdint.h clang/test/Headers/stdint-type-of-SIZE_MAX.cpp

  1   2   >