[PATCH] D39177: [CodeGen] Generate TBAA info for reference loads

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2171 + LValueBaseInfo *ReferenceeBaseInfo, + TBAAAccessInfo *ReferenceeTBAAInfo) { + llvm::LoadInst *Load = Builder.CreateLoad(ReferenceAddr

[PATCH] D39138: [CodeGen] Generate TBAA info for 'this' pointers

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. AFAIK, this is pointless because that alloca will be trivially eliminated by mem2reg. Am I missing something? Is this important for some sort of consistency check? Repository: rL LLVM https://reviews.llvm.org/D39138

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D39069#904507, @probinson wrote: > Anytime the code between saveIP() and restoreIP() could set the current debug > location, it needs to be saved/restored along with the insertion point. I > have to say the problem is not obvious to me here

[PATCH] D38683: [X86][AVX512] lowering broadcastm intrinsic - clang part

2017-10-23 Thread jina via Phabricator via cfe-commits
jina.nahias added inline comments. Comment at: test/CodeGen/avx512cdintrin.c:106 + // CHECK: insertelement <16 x i32> %{{.*}}, i32 %{{.*}} + return _mm512_broadcastmw_epi32(_mm512_cmpeq_epi32_mask ( a, b)); } RKSimon wrote: > Any reason why you can't use the

[PATCH] D39217: [libclang, bindings]: add spelling location

2017-10-23 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a subscriber: arphaman. akyrtzi added a comment. CC'ed @arphaman. https://reviews.llvm.org/D39217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39206: [libunwind] Add missing checks for register number

2017-10-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. I'd say out of range rather than too big. https://reviews.llvm.org/D39206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39217: [libclang, bindings]: add spelling location

2017-10-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a subscriber: akyrtzi. compnerd added a comment. I think that this is reasonable given that it is addressing a long standing issue. CC'ing @akyrtzi for his opinion as well. https://reviews.llvm.org/D39217 ___ cfe-commits mailing lis

[PATCH] D39162: [test] Fix clang-test for FreeBSD and NetBSD

2017-10-23 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316411: [test] Fix clang-test for FreeBSD and NetBSD (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D39162?vs=119803&id=119995#toc Repository: rL LLVM https://reviews.llvm.

r316411 - [test] Fix clang-test for FreeBSD and NetBSD

2017-10-23 Thread Tim Shen via cfe-commits
Author: timshen Date: Mon Oct 23 20:11:02 2017 New Revision: 316411 URL: http://llvm.org/viewvc/llvm-project?rev=316411&view=rev Log: [test] Fix clang-test for FreeBSD and NetBSD Lit tries to inject the shared library paths, but no action is taken when platform.system() is not recognized, results

[PATCH] D39220: [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-23 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: lib/Analysis/AnalysisDeclContext.cpp:606 -AnalysisDeclContextManager::~AnalysisDeclContextManager() { - if (BdyFrm) -delete BdyFrm; -} +AnalysisDeclContextManager::~AnalysisDeclContextManager() {} Why having emp

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think you forgot to svn add the test case Repository: rL LLVM https://reviews.llvm.org/D39127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39035: Unnamed bitfields don't block constant evaluation of constexpr constructors

2017-10-23 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose closed this revision. jordan_rose added a comment. Landed in https://reviews.llvm.org/rL316408. Repository: rL LLVM https://reviews.llvm.org/D39035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

r316408 - Unnamed bitfields don't block constant evaluation of constexpr ctors

2017-10-23 Thread Jordan Rose via cfe-commits
Author: jrose Date: Mon Oct 23 19:17:07 2017 New Revision: 316408 URL: http://llvm.org/viewvc/llvm-project?rev=316408&view=rev Log: Unnamed bitfields don't block constant evaluation of constexpr ctors C++14 [dcl.constexpr]p4 states that in the body of a constexpr constructor, > every non-variant

[PATCH] D39221: [libcxx] [test] Alignment must be > __STDCPP_DEFAULT_NEW_ALIGNMENT__ to call aligned new

2017-10-23 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. Update aligned `new` tests to use `__STDCPP_DEFAULT_NEW_ALIGNMENT__ * 2` for "over-aligned" instead of `alignof(std::max_align_t) * 2`. https://reviews.llvm.org/D39221 Files: test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_alig

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-23 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316405: Fix template parameter default args missed if redecled (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D39127?vs=119665&id=119991#toc Repository: rL LLVM https://

r316405 - Fix template parameter default args missed if redecled

2017-10-23 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Oct 23 18:39:56 2017 New Revision: 316405 URL: http://llvm.org/viewvc/llvm-project?rev=316405&view=rev Log: Fix template parameter default args missed if redecled This bug was found via self-build on lld, and worked around here: https://reviews.llvm.org/rL316180 The

[PATCH] D5767: Template Instantiation Observer + a few other templight-related changes

2017-10-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Ok, I think this is starting to look really good. Now we should try to grab Richard's attention to make sure it's fine to submit with the current set of FIXMEs. Comment at: lib/Frontend/FrontendActions.cpp:386 + // This part is normally done by ASTFro

[PATCH] D38986: [Analyzer] Better unreachable message in enumeration

2017-10-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @dcoughlin > Is it when an end-user is running a build with assertions and can't provide a > reproducer but can provide the console output? Yes, or just for developer staring at the crash for the first time, or for the crashers in CI. > Does llvm_unreachable(

[PATCH] D39220: [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. Herald added subscribers: szepet, kristof.beyls, xazax.hun, aemerson. While by using `.get()` method we don't get the full protection offered by `std::unique_ptr`, given that two bugs were already encountered (http://lab.llvm.org:8011/builders/sanitizer-x8

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/SemaType.cpp:3269-3273 + bool IsMain = false; + if (D.getIdentifier() && D.getIdentifier()->isStr("main") && + S.CurContext->getRedeclContext()->isTranslationUnit() && + !S.getLangOpts().Freestanding) +IsMain

[PATCH] D39064: implement __has_unique_object_representations

2017-10-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/AST/Type.cpp:2226 +Context.getFieldOffset(*Record->field_begin())); +for (const auto *Field : Record->fields()) { + if (!Field->getType().hasUniqueObjectRepresentations(Context)) rnk wrote: > What

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-23 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added inline comments. Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:80 + + // Unsigned overflow occured. Returning max() is sufficient, since noone + // writes so many case labels in source code. Maybe merge this with the function com

r316403 - [Analyzer] Fix for the memory leak: fix typo in if-statement.

2017-10-23 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Oct 23 18:09:43 2017 New Revision: 316403 URL: http://llvm.org/viewvc/llvm-project?rev=316403&view=rev Log: [Analyzer] Fix for the memory leak: fix typo in if-statement. Modified: cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp Modified: cfe/trunk/lib/Analys

[PATCH] D39162: [test] Fix clang-test for FreeBSD and NetBSD

2017-10-23 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. ping? https://reviews.llvm.org/D39162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39005: [OpenMP] Clean up variable and function names for NVPTX backend

2017-10-23 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D39005#900973, @jlebar wrote: > > The first question that comes to mind is what is the link between data > > layout and name mangling conventions? > > I pulled up http://llvm.org/doxygen/classllvm_1_1DataLayout.html and searched > for "mangli

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D39127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-10-23 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. > With this patch we avoid unaligned loads and stores, at least on MIPS > architecture. Can you please explain the nature of the problematic situations? Also, this patch does not update the comments that describe the splitting algorithm. That should be improved. If th

[PATCH] D39218: [WebAssembly] Include libclang_rt.builtins in the standard way

2017-10-23 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: lib/Driver/ToolChain.cpp:318 + else +OSLibName = getOS(); llvm::sys::path::append(Path, "lib", OSLibName); Is this logic intended to replace what was removed from CommonArgs.cpp? Should there be an assert here t

[PATCH] D39064: implement __has_unique_object_representations

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/AST/Type.cpp:2226 +Context.getFieldOffset(*Record->field_begin())); +for (const auto *Field : Record->fields()) { + if (!Field->getType().hasUniqueObjectRepresentations(Context)) What about base classes?

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaType.cpp:3269-3273 + bool IsMain = false; + if (D.getIdentifier() && D.getIdentifier()->isStr("main") && + S.CurContext->getRedeclContext()->isTranslationUnit() && + !S.getLangOpts().Freestanding) +IsMain = true;

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/SemaType.cpp:3269-3273 + bool IsMain = false; + if (D.getIdentifier() && D.getIdentifier()->isStr("main") && + S.CurContext->getRedeclContext()->isTranslationUnit() && + !S.getLangOpts().Freestanding) +IsMain

r316402 - [Analyzer] Handle implicit function reference in bodyfarming std::call_once

2017-10-23 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Oct 23 17:13:18 2017 New Revision: 316402 URL: http://llvm.org/viewvc/llvm-project?rev=316402&view=rev Log: [Analyzer] Handle implicit function reference in bodyfarming std::call_once Differential Revision: https://reviews.llvm.org/D39201 Modified: cfe/trun

[PATCH] D39201: [Analyzer] Handle implicit function reference in bodyfarming std::call_once

2017-10-23 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316402: [Analyzer] Handle implicit function reference in bodyfarming std::call_once (authored by george.karpenkov). Changed prior to commit: https://reviews.llvm.org/D39201?vs=119911&id=119975#toc Repo

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaType.cpp:3269-3273 + bool IsMain = false; + if (D.getIdentifier() && D.getIdentifier()->isStr("main") && + S.CurContext->getRedeclContext()->isTranslationUnit() && + !S.getLangOpts().Freestanding) +IsMain = true;

[PATCH] D39208: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @dcoughlin OK sorry, I haven't considered the point that codebase predates the requirement, and the master format-all commit was never done. I've committed this one already, but I will be more careful with applying clang-format to future changes. Repository:

[PATCH] D39208: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-23 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. That would require going into the past and requiring everyone back then to run clang-format as well. Unfortunately they didn't -- so human judgment is needed when modifying code that doesn't obey the guidelines. Repository: rL LLVM https://reviews.llvm.org/D39208

[PATCH] D39208: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-23 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316400: [Analyzer] Do not use static storage to for implementations created in BodyFarm. (authored by george.karpenkov). Changed prior to commit: https://reviews.llvm.org/D39208?vs=119949&id=119974#toc

[PATCH] D39208: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @dcoughlin the context I was thinking about is that if everyone consistently runs `clang-format` (if we want that), then we never would have discussion. The alternative is that every run of `clang-format` would be followed by manually reverting changes which wer

r316400 - [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-23 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Oct 23 16:59:52 2017 New Revision: 316400 URL: http://llvm.org/viewvc/llvm-project?rev=316400&view=rev Log: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp Differential Revision: https://reviews.llvm.org/D39208 Added: cf

[PATCH] D39208: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-23 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I think a good strategy is to look at your diffs and consider whether the benefits of normalizing the style outweigh the cost of losing the history. In this case, I think keeping the history makes sense. (Imagine you are a future maintainer and want to know when and w

[PATCH] D39174: [analyzer] Fix handling of labels in getLValueElement

2017-10-23 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316399: [analyzer] Fix handling of labels in getLValueElement (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D39174?vs=119808&id=119972#toc Repository: rL LLVM https://rev

r316399 - [analyzer] Fix handling of labels in getLValueElement

2017-10-23 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Oct 23 16:46:06 2017 New Revision: 316399 URL: http://llvm.org/viewvc/llvm-project?rev=316399&view=rev Log: [analyzer] Fix handling of labels in getLValueElement In getLValueElement Base may represent the address of a label (as in the newly-added test case), in this ca

[PATCH] D39217: [libclang, bindings]: add spelling location

2017-10-23 Thread Masud Rahman via Phabricator via cfe-commits
frutiger added a comment. I would very much appreciate some guidance on whether or not this kind of a change in behaviour for `clang_getSpellingLocation` is an acceptable thing to do. https://reviews.llvm.org/D39217 ___ cfe-commits mailing list cf

[PATCH] D39217: [libclang, bindings]: add spelling location

2017-10-23 Thread Masud Rahman via Phabricator via cfe-commits
frutiger updated this revision to Diff 119971. frutiger added a comment. Add context to the patch. https://reviews.llvm.org/D39217 Files: bindings/python/clang/cindex.py bindings/python/tests/cindex/test_location.py test/Index/annotate-tokens.c test/Index/blocks.c test/Index/c-index-a

Re: r316278 - [libclang, bindings]: add spelling location

2017-10-23 Thread Masud Rahman via cfe-commits
I created a new revision to review and to fix the tests: https://reviews.llvm.org/D39217. On Sat, Oct 21, 2017 at 6:24 PM, Masud Rahman wrote: > Thanks, I will take a look. > > On Sat, Oct 21, 2017 at 5:53 PM, Aaron Ballman > wrote: > >> I've reverted back to green in r316279 due to more bots f

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Anytime the code between saveIP() and restoreIP() could set the current debug location, it needs to be saved/restored along with the insertion point. I have to say the problem is not obvious to me here, so maybe saveIP/restoreIP should be changed (or eliminated in fa

[PATCH] D39217: [libclang, bindings]: add spelling location

2017-10-23 Thread Masud Rahman via Phabricator via cfe-commits
frutiger created this revision. - Add a 'Location' class that represents the four properties of a physical location - Enhance 'SourceLocation' to provide 'expansion' and 'spelling' locations, maintaining backwards compatibility with existing code by forwarding the four properties to 'expansion'

[PATCH] D37341: [Sema] Fix an assert-on-invalid by avoiding function template specialisation deduction for invalid functions with fabricated template arguments

2017-10-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 119967. arphaman added a comment. Use just the `isInvalidDecl` check. Repository: rL LLVM https://reviews.llvm.org/D37341 Files: lib/Sema/SemaDecl.cpp test/SemaTemplate/deduction-crash.cpp test/SemaTemplate/explicit-specialization-member.cpp Ind

[PATCH] D16970: scoped alloc construct: adds basic tests

2017-10-23 Thread Masud Rahman via Phabricator via cfe-commits
frutiger abandoned this revision. frutiger added a comment. @AlisdairM maybe you want to commandeer this revision? I don't think this is going anywhere... https://reviews.llvm.org/D16970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D37341: [Sema] Fix an assert-on-invalid by avoiding function template specialisation deduction for invalid functions with fabricated template arguments

2017-10-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added a comment. In https://reviews.llvm.org/D37341#869042, @vsapsai wrote: > Does your fix work for deeper nesting too (e.g. template in template in > template)? Looks like it should, just want to confirm. Yes. > Are there other places wher

[PATCH] D16967: support/allocators: implements requirements

2017-10-23 Thread Masud Rahman via Phabricator via cfe-commits
frutiger abandoned this revision. frutiger added a subscriber: AlisdairM. frutiger added a comment. @AlisdairM maybe you want to commandeer this? This revision is probably not going anywhere any time soon... https://reviews.llvm.org/D16967 ___ cfe

[libcxx] r316394 - More fuzzing interfaces

2017-10-23 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 23 16:19:30 2017 New Revision: 316394 URL: http://llvm.org/viewvc/llvm-project?rev=316394&view=rev Log: More fuzzing interfaces Added: libcxx/trunk/fuzzing/RoutineNames.txt Modified: libcxx/trunk/fuzzing/fuzzing.cpp libcxx/trunk/fuzzing/fuzzing.h Added:

[PATCH] D39206: [libunwind] Add missing checks for register number

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D39206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39208: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @dcoughlin that's not me, that's clang-format. If we agree on always running it, I think the changes should stay there. https://reviews.llvm.org/D39208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

[PATCH] D39208: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-23 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Content-wise, LGTM. There is a style nit inline. Also, can you avoid reformatting the lines that haven't changed? This will help preserve the history of the file and make it clear what c

[PATCH] D37954: Try to shorten system header paths when using -MD depfiles

2017-10-23 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added a comment. (FWIW, the suggestion to use `FileManager:getCanonicalName` did not work because I have no DirectoryEntry. And `-no-canonical-prefixes` it used very early and stripped from normal options, it seems used for a different purpose. Given the opposition, I think that this

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-23 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews created this revision. Added support for regcall as default calling convention. Also added code to exclude main when applying default calling conventions. https://reviews.llvm.org/D39210 Files: include/clang/AST/ASTContext.h include/clang/Basic/LangOptions.h include/clang/Drive

[PATCH] D36790: [ObjC] Messages to 'self' in class methods should use class method dispatch to avoid multiple method ambiguities

2017-10-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. @doug.gregor Ping Repository: rL LLVM https://reviews.llvm.org/D36790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D39079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38774: [CodeGen] Add support for IncompleteArrayType in Obj-C ivars.

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGObjCMac.cpp:5095 +fieldType = fieldType->getAsArrayTypeUnsafe()->getElementType(); + } + vsapsai wrote: > rjmccall wrote: > > You can't just use isa<> here; there can be typedefs of incomplete a

[PATCH] D38774: [CodeGen] Add support for IncompleteArrayType in Obj-C ivars.

2017-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 119952. vsapsai added a comment. - Resubmit my last change without files from underlying branch. https://reviews.llvm.org/D38774 Files: clang/lib/CodeGen/CGObjCMac.cpp clang/test/CodeGenObjC/ivar-layout-flexible-array.m Index: clang/test/CodeGenObjC/i

[PATCH] D38774: [CodeGen] Add support for IncompleteArrayType in Obj-C ivars.

2017-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 119951. vsapsai added a comment. - Address rjmccall review comment about isa<>. Decided to keep in test only cases with typedefs because test coverage is the same and there is less similar code. https://reviews.llvm.org/D38774 Files: clang/include/clang/

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-23 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1859 +if (auto *Fn = dyn_cast(TargetDecl)) { + if (!Fn->isDefined() && !AttrOnCallSite) { +FuncAttrs.addAttribute(llvm::Attribute::NonLazyBind); rnk wrote: > Remind me what happen

[PATCH] D38538: Avoid printing some redundant name qualifiers in completion

2017-10-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added inline comments. This revision is now accepted and ready to land. Comment at: test/CodeCompletion/qualifiers-as-written.cpp:29 + // CHECK-2: COMPLETION: func : [#int#]func(<#foo a#>, <#bar b#>, <#ns::bar c#>, <#ns::baz d#> + // C

[PATCH] D39208: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. Herald added subscribers: szepet, kristof.beyls, xazax.hun, javed.absar, aemerson. https://reviews.llvm.org/D39208 Files: include/clang/Analysis/AnalysisDeclContext.h include/clang/Analysis/BodyFarm.h lib/Analysis/AnalysisDeclContext.cpp lib/Analys

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-23 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram updated this revision to Diff 119950. tmsriram added a comment. Added test test/CodeGen/noplt.c https://reviews.llvm.org/D39079 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/CodeGen/CGCall.cpp lib/Driver/ToolChains/Clang.cpp lib/Frontend

[PATCH] D38774: [CodeGen] Add support for IncompleteArrayType in Obj-C ivars.

2017-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/CodeGen/CGObjCMac.cpp:5095 +fieldType = fieldType->getAsArrayTypeUnsafe()->getElementType(); + } + rjmccall wrote: > You can't just use isa<> here; there can be typedefs of incomplete array type. Thanks fo

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The code looks fine to me. The test seems very vague to me, but I'd like Dave to weigh in on that, because I'm not sure it's reasonable to test the exact pattern here. Also, Dave, I don't know what the IR invariants around debug info are. Is this something we should

[PATCH] D39201: [Analyzer] Handle implicit function reference in bodyfarming std::call_once

2017-10-23 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D39201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316381: [Sema] Add support for flexible array members in Obj-C. (authored by vsapsai). Changed prior to commit: https://reviews.llvm.org/D38773?vs=118990&id=119943#toc Repository: rL LLVM https://re

r316381 - [Sema] Add support for flexible array members in Obj-C.

2017-10-23 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Mon Oct 23 15:01:41 2017 New Revision: 316381 URL: http://llvm.org/viewvc/llvm-project?rev=316381&view=rev Log: [Sema] Add support for flexible array members in Obj-C. Allow Obj-C ivars with incomplete array type but only as the last ivar. Also add a requirement for ivars th

[PATCH] D38939: [clangd] Handle exit notification (proper shutdown)

2017-10-23 Thread Raoul Wols via Phabricator via cfe-commits
rwols marked 3 inline comments as done. rwols added a comment. > you have commit access now, right? I'll have to think about if I want that responsibility! https://reviews.llvm.org/D38939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D39204: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The gcc documentation says "GCC includes built-in versions of many of the functions in the standard C library. These functions come in two forms: one whose names start with the `__builtin_` prefix, and the other without. Both forms have the same type (including prototy

[PATCH] D38939: [clangd] Handle exit notification (proper shutdown)

2017-10-23 Thread Raoul Wols via Phabricator via cfe-commits
rwols updated this revision to Diff 119941. rwols added a comment. - Clarify why we invert the tests in protocol.test, - Use a variable name to clarify why we exit with status code 1 (when run() returns true), - Reword misleading comment in onShutdown method. https://reviews.llvm.org/D38939 Fi

[PATCH] D39206: [libunwind] Add missing checks for register number

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added a subscriber: JDevlieghere. Most other cases that touch `savedRegisters[reg]` have got this check, but these three seemed to lack it. https://reviews.llvm.org/D39206 Files: src/DwarfParser.hpp Index: src/DwarfParser.hpp =

Re: r316379 - [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Rui Ueyama via cfe-commits
Nice. Dispatching based on argv[0] is more common and probably a recommended way now, so this patch aligned with that. On Mon, Oct 23, 2017 at 2:31 PM, Petr Hosek via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: phosek > Date: Mon Oct 23 14:31:05 2017 > New Revision: 316379 > > URL:

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/UnwindRegistersRestore.S:98 + # skip fs + # skip gs + movq 56(%rcx), %rsp # cut back rsp to new location rnk wrote: > mstorsjo wrote: > > mstorsjo wrote: > > > compnerd wrote: > > > > Doesn't Win64 ABI require

[PATCH] D39176: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316379: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D39176?vs=119923&id=119938#toc Repository: rL LLVM

r316379 - [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Oct 23 14:31:05 2017 New Revision: 316379 URL: http://llvm.org/viewvc/llvm-project?rev=316379&view=rev Log: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor Passing a flavor to LLD requires command line argument, but if these are being passed through a

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: src/UnwindRegistersRestore.S:98 + # skip fs + # skip gs + movq 56(%rcx), %rsp # cut back rsp to new location mstorsjo wrote: > mstorsjo wrote: > > compnerd wrote: > > > Doesn't Win64 ABI require some of the MMX register

[PATCH] D38618: Do not add a colon chunk to the code completion of class inheritance access modifiers

2017-10-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Overall LGTM, just a couple of comments: Comment at: include/clang/Sema/Scope.h:131 + +/// We are between inheritance colon and the real class/struct definition scop

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D39079#904050, @lebedev.ri wrote: > No tests? +1, there should be an -emit-llvm test in clang/test/CodeGen/. Comment at: lib/CodeGen/CGCall.cpp:1859 +if (auto *Fn = dyn_cast(TargetDecl)) { + if (!Fn->isDefined() && !A

[PATCH] D39160: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-23 Thread Sanjay Patel via Phabricator via cfe-commits
spatel abandoned this revision. spatel added a comment. Reincarnated as https://reviews.llvm.org/D39204. https://reviews.llvm.org/D39160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D39204: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-23 Thread Sanjay Patel via Phabricator via cfe-commits
spatel created this revision. Herald added a subscriber: mcrosier. This patch is intended to answer a question raised in PR27435: https://bugs.llvm.org/show_bug.cgi?id=27435 Is a programmer using __builtin_sqrt() invoking the compiler's intrinsic definition of sqrt or the mathlib definition of s

[PATCH] D39176: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. This seems like how it always should have been, since -fuse-ld=lld sets it to ld.lld, not lld. Looks to me like the existing MipsLinux and WebAssembly implementations are wrong too and onl

[PATCH] D39160: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-23 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D39160#902918, @spatel wrote: > Oops - I wrongly made llvm-commits a subscriber rather than cfe-commits. Let > me know if I should reopen under a new thread to get the patch to hit the > right mailing list. Yes, please reopen. https://rev

[PATCH] D39176: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 119923. Repository: rL LLVM https://reviews.llvm.org/D39176 Files: lib/Driver/ToolChains/Fuchsia.cpp lib/Driver/ToolChains/Fuchsia.h test/Driver/fuchsia.c test/Driver/fuchsia.cpp Index: test/Driver/fuchsia.cpp =

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 119918. yaxunl added a comment. Use InsertPointGuard and simplify test. https://reviews.llvm.org/D39069 Files: lib/CodeGen/CGExpr.cpp test/CodeGenOpenCL/func-call-dbg-loc.cl Index: test/CodeGenOpenCL/func-call-dbg-loc.cl ===

[PATCH] D38704: [libunwind] Abstract rwlocks into a class, provide a SRW lock implementation for windows

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316364: Abstract rwlocks into a class, provide a SRW lock implementation for windows (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D38704?vs=119094&id=119914#toc Repository:

[libunwind] r316364 - Abstract rwlocks into a class, provide a SRW lock implementation for windows

2017-10-23 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Mon Oct 23 12:29:36 2017 New Revision: 316364 URL: http://llvm.org/viewvc/llvm-project?rev=316364&view=rev Log: Abstract rwlocks into a class, provide a SRW lock implementation for windows This requires _WIN32_WINNT >= 0x0600. If someone wants to spend effort on supporting

[PATCH] D39201: [Analyzer] Handle implicit function reference in bodyfarming std::call_once

2017-10-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. Herald added subscribers: szepet, kristof.beyls, xazax.hun, javed.absar, aemerson. https://reviews.llvm.org/D39201 Files: lib/Analysis/BodyFarm.cpp test/Analysis/call_once.cpp Index: test/Analysis/call_once.cpp ===

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2017-10-23 Thread Francis Ricci via Phabricator via cfe-commits
fjricci added a comment. Awesome, good to know. Thanks! Repository: rL LLVM https://reviews.llvm.org/D27607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. No tests? https://reviews.llvm.org/D39079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39136: [OpenMP] Avoid VLAs for some reductions on array sections

2017-10-23 Thread Jonas Hahnfeld via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316362: [OpenMP] Avoid VLAs for some reductions on array sections (authored by Hahnfeld). Changed prior to commit: https://reviews.llvm.org/D39136?vs=119689&id=119909#toc Repository: rL LLVM https:/

r316362 - [OpenMP] Avoid VLAs for some reductions on array sections

2017-10-23 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Mon Oct 23 12:01:35 2017 New Revision: 316362 URL: http://llvm.org/viewvc/llvm-project?rev=316362&view=rev Log: [OpenMP] Avoid VLAs for some reductions on array sections In some cases the compiler can deduce the length of an array section as constants. With this information

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-23 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. Ping. https://reviews.llvm.org/D39079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2017-10-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D27607#901882, @fjricci wrote: > On platforms where `BOOL` == `signed char`, is it actually undefined behavior > (or is it just bad programming practice) to store a value other than 0 or 1 > in your `BOOL`? I can't find any language specs suggest

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D39069#903344, @rjmccall wrote: > If this is something we generally need to be doing in all the places we > temporarily save and restore the insertion point, we should fix the basic > behavior of saveIP instead of adding explicit code to a bun

RE: [PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread Liu, Yaxun (Sam) via cfe-commits
I will simplify the test. Thanks. Sam From: David Blaikie [mailto:dblai...@gmail.com] Sent: Monday, October 23, 2017 2:08 PM To: reviews+d39069+public+8da79e110d303...@reviews.llvm.org; Yaxun Liu via Phabricator ; Liu, Yaxun (Sam) ; rjmcc...@gmail.com Cc: cfe-commits@lists.llvm.org Subject: Re:

Re: [PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread David Blaikie via cfe-commits
What John said, but also a narrower test would be good - checking that the appropriate call instruction gets a debug location, rather than checking that a bunch of inlining doesn't cause the assertion/verifier failure, would be good. (Clang tests should, as much as possible, not rely on or run the

  1   2   >