[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-03 Thread Steve O'Brien via cfe-commits
elsteveogrande updated this revision to Diff 73398. elsteveogrande added a comment. Thanks for the feedback @majnemer! Fixed these. I _think_ I used `StringRef` right; I assume it's like `std::string` in that it manages its own memory (i.e. I didn't create references to deallocated strings,

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-03 Thread David Majnemer via cfe-commits
majnemer added inline comments. > PrintPreprocessedOutput.cpp:321 > + */ > +std::string sanitizePath(const StringRef& path) { > + std::string str(path.size() * 2, '\0'); Don't pass `StringRef` by const reference, just pass it by value. > PrintPreprocessedOutput.cpp:321-325 > +std::string

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-03 Thread Steve O'Brien via cfe-commits
elsteveogrande updated this revision to Diff 73394. elsteveogrande updated the summary for this revision. elsteveogrande added a comment. Fixed escaping function; simplified that function as well as the diagnostic output. https://reviews.llvm.org/D25153 Files:

Re: r283092 - [analyzer] Extend bug reports with extra notes

2016-10-03 Thread Artem Dergachev via cfe-commits
il.com>> wrote: I also made a quick blind guess at r283141 (http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20161003/172390.html) Thanks a lot for trying to help, sorry for causing problems. 03/10/2016 23:26, Vitaly Buka пишет: I will look into this and get

[PATCH] D21675: New ODR checker for modules

2016-10-03 Thread Richard Smith via cfe-commits
rsmith added a comment. There are a bunch of cases here that do this: if (auto t = getThing()) ID.addThing(t); if (auto t = getOtherThing()) ID.addThing(t); That will result in hash collisions between objects with thing and objects with otherthing (for instance, `struct A { int n :

[PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-10-03 Thread Adrian Prantl via cfe-commits
aprantl added a comment. Not knowing the specifics of the ObjC class layout: Does this work correctly with private ivars (i.e.: Does this need an extra check that there are no extra ivars in a later @implementation)? https://reviews.llvm.org/D7

[PATCH] D24916: [analyzer] Extend bug reports with extra notes - CloneChecker

2016-10-03 Thread Vitaly Buka via cfe-commits
vitalybuka added a comment. reverted with r283182 as it depends on r283092 https://reviews.llvm.org/D24916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24915: [analyzer] Extend bug reports with extra notes - ObjCDeallocChecker

2016-10-03 Thread Vitaly Buka via cfe-commits
vitalybuka added a comment. Reverted with r283181 as it depends r283092 https://reviews.llvm.org/D24915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24916: [analyzer] Extend bug reports with extra notes - CloneChecker

2016-10-03 Thread Vitaly Buka via cfe-commits
vitalybuka added a comment. reverted with r283182 https://reviews.llvm.org/D24916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r283182 - Revert "[analyzer] Improve CloneChecker diagnostics" as its depends on reverted r283092

2016-10-03 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Mon Oct 3 21:40:35 2016 New Revision: 283182 URL: http://llvm.org/viewvc/llvm-project?rev=283182=rev Log: Revert "[analyzer] Improve CloneChecker diagnostics" as its depends on reverted r283092 This reverts commit r283094. Removed:

r283181 - Revert "[analyzer] Add extra notes to ObjCDeallocChecker" as its depends on reverted r283092

2016-10-03 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Mon Oct 3 21:36:58 2016 New Revision: 283181 URL: http://llvm.org/viewvc/llvm-project?rev=283181=rev Log: Revert "[analyzer] Add extra notes to ObjCDeallocChecker" as its depends on reverted r283092 This reverts commit r283093. Modified:

[PATCH] D21675: New ODR checker for modules

2016-10-03 Thread Richard Trieu via cfe-commits
rtrieu marked 2 inline comments as done. rtrieu added inline comments. > dblaikie wrote in DeclBase.cpp:1810-1812 > Inconsistent {} on single line block (in VisitEnumConstantDecl above {} are > not used on a single line block) - usually drop the {} on single line blocks. > > (several other

[PATCH] D21675: New ODR checker for modules

2016-10-03 Thread Richard Trieu via cfe-commits
rtrieu updated this revision to Diff 73388. rtrieu added a comment. Add a more detailed error message to let users know where the two records differ. This replaces the generic error which only stated that two definitions are different without any details. https://reviews.llvm.org/D21675

r283180 - Revert "[analyzer] Extend bug reports with extra notes" to fix Windows bot.

2016-10-03 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Mon Oct 3 21:19:17 2016 New Revision: 283180 URL: http://llvm.org/viewvc/llvm-project?rev=283180=rev Log: Revert "[analyzer] Extend bug reports with extra notes" to fix Windows bot. This reverts commit r283092. Modified:

[PATCH] D1885: [AArch64] implement aarch64 neon vector load/store N-element structure class AdvSIMD (lselem)

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in https://reviews.llvm.org/rL192361. https://reviews.llvm.org/D1885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D2072: Implement aarch64 neon instruction class SIMD Bitwise Extract - Clang

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in https://reviews.llvm.org/rL194119. https://reviews.llvm.org/D2072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D2075: Implement aarch64 neon instructio​n class SIMD Perm - Clang

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in https://reviews.llvm.org/rL194124. https://reviews.llvm.org/D2075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D2076: Implement aarch64 neon instructio​n class SIMD Perm - LLVM

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in https://reviews.llvm.org/rL194123. https://reviews.llvm.org/D2076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D2088: Implement aarch64 neon instructio​n class SIMD Crypto - LLVM

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in https://reviews.llvm.org/rL194085. https://reviews.llvm.org/D2088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D2600: [clang-cl] Added _InterlockedCompareExchangePointer to Intrin.h

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in https://reviews.llvm.org/rL200239. https://reviews.llvm.org/D2600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D24815: [clang] make reciprocal estimate codegen a function attribute

2016-10-03 Thread Mehdi AMINI via cfe-commits
mehdi_amini added inline comments. > spatel wrote in CGCall.cpp:1735 > Good point - I think we have to convert all codegen tests that have these > function-level attributes to IR FMF and make sure that the output doesn't > change. Definitely not part of this patch, but hopefully something that

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-03 Thread Steve O'Brien via cfe-commits
elsteveogrande added inline comments. > elsteveogrande wrote in PrintPreprocessedOutput.cpp:320-321 > right you are! I was thinking of `//` when I was doing that escaping logic. > > I should either escape `*/`, or even better, just use `//` for comments, is > that ok? (I feel like `//` is

r283170 - [coroutines] Switch to using std::experimental namespace per P0057R5

2016-10-03 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Oct 3 19:31:16 2016 New Revision: 283170 URL: http://llvm.org/viewvc/llvm-project?rev=283170=rev Log: [coroutines] Switch to using std::experimental namespace per P0057R5 Summary: Look for coroutine_traits and friends in std::experimental namespace. Patch (mostly)

[PATCH] D3065: Implementation of #pragma (data|code|const|bss)_seg

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in https://reviews.llvm.org/rL205810. https://reviews.llvm.org/D3065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25216: Improve error message when referencing a non-tag type with a tag

2016-10-03 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added a reviewer: rsmith. rnk added a subscriber: cfe-commits. Other compilers accept invalid code here that we reject, and we need a better error message to try to convince users that the code is really incorrect. Consider: class Foo { typedef MyIterHelper

[PATCH] D25068: [coroutines] Switch to using std::experimental namespace per P0057R5

2016-10-03 Thread Gor Nishanov via cfe-commits
GorNishanov updated this revision to Diff 73378. GorNishanov marked an inline comment as done. GorNishanov added a comment. Implemented review feedback. Landing is imminent. https://reviews.llvm.org/D25068 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h

[PATCH] D24815: [clang] make reciprocal estimate codegen a function attribute

2016-10-03 Thread Sanjay Patel via cfe-commits
spatel added inline comments. > mehdi_amini wrote in CGCall.cpp:1735 > I agree with getting on a path to remove these function attributes that have > an equivalent on per-instruction flag. > > I wonder what is the status of these flags in SelectionDAG though? We still > have a variant of the

[PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-03 Thread Vedant Kumar via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D25199#560023, @kcc wrote: > > Maybe we could call this `-fpoison-dangling-ptrs` and force users to be > > more explicit about opting into this behavior change. That would remove > > some of the constraints usually placed on new sanitizer checks

[PATCH] D3771: clang-cl: Add support for -o

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Looks like patch was not committed. https://reviews.llvm.org/D3771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24815: [clang] make reciprocal estimate codegen a function attribute

2016-10-03 Thread Mehdi AMINI via cfe-commits
mehdi_amini added inline comments. > echristo wrote in CGCall.cpp:1735 > Would be nice to get these pulled into a single fast-math string that's set > and then used all over for sure. :) I agree with getting on a path to remove these function attributes that have an equivalent on

[PATCH] D24598: Separate builtins for x84-64 and i386; implement __mulh and __umulh

2016-10-03 Thread Albert Gutowski via cfe-commits
agutowski updated this revision to Diff 73375. agutowski added a comment. remove BuiltinsX86_32.def; reduce redundancy in x86 builtins info https://reviews.llvm.org/D24598 Files: include/clang/Basic/BuiltinsX86_64.def include/clang/Basic/TargetBuiltins.h lib/Basic/Targets.cpp

[PATCH] D24799: [XRay] Check in Clang whether XRay supports the target when -fxray-instrument is passed

2016-10-03 Thread Dean Michael Berris via cfe-commits
dberris added a comment. In https://reviews.llvm.org/D24799#55, @rSerge wrote: > @dberris , could you deliver this patch to mainline? Or do we need approval > from more reviewers? Yes, I can do this -- sorry it was the long weekend for me down under. I'll get to this today. :)

[PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-03 Thread Kostya Serebryany via cfe-commits
kcc added a comment. > Maybe we could call this `-fpoison-dangling-ptrs` and force users to be more > explicit about opting into this behavior change. That would remove some of > the constraints usually placed on new sanitizer checks (e.g support for > executing after the error triggers,

[libcxx] r283163 - Mark a couple more Issaquah issues as done: 2578 and 2738

2016-10-03 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 3 18:42:31 2016 New Revision: 283163 URL: http://llvm.org/viewvc/llvm-project?rev=283163=rev Log: Mark a couple more Issaquah issues as done: 2578 and 2738 Modified: libcxx/trunk/www/upcoming_meeting.html Modified: libcxx/trunk/www/upcoming_meeting.html URL:

[libcxx] r283162 - Change a couple of 'template <typename's to 'template <class' which is what we use in the rest of the library.

2016-10-03 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 3 18:40:48 2016 New Revision: 283162 URL: http://llvm.org/viewvc/llvm-project?rev=283162=rev Log: Change a couple of 'template

[libcxx] r283161 - Add tests to make sure that is_constructible is false. We already checked 'unqualified void'. This was brought up by LWG#2738

2016-10-03 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 3 18:39:52 2016 New Revision: 283161 URL: http://llvm.org/viewvc/llvm-project?rev=283161=rev Log: Add tests to make sure that is_constructible is false. We already checked 'unqualified void'. This was brought up by LWG#2738 Modified:

[PATCH] D24909: fix for not copying fp denormal and trapping options.

2016-10-03 Thread Eric Christopher via cfe-commits
echristo added a comment. Yes, none of this should be added or expanded in TargetOptions. Thanks! -eric https://reviews.llvm.org/D24909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D24815: [clang] make reciprocal estimate codegen a function attribute

2016-10-03 Thread Eric Christopher via cfe-commits
echristo added inline comments. > spatel wrote in CGCall.cpp:1735 > I'm probably not imagining some use case, but I was hoping that we can just > delete the 4 (fast/inf/nan/nsz) that are already covered by instruction-level > FMF. An auto-upgrade might be needed within LLVM...and/or a big pile

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-03 Thread Steve O'Brien via cfe-commits
elsteveogrande added a comment. Also the other issues are old comments, now fixed with the latest updates to this. This does now take the value of the include token: `include` or `include_once` or `import` etc.; and send that to output. Thanks very much @rsmith ! (Sorry to have been a pest.)

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-03 Thread Richard Smith via cfe-commits
rsmith added inline comments. > PrintPreprocessedOutput.cpp:320-321 > + * if we're emitting a '#'-style directive (escape both CR and LF). Paths > are quoted in some > + * instances, so escape quotes. Escaping is with a backslash (and > backslashes themselves have > + * to be escaped); for

[PATCH] D24598: Separate builtins for x84-64 and i386; implement __mulh and __umulh

2016-10-03 Thread Reid Kleckner via cfe-commits
rnk added inline comments. > agutowski wrote in BuiltinsX86_32.def:1 > Will we ever need that file? It seems to nicely complement the 64-bit one, > but if it's going to be empty forever maybe it's better to remove it. I guess we should remove it. Take a look at isX86_64Builtin in

[PATCH] D24598: Separate builtins for x84-64 and i386; implement __mulh and __umulh

2016-10-03 Thread Reid Kleckner via cfe-commits
rnk added inline comments. > Targets.cpp:2319 > + { #ID, TYPE, ATTRS, HEADER, LANGS, FEATURE }, > +#include "clang/Basic/BuiltinsX86.def" > + I'd rather not duplicate this readonly data. I had this clever idea that we'd do something like: const Builtin::Info BuiltinInfo[] = { ...

[PATCH] D24373: [coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-10-03 Thread Gor Nishanov via cfe-commits
GorNishanov closed this revision. GorNishanov added a comment. Closed by commit r283155 - [coroutines] Adding builtins for coroutine intrinsics and backendutil support. For some reason phabricator did not close it automatically. https://reviews.llvm.org/D24373

[PATCH] D23657: Remove some false positives when taking the address of packed members

2016-10-03 Thread Joerg Sonnenberger via cfe-commits
joerg added a comment. The following is from my comment on the original commit. I'm trying this patch now. Two instances here show false positives. Some others are misuse/overuse of __packed, it is time consuming to check all of them. - sbin/route

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-03 Thread Steve O'Brien via cfe-commits
elsteveogrande added a comment. Ping :) Hoping someone on cfe-commits might be able to take a quick look... Repository: rL LLVM https://reviews.llvm.org/D25153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r283155 - [coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-10-03 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Oct 3 17:44:48 2016 New Revision: 283155 URL: http://llvm.org/viewvc/llvm-project?rev=283155=rev Log: [coroutines] Adding builtins for coroutine intrinsics and backendutil support. Summary: With this commit simple coroutines can be created in plain C using

[PATCH] D24815: [clang] make reciprocal estimate codegen a function attribute

2016-10-03 Thread Sanjay Patel via cfe-commits
spatel updated this revision to Diff 73364. spatel added a comment. Patch updated as suggested by Eric: 1. The attribute is named "reciprocal-estimates". 2. Remove unnecessary -disable-llvm-optzns flag from test file. Quick fixes, but this will not go in until the LLVM side

[PATCH] D23657: Remove some false positives when taking the address of packed members

2016-10-03 Thread Richard Smith via cfe-commits
rsmith added inline comments. > SemaChecking.cpp:11053-11056 > + if ((RequiredAlignment > AlignRecord) || > + ((Context.toCharUnitsFromBits( > +Context.getFieldOffset(cast(MD))) % > +RequiredAlignment) != 0)) { This doesn't seem to correctly handle the

[PATCH] D24815: [clang] make reciprocal estimate codegen a function attribute

2016-10-03 Thread Sanjay Patel via cfe-commits
spatel added inline comments. > echristo wrote in CGCall.cpp:1735 > Would be nice to get these pulled into a single fast-math string that's set > and then used all over for sure. :) I'm probably not imagining some use case, but I was hoping that we can just delete the 4 (fast/inf/nan/nsz)

[PATCH] D24815: [clang] make reciprocal estimate codegen a function attribute

2016-10-03 Thread Sanjay Patel via cfe-commits
spatel marked 2 inline comments as done. spatel added a comment. Thanks, Eric. I actually drafted this with the name "recip-estimates", but thought there might be value in reusing the programmer-visible flag name. I'm good with "reciprocal-estimates" too. https://reviews.llvm.org/D24815

[PATCH] D25213: Fix PR28181: Prevent operator overloading related assertion failure crash that happens in C only

2016-10-03 Thread Richard Smith via cfe-commits
rsmith added inline comments. > SemaOverload.cpp:11750 > ExprResult > Sema::CreateOverloadedBinOp(SourceLocation OpLoc, > BinaryOperatorKind Opc, We should never be calling this function outside of C++ mode. It looks like the bug is in `Sema::BuildBinOp` -- in C,

Re: r283092 - [analyzer] Extend bug reports with extra notes

2016-10-03 Thread Vitaly Buka via cfe-commits
Can't reproduce on my Windows. On Mon, Oct 3, 2016 at 1:31 PM Artem Dergachev <noqnoq...@gmail.com> wrote: > I also made a quick blind guess at r283141 ( > http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20161003/172390.html > ) > > Thanks a lot for trying to he

[PATCH] D24373: [coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-10-03 Thread Gor Nishanov via cfe-commits
GorNishanov updated this revision to Diff 73350. GorNishanov added a comment. Herald added a subscriber: modocache. 1. https://reviews.llvm.org/owners/package/2/ test removed 2. Update LanguageExtensions.rst with suggested edits 3. coro-builtins.c test now passes useful arguments and pattern

[PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-03 Thread Vedant Kumar via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D25199#559849, @pcc wrote: > It seems to me that this sanitizer would break the semantics of otherwise > well-defined programs. For example: > > int *x = nullptr; > delete x; > if (x != nullptr) { > // normally unreachable > } > > >

[PATCH] D25213: Fix PR28181: Prevent operator overloading related assertion failure crash that happens in C only

2016-10-03 Thread Alex Lorenz via cfe-commits
arphaman created this revision. arphaman added reviewers: rsmith, rjmccall. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch fixes a crash that happens because of an assertion failure in C mode only. The assertion failure happens

[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-03 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. stack_allocator.h is inconsistent about saying plain size_t or std::size_t. stack_allocator.h should include type_traits for integral_constant. stack_allocator.h refers to stack_allocator as both a class and a struct. It should be consistent (not just because MSVC

[PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-03 Thread Peter Collingbourne via cfe-commits
pcc added a reviewer: rsmith. pcc added a comment. It seems to me that this sanitizer would break the semantics of otherwise well-defined programs. For example: int *x = nullptr; delete x; if (x != nullptr) { // normally unreachable } It may be that a null comparison would be

[PATCH] D16989: Change interpretation of function definition in friend declaration of template class.

2016-10-03 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. A couple of comment nits, then this LGTM. Thanks! > SemaDecl.cpp:8659-8664 > + // void func(); > + // template class C1 { friend void func() { } }; > + // template class

[PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-03 Thread Vedant Kumar via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D25199#559797, @kcc wrote: > >> will just crash without further reporting > > I agree, and we can address that by having special logic in ubsan's segv > handler. > This does not have to be in this patch. @kcc Is it safe to add a handler for

[PATCH] D22189: llvm.noalias - Clang CodeGen - check restrict variable map only for restrict-qualified lvalues

2016-10-03 Thread Hal Finkel via cfe-commits
hfinkel updated this revision to Diff 73345. hfinkel added a comment. Rebased https://reviews.llvm.org/D22189 Files: lib/CodeGen/CGDeclCXX.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGStmtOpenMP.cpp lib/CodeGen/CodeGenFunction.h Index:

[PATCH] D9403: llvm.noalias - Clang CodeGen for local restrict-qualified pointers

2016-10-03 Thread Hal Finkel via cfe-commits
hfinkel updated this revision to Diff 73344. hfinkel added a comment. Rebased; added more comments and addressed other review feedback. https://reviews.llvm.org/D9403 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGStmt.cpp lib/CodeGen/CodeGenFunction.cpp

[PATCH] D9403: llvm.noalias - Clang CodeGen for local restrict-qualified pointers

2016-10-03 Thread Hal Finkel via cfe-commits
hfinkel added inline comments. > rjmccall wrote in CGStmt.cpp:525 > It's much more likely that NoAliasScopes will be empty than that MemoryInsts > will be empty. You should probably fast-path using that, or better yet, with > the RecordMemoryInsts bit. I'm not sure that's true; we only

r283145 - ObjectiveC: fix a seg fault when deserialing redeclaration of ObjCMethodDecl.

2016-10-03 Thread Manman Ren via cfe-commits
Author: mren Date: Mon Oct 3 16:26:46 2016 New Revision: 283145 URL: http://llvm.org/viewvc/llvm-project?rev=283145=rev Log: ObjectiveC: fix a seg fault when deserialing redeclaration of ObjCMethodDecl. The deserialization of redeclartion can cause seg fault since getCanonicalDecl of the

[PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-03 Thread Kostya Serebryany via cfe-commits
kcc added a comment. >> will just crash without further reporting I agree, and we can address that by having special logic in ubsan's segv handler. This does not have to be in this patch. Also, I am not sure about the actual constant. DEADBEEF is commonly recognized poison valued, but on a

[PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-03 Thread Kostya Serebryany via cfe-commits
kcc added a reviewer: pcc. kcc added a comment. In https://reviews.llvm.org/D25199#559407, @vsk wrote: > It looks like programs which trip -fsanitize-value-after-delete will just > crash without further reporting, which isn't in keeping with the way other > ubsan checks are implemented. > >

[PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

2016-10-03 Thread Richard Smith via cfe-commits
rsmith added a comment. OK, so it seems like all the other approaches we discussed have problems too. Let's move forward with this for now. Is there some reasonable base set of functionality between this and JumpDiagnostics that could be factored out and shared? > VarBypassDetector.cpp:45 >

[PATCH] D25024: [clang-tidy] Add check for detecting declarations with multiple names

2016-10-03 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. > cppcoreguidelines-one-name-per-declaration.cpp:8 > + { > +int x = 42, y = 43; > +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: Do not declare multiple > names per declaration [cppcoreguidelines-one-name-per-declaration] The guideline says "Flag

[PATCH] D25106: Packed member warning: Use the typedef name for anonymous structures when it is available

2016-10-03 Thread Alex Lorenz via cfe-commits
arphaman set the repository for this revision to rL LLVM. arphaman updated this revision to Diff 73338. arphaman marked 2 inline comments as done. arphaman added a comment. Update to the patch that follows Aaron's comments: - Uses the explicit type name instead of auto. - Expands the test by

[PATCH] D25210: [ARM] Add Cortex-R52 target to CLANG

2016-10-03 Thread Javed Absar via cfe-commits
javed.absar created this revision. javed.absar added reviewers: rengolin, jmolloy, t.p.northover. javed.absar added a subscriber: cfe-commits. Herald added subscribers: samparker, aemerson. The following patch adds Cortex-R52, the new ARM real-time processor, to CLANG. Cortex-R52 implements the

[PATCH] D25106: Packed member warning: Use the typedef name for anonymous structures when it is available

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > SemaChecking.cpp:11284 > +if (ND->getName().empty()) { > + if (const auto *TypedefDecl = m.RD->getTypedefNameForAnonDecl()) > +ND = TypedefDecl; Please don't use `auto` here since the type is not spelled directly in the initialization. >

Re: r283141 - [analyzer] A blind attempt to fix a buildbot after r283092.

2016-10-03 Thread Hal Finkel via cfe-commits
- Original Message - > From: "Artem Dergachev" > To: "Hal Finkel" , "Artem Dergachev" > > Cc: cfe-commits@lists.llvm.org > Sent: Monday, October 3, 2016 3:40:02 PM > Subject: Re: r283141 - [analyzer] A blind attempt to fix a

Re: r278483 - This patch implements PR#22821.

2016-10-03 Thread Joerg Sonnenberger via cfe-commits
On Mon, Oct 03, 2016 at 07:10:08AM +, Roger Ferrer Ibanez wrote: > Hi Joerg, > > thanks for your comments. I agree that these false positives are annoying. > > I submitted a while ago a patch to address those false positives in > https://reviews.llvm.org/D23657 but it is pending approval.

[PATCH] D25171: clang-format: Add two new formatting options

2016-10-03 Thread Steve O'Brien via cfe-commits
elsteveogrande accepted this revision. elsteveogrande added a reviewer: elsteveogrande. elsteveogrande added a comment. This revision is now accepted and ready to land. Thought I'd take a look at the list of diffs and take a stab at a few (a few easy-looking and short ones :) ) to unblock some

[PATCH] D25024: [clang-tidy] Add check for detecting declarations with multiple names

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > CppCoreGuidelinesTidyModule.cpp:40 > +CheckFactories.registerCheck( > +"cppcoreguidelines-one-name-per-declaration"); > CheckFactories.registerCheck( Can you also register this check under the name `cert-dcl04-c` as well? It fits the

Re: r283092 - [analyzer] Extend bug reports with extra notes

2016-10-03 Thread Artem Dergachev via cfe-commits
I also made a quick blind guess at r283141 (http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20161003/172390.html) Thanks a lot for trying to help, sorry for causing problems. 03/10/2016 23:26, Vitaly Buka пишет: I will look into this and get back to you. On Mon, Oct 3, 2016 at 12:12

Re: r283141 - [analyzer] A blind attempt to fix a buildbot after r283092.

2016-10-03 Thread Hal Finkel via cfe-commits
- Original Message - > From: "Artem Dergachev via cfe-commits" > To: cfe-commits@lists.llvm.org > Sent: Monday, October 3, 2016 3:12:13 PM > Subject: r283141 - [analyzer] A blind attempt to fix a buildbot after r283092. > > Author: dergachev > Date: Mon Oct 3

[PATCH] D3922: Take into account PrintingPolicy::SuppressUnwrittenScope in NamedDecl::printQualifiedName.

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in https://reviews.llvm.org/rL209924. https://reviews.llvm.org/D3922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r283092 - [analyzer] Extend bug reports with extra notes

2016-10-03 Thread Vitaly Buka via cfe-commits
I will look into this and get back to you. On Mon, Oct 3, 2016 at 12:12 PM Artem Dergachev wrote: > > fatal error C1001: An internal error has occurred in the compiler. > > Ouch. So i managed to *crash* the microsoft compiler with my code? > > Could you please somehow have

[PATCH] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > ProTypeMemberInitCheck.cpp:307 > + Result.Nodes.getNodeAs("record")) { > +assert(Record->hasDefaultConstructor()); > +checkMissingMemberInitializer(*Result.Context, Record, nullptr); Please add an explanatory string literal to the

r283141 - [analyzer] A blind attempt to fix a buildbot after r283092.

2016-10-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Oct 3 15:12:12 2016 New Revision: 283141 URL: http://llvm.org/viewvc/llvm-project?rev=283141=rev Log: [analyzer] A blind attempt to fix a buildbot after r283092. The msvc compiler seems to crash compiling the BugReport class. Modified:

[PATCH] D22910: Add support for CXXOperatorCallExpr in Expr::HasSideEffects

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. This patch is missing tests for the new functionality. > aaron.ballman wrote in ExprCXX.h:109 > Missing the full stop at the end of the sentence. It looks like this comment has not been handled yet. > ExprCXX.h:120 > + // Check to see if a given overloaded

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > vbyakovlcl wrote in DiagnosticGroups.td:522 > Gcc prints error messages > > t.c:21:13: error: invalid operands to binary << (have vector_int8 and > vector_short8) > > vi8 = vi8 << vs8; > > I could not find a flag controlling this error. I would not

[PATCH] D25139: [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIfDeviceCode().

2016-10-03 Thread Reid Kleckner via cfe-commits
rnk added inline comments. > jlebar wrote in Sema.h:9258 > These diagnostics live until the end of codegen, and so are destroyed after > the ASTContext. > > I am becoming increasingly displeased with emitting these errors during > codegen. In particular, it makes it annoying to write tests.

[PATCH] D4362: Fix for Bug 19480 -- Adding a test case.

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in https://reviews.llvm.org/rL213987. https://reviews.llvm.org/D4362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

2016-10-03 Thread Richard Smith via cfe-commits
rsmith added a comment. I'm concerned about the complexity of this approach; it's hard for me to be confident that `BuildScopeInformation` is correct and will remain correct in the presence of future changes to the AST, and if it's not, we'll potentially silently miscompile. A simpler but

[PATCH] D24999: [Sema] Only relax array-at-end-of-object checks in __builtin_object_size when -fno-strict-aliasing is given.

2016-10-03 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Just want to give you a heads up that I was going to abandon the patch that adds support for attribute "flexible_array" (https://reviews.llvm.org/D21453) after r281277, but I'll probably need the attribute after all if we are going to make the changes in this patch.

[PATCH] D4687: MS ABI: Downgrade inheritance model mismatches to a warning sometimes

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Looks like patch was not committed. https://reviews.llvm.org/D4687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25208: [libc++] Make _LIBCPP_TYPE_VIS export members

2016-10-03 Thread Shoaib Meenai via cfe-commits
smeenai created this revision. smeenai added reviewers: compnerd, EricWF, mclow.lists. smeenai added a subscriber: cfe-commits. Most classes annotated with _LIBCPP_TYPE_VIS need to have at least some of their members exported, otherwise we have a lot of link errors when linking against a libc++

r283135 - Added more comments to tooling::Replacements.

2016-10-03 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Oct 3 14:14:30 2016 New Revision: 283135 URL: http://llvm.org/viewvc/llvm-project?rev=283135=rev Log: Added more comments to tooling::Replacements. Summary: Also test phabricator commit processing. Subscribers: klimek, cfe-commits Differential Revision:

[PATCH] D25207: Added more comments to tooling::Replacements.

2016-10-03 Thread Eric Liu via cfe-commits
ioeric accepted this revision. ioeric added a reviewer: ioeric. ioeric added a comment. This revision is now accepted and ready to land. Since this patch only introduces new comments, I'll commit it for now to also test phabricator's commit processing. https://reviews.llvm.org/D25207

[PATCH] D25207: Added more comments to tooling::Replacements.

2016-10-03 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. Also test phabricator commit processing. https://reviews.llvm.org/D25207 Files: include/clang/Tooling/Core/Replacement.h Index: include/clang/Tooling/Core/Replacement.h

Re: r283092 - [analyzer] Extend bug reports with extra notes

2016-10-03 Thread Artem Dergachev via cfe-commits
> fatal error C1001: An internal error has occurred in the compiler. Ouch. So i managed to *crash* the microsoft compiler with my code? Could you please somehow have a look if this is reproducible? If it's reproducible or hard-to-check-if-reproducible then i'd revert. I don't think i can

[PATCH] D25206: [Parser] Correct typo after lambda capture initializer is parsed

2016-10-03 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rsmith. ahatanak added a subscriber: cfe-commits. This fixes PR30566. The assertion is triggered when RecordLayoutBuilder tries to compute the size of a field (for capture "name" in the test case) whose type hasn't been deduced. This

[PATCH] D24426: DebugInfo: Pass non-zero alignment to DIBuilder only if aligment was forced

2016-10-03 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a reviewer: rnk. rnk added a comment. This revision is now accepted and ready to land. lgtm > CGDebugInfo.cpp:54-56 > + auto TI = Ctx.getTypeInfo(Ty); > + return TI.AlignIsRequired ? Ctx.toCharUnitsFromBits(TI.Align).getQuantity() > +

[PATCH] D24426: DebugInfo: Pass non-zero alignment to DIBuilder only if aligment was forced

2016-10-03 Thread Victor Leschuk via cfe-commits
vleschuk updated this revision to Diff 73318. vleschuk added a comment. Fix code style: - Two overloaded methods instead of 1 template - lower-case-headed method names - static methods instead of anon namespace - extra new line between methods https://reviews.llvm.org/D24426 Files:

[PATCH] D25139: [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIfDeviceCode().

2016-10-03 Thread Justin Lebar via cfe-commits
jlebar added inline comments. > rnk wrote in Sema.h:9238 > I'm concerned that this usage pattern isn't going to be efficient because you > build the complete diagnostic before calling the bool conversion operator to > determine that it doesn't need to be emitted. I think you want to construct

[PATCH] D25139: [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIfDeviceCode().

2016-10-03 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 73315. jlebar marked an inline comment as done. jlebar added a comment. Address review comments, and rebase atop https://reviews.llvm.org/D24573. https://reviews.llvm.org/D25139 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

Re: r283092 - [analyzer] Extend bug reports with extra notes

2016-10-03 Thread Vitaly Buka via cfe-commits
This patch breaks Windows: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/29769/ On Mon, Oct 3, 2016 at 1:07 AM Artem Dergachev via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: dergachev > Date: Mon Oct 3 02:58:26 2016 > New Revision: 283092 > > URL:

[PATCH] D22057: Prevent devirtualization of calls to un-instantiated functions.

2016-10-03 Thread Sunil Srivastava via cfe-commits
Sunil_Srivastava added a comment. Ping https://reviews.llvm.org/D22057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r283131 - Factor out a diagnostic kind enum for use in two %select expressions

2016-10-03 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Oct 3 13:34:23 2016 New Revision: 283131 URL: http://llvm.org/viewvc/llvm-project?rev=283131=rev Log: Factor out a diagnostic kind enum for use in two %select expressions NFC Modified: cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/lib/Sema/SemaDecl.cpp

  1   2   >